holidays.countries.thailand

Classes

TH(*args, **kwargs)

param years:

THA(*args, **kwargs)

param years:

Thailand(*args, **kwargs)

A subclass of HolidayBase representing public holidays in Thailand.

ThailandStaticHolidays()

class holidays.countries.thailand.Thailand(*args, **kwargs)

Bases: ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalendarHolidays

A subclass of HolidayBase representing public holidays in Thailand.

References:
Limitations:
  • This is only 100% accurate for 1997-2023; any future dates are up to the Royal Thai Government Gazette which updates on a year-by-year basis.

  • Approx. date only goes as far back as 1941 (B.E. 2484) as the Thai calendar for B.E. 2483 as we only have nine months from switching New Year Date (April 1st to January 1st).

  • Thai Lunar Calendar Holidays only work from 1941 (B.E. 2484) onwards until 2057 (B.E. 2600) as we only have Thai year-type data for cross-checking until then.

  • Royal Ploughing Ceremony Day is date is announced on an annual basis by the Court Astrologers, thus need an annual update to the library here

  • This doesn’t cover Thai regional public holidays yet, only stubs added

Country created by: arkid15r

Country maintained by: PPsyrius

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

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

supported_categories: Tuple[str, ...] = ('armed_forces', 'bank', 'government', 'public', 'school', 'workday')

All holiday categories supported by this entity.

default_language: str | None = 'th'

The entity language used by default.

observed_label = 'ชดเชย%s'
supported_languages: Tuple[str, ...] = ('en_US', 'th')

All languages supported by this entity.

class holidays.countries.thailand.TH(*args, **kwargs)

Bases: Thailand

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.thailand.THA(*args, **kwargs)

Bases: Thailand

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.thailand.ThailandStaticHolidays

Bases: object

thai_special_in_lieu_holidays = 'วันหยุดชดเชย'
thai_election = 'วันเลือกตั้ง'
thai_bridge_public_holiday = 'วันหยุดพิเศษ (เพิ่มเติม)'
rama_ix_golden_jubilee = 'พระราชพิธีกาญจนาภิเษก พ.ศ. 2539'
rama_ix_sixty_accession = 'พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549'
thai_military_emergency_lockdown = 'วันหยุดพิเศษ (คมช.)'
thai_political_emergency_lockdown = 'วันหยุดพิเศษ (การเมือง)'
thai_flood_2011_emergency_lockdown = 'วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)'
rama_ix_mourning = 'วันหยุดพิเศษ (ร่วมถวายอาลัย ส่งดวงพระวิญญาณพระบรมศพ)'
rama_ix_cremation = 'วันพระราชพิธีถวายพระเพลิงพระบรมศพพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช'
rama_x_coronation_celebrations = 'พระราชพิธีบรมราชาภิเษก พระบาทสมเด็จพระวชิรเกล้าเจ้าอยู่หัว'
songkran_festival = 'วันสงกรานต์'
special_public_holidays = {1992: ((5, 18, 'วันหยุดชดเชย'), (12, 7, 'วันหยุดชดเชย')), 1993: ((3, 8, 'วันหยุดชดเชย'), (5, 3, 'วันหยุดชดเชย'), (10, 25, 'วันหยุดชดเชย'), (12, 6, 'วันหยุดชดเชย')), 1994: ((1, 3, 'วันหยุดชดเชย'), (5, 2, 'วันหยุดชดเชย'), (7, 25, 'วันหยุดชดเชย'), (10, 24, 'วันหยุดชดเชย'), (12, 12, 'วันหยุดชดเชย')), 1996: (6, 10, 'พระราชพิธีกาญจนาภิเษก พ.ศ. 2539'), 1998: ((5, 11, 'วันหยุดชดเชย'), (12, 7, 'วันหยุดชดเชย')), 1999: ((5, 3, 'วันหยุดชดเชย'), (5, 31, 'วันหยุดชดเชย'), (10, 25, 'วันหยุดชดเชย'), (12, 6, 'วันหยุดชดเชย')), 2000: ((1, 3, 'วันหยุดชดเชย'), (2, 21, 'วันหยุดชดเชย'), (8, 14, 'วันหยุดชดเชย'), (12, 11, 'วันหยุดชดเชย'), (12, 29, 'วันเลือกตั้ง')), 2006: ((4, 19, 'วันเลือกตั้ง'), (6, 9, 'พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549'), (6, 12, 'พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549'), (6, 13, 'พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549'), (9, 20, 'วันหยุดพิเศษ (คมช.)')), 2009: ((1, 2, 'วันหยุดพิเศษ (เพิ่มเติม)'), (4, 10, 'วันหยุดพิเศษ (การเมือง)'), (4, 16, 'วันหยุดพิเศษ (การเมือง)'), (4, 17, 'วันหยุดพิเศษ (การเมือง)'), (7, 6, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2010: ((5, 20, 'วันหยุดพิเศษ (เพิ่มเติม)'), (5, 21, 'วันหยุดพิเศษ (เพิ่มเติม)'), (8, 13, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2011: ((5, 16, 'วันหยุดพิเศษ (เพิ่มเติม)'), (10, 27, 'วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)'), (10, 28, 'วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)'), (10, 29, 'วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)'), (10, 30, 'วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)'), (10, 31, 'วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)')), 2012: (4, 9, 'วันหยุดพิเศษ (เพิ่มเติม)'), 2013: (12, 30, 'วันหยุดพิเศษ (เพิ่มเติม)'), 2014: (8, 11, 'วันหยุดพิเศษ (เพิ่มเติม)'), 2015: ((1, 2, 'วันหยุดพิเศษ (เพิ่มเติม)'), (5, 4, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2016: ((5, 6, 'วันหยุดพิเศษ (เพิ่มเติม)'), (7, 18, 'วันหยุดพิเศษ (เพิ่มเติม)'), (10, 14, 'วันหยุดพิเศษ (ร่วมถวายอาลัย ส่งดวงพระวิญญาณพระบรมศพ)')), 2017: (10, 26, 'วันพระราชพิธีถวายพระเพลิงพระบรมศพพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช'), 2019: (5, 6, 'พระราชพิธีบรมราชาภิเษก พระบาทสมเด็จพระวชิรเกล้าเจ้าอยู่หัว'), 2020: ((11, 19, 'วันหยุดพิเศษ (เพิ่มเติม)'), (11, 20, 'วันหยุดพิเศษ (เพิ่มเติม)'), (12, 11, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2021: ((2, 12, 'วันหยุดพิเศษ (เพิ่มเติม)'), (4, 12, 'วันหยุดพิเศษ (เพิ่มเติม)'), (9, 24, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2022: ((7, 15, 'วันหยุดพิเศษ (เพิ่มเติม)'), (7, 29, 'วันหยุดพิเศษ (เพิ่มเติม)'), (10, 14, 'วันหยุดพิเศษ (เพิ่มเติม)'), (12, 30, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2023: ((5, 5, 'วันหยุดพิเศษ (เพิ่มเติม)'), (7, 31, 'วันหยุดพิเศษ (เพิ่มเติม)'), (12, 29, 'วันหยุดพิเศษ (เพิ่มเติม)')), 2024: ((4, 12, 'วันหยุดพิเศษ (เพิ่มเติม)'), (12, 30, 'วันหยุดพิเศษ (เพิ่มเติม)'))}
special_workday_holidays = {1999: (5, 14, 'วันพืชมงคล')}
special_public_holidays_observed = {2007: (12, 24, 'วันเลือกตั้ง'), 2020: ((7, 27, 'วันสงกรานต์'), (9, 4, 'วันสงกรานต์'), (9, 7, 'วันสงกรานต์'))}