holidays.countries.taiwan

Classes

TW(*args, **kwargs)

param years:

TWN(*args, **kwargs)

param years:

Taiwan(*args, **kwargs)

References:

TaiwanStaticHolidays()

class holidays.countries.taiwan.Taiwan(*args, **kwargs)

Bases: ObservedHolidayBase, ChineseCalendarHolidays, 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 = 'TW'

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

observed_label = '%s(慶祝)'
default_language: str | None = 'zh_TW'

The entity language used by default.

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

All languages supported by this entity.

class holidays.countries.taiwan.TW(*args, **kwargs)

Bases: Taiwan

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.taiwan.TWN(*args, **kwargs)

Bases: Taiwan

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.taiwan.TaiwanStaticHolidays

Bases: object

substituted_date_format = '%Y-%m-%d'
substituted_label = '休息日(%s日起取代)'
childrens_day = '兒童節'
special_public_holidays = {2010: (2, 19, 2, 6), 2012: ((1, 27, 2, 4), (2, 27, 3, 3), (12, 31, 12, 22)), 2013: ((2, 15, 2, 23), (9, 20, 9, 14)), 2015: (1, 2, 12, 27, 2014), 2016: ((2, 12, 1, 30), (6, 10, 6, 4), (9, 16, 9, 10)), 2017: ((2, 27, 2, 18), (5, 29, 6, 3), (10, 9, 9, 30)), 2018: ((4, 6, 3, 31), (12, 31, 12, 22)), 2019: ((2, 8, 1, 19), (3, 1, 2, 23), (10, 11, 10, 5)), 2020: ((1, 23, 2, 15), (6, 26, 6, 20), (10, 2, 9, 26)), 2021: ((2, 10, 2, 20), (9, 20, 9, 11)), 2022: (2, 4, 1, 22), 2023: ((1, 20, 1, 7), (1, 27, 2, 4), (2, 27, 2, 18), (4, 3, 3, 25), (6, 23, 6, 17), (10, 9, 9, 23)), 2024: (2, 8, 2, 17)}
special_public_holidays_observed = {2013: (4, 5, '兒童節'), 2016: (4, 5, '兒童節'), 2017: (4, 3, '兒童節'), 2021: (4, 2, '兒童節'), 2024: (4, 5, '兒童節')}