holidays.countries.germany

Classes

DE(*args, **kwargs)

param years:

DEU(*args, **kwargs)

param years:

Germany(*args, **kwargs)

Official holidays for Germany in its current form.

GermanyStaticHolidays()

class holidays.countries.germany.Germany(*args, **kwargs)

Bases: HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays

Official holidays for Germany in its current form.

This class doesn’t return any holidays before 1990-10-03.

Before that date the current Germany was separated into the “German Democratic Republic” and the “Federal Republic of Germany” which both had somewhat different holidays. Since this class is called “Germany” it doesn’t really make sense to include the days from the two former countries.

Note that Germany doesn’t have rules for holidays that happen on a Sunday. Those holidays are still holiday days but there is no additional day to make up for the “lost” day.

Also note that German holidays are partly declared by each province there are some weired edge cases:

  • “Mariä Himmelfahrt” is only a holiday in Bavaria (BY) if your municipality is mostly catholic which in term depends on census data. Since we don’t have this data but most municipalities in Bavaria are mostly catholic, we count that as holiday for whole Bavaria. We added BYP for the municipality in Bavaria with more protestants. Here this is excluded.

  • There is an “Augsburger Friedensfest” which only exists in the town Augsburg. This is excluded for Bavaria.

  • “Gründonnerstag” (Thursday before easter) is not a holiday but pupils

    don’t have to go to school (but only in Baden Württemberg) which is solved by adjusting school holidays to include this day. It is excluded from our list.

  • “Fronleichnam” is a holiday in certain, explicitly defined municipalities in Saxony (SN) and Thuringia (TH). We exclude it from both provinces.

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

  • expand – Whether the entire year is calculated when one date from that year is requested.

  • observed – Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn’t work for all countries.

  • subdiv – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

country: str = 'DE'

The country’s ISO 3166-1 alpha-2 code.

default_language: str | None = 'de'

The entity language used by default.

supported_languages: Tuple[str, ...] = ('de', 'en_US', 'uk')

All languages supported by this entity.

subdivisions: Tuple[str, ...] = ('BB', 'BE', 'BW', 'BY', 'BYP', 'HB', 'HE', 'HH', 'MV', 'NI', 'NW', 'RP', 'SH', 'SL', 'SN', 'ST', 'TH')

The subdivisions supported for this country (see documentation).

class holidays.countries.germany.DE(*args, **kwargs)

Bases: Germany

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

  • expand – Whether the entire year is calculated when one date from that year is requested.

  • observed – Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn’t work for all countries.

  • subdiv – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

class holidays.countries.germany.DEU(*args, **kwargs)

Bases: Germany

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

  • expand – Whether the entire year is calculated when one date from that year is requested.

  • observed – Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn’t work for all countries.

  • subdiv – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

class holidays.countries.germany.GermanyStaticHolidays

Bases: object

special_public_holidays = {2017: (10, 31, 'Reformationstag')}
special_be_public_holidays = {2020: (5, 8, '75. Jahrestag der Befreiung vom Nationalsozialismus und der Beendigung des Zweiten Weltkriegs in Europa')}