German Holiday (Feiertag)

  1. npm install moment-feiertage --save

This (moment-feiertage) is a Moment.js plugin to determine if a date is a German holiday. Holidays are taken from Wikipedia (de). It's a bit complicated to determine if a date is a holiday, because religious holidays vary every year and differ within the 16 German states.

Made by DaniSchenk.

  1. var someDateInSomeStates = moment('2018-11-01').isHoliday(['BW', 'SH', 'TH']);
  2. /* returns {
  3. allStates: false,
  4. holidayName: 'Allerheiligen',
  5. holidayStates: [ 'BW' ],
  6. testedStates: [ 'BW', 'SH', 'TH' ]
  7. }*/

The repository is located at github.com/DaniSchenk/moment-feiertage.