hd

holiday-de

German Holidays

Showing:

Popularity

Downloads/wk

310

GitHub Stars

7

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Build Status Coverage Status

holiday-de

Determine whether a given date is a German holiday

Usage

var holiday = require('holiday-de');

// set the state (Bundesland)
holiday.setState('nw');

// check your dates -> returns true
holiday.isHoliday(new Date(2015, 0, 1));

Footnote: holiday-de plays nice with moment.

List of supported states (Bundesländer)

  • bw: Baden-Württemberg
  • by: Bayern
  • be: Berlin
  • bb: Brandenburg
  • hb: Bremen
  • hh: Hamburg
  • he: Hessen
  • mv: Mecklenburg-Vorpommern
  • ni: Niedersachsen
  • nw: Nordrhein-Westfalen
  • rp: Rheinland-Pfalz
  • sl: Saarland
  • sn: Sachsen
  • st: Sachsen-Anhalt
  • sh: Schleswig-Holstein
  • th: Thüringen

List of supported holidays

  • Neujahrstag
  • Heilige Drei Könige
  • Tag der Arbeit
  • Augsburger Friedensfest
  • Mariä Himmelfahrt
  • Tag der Deutschen Einheit
  • Reformationstag
  • Allerheiligen
  • Heiligabend
  • 1. Weihnachtstag
  • 2. Weihnachtstag
  • Silvester
  • Rosenmontag
  • Gründonnerstag
  • Karfreitag
  • Ostersonntag
  • Ostermontag
  • Christi Himmelfahrt
  • Pfingstsonntag
  • Pfingstmontag
  • Fronleichnam
  • Buß- und Bettag

Note that in 2017 Reformationstag is a holiday in all states.

To check which holidays are enabled for a state, call setState() and check the holidays object:

holiday.setState('nw');
console.log(holiday.holidays);

To enable a additional holidays, set them to true in the holidays object:

holiday.holidays.Rosenmontag = true;
holiday.holidays['Augsburger Friedensfest'] = true;

Author

Jonathan Diehl

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial