Open Source

Feiertage.js

German Public Holidays for Node.js & Browser JavaScript

A lightweight TypeScript npm module to calculate German public holidays for each federal state – zero dependencies.

npm install feiertagejs

Installation

Install Feiertage.js with your preferred package manager:

npm
npm
npm install feiertagejs
yarn
Yarn
yarn add feiertagejs
pnpm
pnpm
pnpm add feiertagejs

Quick Start

Using Feiertage.js is this simple:

import { getHolidays, isHoliday, isSpecificHoliday } from 'feiertagejs';

// Ist heute ein Feiertag in Bayern?
const today = new Date();
const isTodayHoliday = isHoliday(today, 'BY');

// Alle Feiertage 2026 für Bayern
const holidays2026 = getHolidays('2026', 'BY');

// Ist Christi Himmelfahrt?
const isAscension = isSpecificHoliday(
  today, 'CHRISTIHIMMELFAHRT', 'ALL'
);

dayjs plugin: dayjs-feiertage

If you’re using dayjs, there’s a dedicated plugin: dayjs-feiertage. It uses Feiertage.js under the hood and adds holiday checks and yearly holiday lists to dayjs.

View on npm

Installation

pnpm
pnpm add dayjs-feiertage dayjs
npm
npm install dayjs-feiertage dayjs
yarn
yarn add dayjs-feiertage dayjs

Quick start

import dayjs from "dayjs";
import dayjsFeiertage from "dayjs-feiertage";

// Extend dayjs with the plugin
dayjs.extend(dayjsFeiertage);

// Check if a date is a holiday
dayjs("2025-12-25").isHoliday("BUND"); // true

// Check if a date is a Sunday or holiday
dayjs("2025-12-25").isSunOrHoliday("BUND"); // true

// Get all holidays for a year
dayjs("2025-01-01").getHolidaysOfYear("BY"); // Holiday[]

Practical Examples

Is Today a Holiday?

Check if a specific date is a holiday in a federal state.

import { isHoliday } from 'feiertagejs';

const date = new Date('2026-12-25');
isHoliday(date, 'BW');
// => true

All Holidays of a Year

Get all holidays for a year and region.

import { getHolidays } from 'feiertagejs';

const holidays = getHolidays('2026', 'BY');

holidays[0].name;
// => 'NEUJAHRSTAG'

holidays[0].translate('de');
// => 'Neujahrstag'

Check Specific Holiday

Check if a date is a specific holiday.

import { isSpecificHoliday } from 'feiertagejs';

const date = new Date('2026-10-03');
isSpecificHoliday(
  date, 
  'DEUTSCHEEINHEIT',
  'ALL'
);
// => true

Sunday or Holiday?

Practical for business logic: Check both at once.

import { isSunOrHoliday } from 'feiertagejs';

const today = new Date();

if (isSunOrHoliday(today, 'NW')) {
  console.log('Geschlossen!');
}

API Reference

The most important functions at a glance:

FunktionBeschreibungRückgabe
isHoliday(date, region)Checks if a date is a holidayboolean
getHolidays(year, region)Returns all holidays of a yearHoliday[]
getHolidayByDate(date, region)Returns the holiday for a dateHoliday | undefined
isSpecificHoliday(date, name, region)Checks if a date is a specific holidayboolean
isSunOrHoliday(date, region)Checks if a date is Sunday or holidayboolean
addTranslation(isoCode, translation)Adds a new translationvoid

Supported Federal States

Feiertage.js supports all German federal states:

BW

Baden-Württemberg

BY

Bavaria

BE

Berlin

BB

Brandenburg

HB

Bremen

HH

Hamburg

HE

Hesse

MV

Mecklenburg-Vorpommern

NI

Lower Saxony

NW

North Rhine-Westphalia

RP

Rhineland-Palatinate

SL

Saarland

SN

Saxony

ST

Saxony-Anhalt

SH

Schleswig-Holstein

TH

Thuringia

Spezielle Regionen

BUND

Federal holidays (valid in all states)

ALL

All holidays (valid in at least one state)

AUGSBURG

City of Augsburg (incl. Peace Festival)

Supported Holidays

New Year's Day
Epiphany
Good Friday
Easter Sunday
Easter Monday
Labour Day
Ascension Day
Whit Sunday
Whit Monday
Corpus Christi
Assumption Day
German Unity Day
Reformation Day
All Saints' Day
Repentance and Prayer Day
Christmas Day
Boxing Day
World Children's Day
International Women's Day
Augsburg Peace Festival

About the Project

Feiertage.js was developed by Simon Fakir and is maintained by the open-source community. The module is actively developed and production-ready.

10,000+ monthly downloads
npm Downloads
70+ GitHub Stars
Open Source
Current version: 3.x
Stable Release

Get Started Now

Feiertage.js is free and open source. Try it out!

Want to use Feiertage.js in a business-critical system or need help with integration? Get in touch – we can support you with architecture design, integrations and reliable operations.