Determine whether a given date is a German holiday
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.
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
NeujahrstagHeilige Drei KönigeTag der ArbeitAugsburger FriedensfestMariä HimmelfahrtTag der Deutschen EinheitReformationstagAllerheiligenHeiligabend1. Weihnachtstag2. WeihnachtstagSilvesterRosenmontagGründonnerstagKarfreitagOstersonntagOstermontagChristi HimmelfahrtPfingstsonntagPfingstmontagFronleichnamBuß- 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;