# feiertagejs

> A module to calculate German holidays made for node.js

Latest version **1.5.1** (published 2026-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install feiertagejs
pnpm add feiertagejs
yarn add feiertagejs
bun add feiertagejs
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2026-04-03 |
| First published | 2015-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8.0.0 |
| Dependencies | 0 |
| Unpacked size | 234.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 75 |
| Author | Simon Fakir |
| Maintainers | sfakir |
| Keywords | node, holidays, feiertage, javascript |

## Links

- npm: https://www.npmjs.com/package/feiertagejs
- Repository: https://github.com/sfakir/feiertagejs
- Issues: https://github.com/sfakir/feiertagejs/issues
- npm.io page: https://npm.io/package/feiertagejs

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.5.1 (latest) — 2026-04-03
- 1.5.0 — 2026-01-28
- 1.4.1 — 2024-06-14
- 1.4.0 — 2023-12-29
- 1.3.9 — 2023-05-22
- 1.3.8 — 2023-05-19
- 1.3.6 — 2023-03-02
- 1.3.5 — 2022-12-03
- 1.3.4 — 2022-12-03
- 1.3.3 — 2022-11-23
- 1.3.2 — 2021-12-31
- 1.3.1 — 2021-12-31
- 1.3.0 — 2021-01-16
- 1.2.7 — 2019-10-27
- 1.2.6 — 2019-03-29
- … 17 more at https://npm.io/package/feiertagejs/versions

## README

# Feiertage.js

[![npm version](https://badge.fury.io/js/feiertagejs.svg)](https://badge.fury.io/js/feiertagejs)
[![Build Status](https://travis-ci.org/sfakir/feiertagejs.svg?branch=master)](https://travis-ci.org/sfakir/feiertagejs)

Feiertage.js is a small _typescript_ npm module without dependencies to calculate German holidays for each Bundesland.

## Installation

- [pnpm](https://pnpm.io/): `pnpm add feiertagejs`
- [npm](https://www.npmjs.com/): `npm install feiertagejs`
- [yarn](https://yarnpkg.com/en/): `yarn add feiertagejs`


If you are looking for a day.js plugin find it in [this repository](https://github.com/fakir-tech/dayjs-feiertage).


## Quick Examples

### ES Modules (Typescript/Javasript)

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](docs.md).

```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]
  }
]

```

## Timezone Handling

**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

### Creating Dates

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.

## API doc

The full API doc can be found [here](docs.md).

## Feedback and Questions

You have two options two give feedback or ask questions:

- Comment the official release [post](https://fakir.tech/de/feiertage-js-deutsche-feiertage-fuer-node-js-und-browser-javascript/)
- Open issues or pullrequests on [github](https://github.com/sfakir/feiertagejs)

## Contributors

Thank you for contributing:

- thetric
- SteveOswald

## Feedback

If you have any questions, feel free to open an issue.

---
_Source: https://npm.io/package/feiertagejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
