holiday-de
v1.1.4
Published
German Holidays
Downloads
6,377
Maintainers
Readme
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ürttembergby
: Bayernbe
: Berlinbb
: Brandenburghb
: Bremenhh
: Hamburghe
: Hessenmv
: Mecklenburg-Vorpommernni
: Niedersachsennw
: Nordrhein-Westfalenrp
: Rheinland-Pfalzsl
: Saarlandsn
: Sachsenst
: Sachsen-Anhaltsh
: Schleswig-Holsteinth
: 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;