holidays.countries.japan

Classes

JP(*args, **kwargs)

param years:

JPN(*args, **kwargs)

param years:

Japan(*args, **kwargs)

References:

JapanStaticHolidays()

class holidays.countries.japan.Japan(*args, **kwargs)

Bases: HolidayBase, InternationalHolidays, StaticHolidays

References:

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 = 'JP'

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

default_language: str | None = 'ja'

The entity language used by default.

supported_categories: Tuple[str, ...] = ('bank', 'public')

All holiday categories supported by this entity.

supported_languages: Tuple[str, ...] = ('en_US', 'ja', 'th')

All languages supported by this entity.

class holidays.countries.japan.JP(*args, **kwargs)

Bases: Japan

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.japan.JPN(*args, **kwargs)

Bases: Japan

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.japan.JapanStaticHolidays

Bases: object

special_public_holidays = {1959: (4, 10, '結婚の儀'), 1989: (2, 24, '大喪の礼'), 1990: (11, 12, '即位礼正殿の儀'), 1993: (6, 9, '結婚の儀'), 2019: ((5, 1, '天皇の即位の日'), (10, 22, '即位礼正殿の儀が行われる日'))}