A module to calculate German holidays made for node.js
npm install feiertagejs

Feiertage.js is a small _typescript_ npm module without dependencies to calculate German holidays for each Bundesland.
- yarn: yarn add feiertagejs
- npm: npm install feiertagejs
- bower: bower install feiertagejs _outdated!_
- Plain Javascript _outdated!_
If you are looking for a day.js plugin find it in this repository.
The prefered way is to directly import the typescript module. However, you can also use .js.
Please find here some examples and full api here.
``javascript
import { getHolidays, isHoliday, isSpecificHoliday } from 'feiertagejs';
const today = new Date();
// is today a holiday?
isHoliday(today, 'BW'); // false -- probably false, because you are working ;)
// check if a day is a specific holiday
isSpecificHoliday(today, 'CHRISTIHIMMELFAHRT', 'ALL'); // true | false
// get all holiday for a single year: getHolidays()
// returns an array of "Holiday" Objects. Please see the docs.md for all properties.
const holidays2023 = getHolidays('2023', 'BUND');
holidays2023[0].date // Date object
holidays2023[0].dateString // '2023-01-01' (in German timezone)
holidays2023[0].name // 'NEUJAHRSTAG' (constant)
holidays2023[0].translate('de') // German translation: Neujahrstag
holidays2023[0].equals(date) // Compare days only (ignore time)
`
One entry of the array contains:
`javascript
[{
name: 'CHRISTIHIMMELFAHRT',
date: new Date('2023-05-18T10:00:00.000Z'),
dateString: '2023-05-18',
regions: [
'BW', 'BY', 'BE',
'BB', 'HB', 'HE',
'HH', 'MV', 'NI',
'NW', 'RP', 'SL',
'SN', 'ST', 'SH',
'TH', 'BUND', 'AUGSBURG',
'ALL'
],
translate: [Function: translate],
getNormalizedDate: [Function: getNormalizedDate],
equals: [Function: equals]
}
]
`
All dates are interpreted in German timezone (Europe/Berlin).
This means:
- new Date('2025-05-28T23:00:00Z') (UTC) is 2025-05-29 01:00 in Germany → recognized as May 29th
- The library correctly handles CET (UTC+1) and CEST (UTC+2) daylight saving time
You can pass dates in several ways:
`javascript
// Option 1: Regular Date object (interpreted in German timezone)
isHoliday(new Date(), 'BY');
// Option 2: ISO string with timezone (recommended for specific dates)
isHoliday(new Date('2025-12-25T00:00:00+01:00'), 'BY'); // Christmas in CET
// Option 3: UTC date at noon (timezone-safe for any server location)
const christmas = new Date(Date.UTC(2025, 11, 25, 12, 0, 0));
isHoliday(christmas, 'BY');
``
Best Practice: When running code on servers in different timezones, use UTC dates at noon or ISO strings with explicit timezone to avoid ambiguity.
The full API doc can be found here.
You have two options two give feedback or ask questions:
- Comment the official release post
- Open issues or pullrequests on github
Thank you for contributing:
- thetric
- SteveOswald
If you have any questions, feel free to open an issue.