From 009a9c97a86bb77c564b116b8e9cf8e4c70c6681 Mon Sep 17 00:00:00 2001 From: PPsyrius <19505219+PPsyrius@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:22:09 +0700 Subject: [PATCH 1/5] Extend Thai LuniSolar calendar support down to 1914 --- holidays/calendars/thai.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/holidays/calendars/thai.py b/holidays/calendars/thai.py index 268c729e7..e668969b2 100644 --- a/holidays/calendars/thai.py +++ b/holidays/calendars/thai.py @@ -22,7 +22,7 @@ class _ThaiLunisolar: """ - ** Thai Lunar Calendar Holidays only work from 1941 (B.E. 2484) onwards + ** Thai Lunar Calendar Holidays only work from 1913 (B.E. 2456/2455) onwards until 2157 (B.E. 2700) as we only have Thai year-type data for cross-checking until then. @@ -100,9 +100,15 @@ class _ThaiLunisolar: 2010-05-28 """ - # Athikawan (Extra-Day Year) list goes from 1941-2157 C.E. + # Athikawan (Extra-Day Year) list goes from 1914-2157 C.E. # Copied off from 1757-2157 (B.E. 2300-2700) Thai Lunar Calendar ATHIKAWAN_YEARS_GREGORIAN = { + 1914, + 1917, + 1925, + 1929, + 1933, + 1936, 1945, 1949, 1952, @@ -147,10 +153,20 @@ class _ThaiLunisolar: 2153, } - # Athikamat (Extra-Month Year) list goes from 1941-2157 C.E.: + # Athikamat (Extra-Month Year) list goes from 1914-2157 C.E.: # Copied off from 1757-2157 (B.E. 2300-2700) Thai Lunar Calendar # Approx formula as follows: (common_era-78)-0.45222)%2.7118886 < 1 ATHIKAMAT_YEARS_GREGORIAN = { + 1915, + 1918, + 1920, + 1923, + 1926, + 1928, + 1931, + 1934, + 1937, + 1939, 1942, 1944, 1947, @@ -238,8 +254,8 @@ class _ThaiLunisolar: # our array only goes up to B.E. 2700; We'll thus only populate # the data for 1941-2157 (B.E. 2484-2700). # Sources: หนังสือเวียนกรมการปกครอง กระทรวงมหาดไทย มท 0310.1/ว4 5 ก.พ. 2539 - START_DATE = date(1940, 11, 30) - START_YEAR = 1941 + START_DATE = date(1913, 11, 28) + START_YEAR = 1914 END_YEAR = 2157 def __init__(self, calendar=THAI_CALENDAR) -> None: From 445903004a51f5d7e596edc656296a62430adcfb Mon Sep 17 00:00:00 2001 From: PPsyrius <19505219+PPsyrius@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:07:24 +0700 Subject: [PATCH 2/5] Expand Thailand holidays down to 1914 --- holidays/countries/thailand.py | 654 +++++++++++++++++------- holidays/locale/en_US/LC_MESSAGES/TH.po | 124 ++++- holidays/locale/th/LC_MESSAGES/TH.po | 122 ++++- snapshots/countries/TH_COMMON.json | 166 +++--- tests/countries/test_thailand.py | 260 ++++++++-- 5 files changed, 991 insertions(+), 335 deletions(-) diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index d2070cf11..9d6366d77 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -13,7 +13,21 @@ from datetime import date from gettext import gettext as tr -from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC +from holidays.calendars.gregorian import ( + JAN, + FEB, + MAR, + APR, + MAY, + JUN, + JUL, + AUG, + SEP, + OCT, + NOV, + DEC, + _timedelta, +) from holidays.constants import ARMED_FORCES, BANK, GOVERNMENT, PUBLIC, SCHOOL, WORKDAY from holidays.groups import InternationalHolidays, StaticHolidays, ThaiCalendarHolidays from holidays.observed_holiday_base import ( @@ -33,6 +47,46 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC References: - Based on: https://en.wikipedia.org/wiki/Public_holidays_in_Thailand + `Holidays Act (MAR 1914) `_ + `Special Extension for MoJ (In-effect 1915 onwards) `_ + `Holidays Act Amendment (MAR 1926) `_ + `Ascension of HM King Ananda Mahidol (MAR 1935) `_ + `Holidays Act Amendment (JAN 1938) `_ + `Translation Typo Fixed for the JAN 1938 Amendment `_ + `Constitution Petition Day renamed National Day (JUL 1938) `_ + `Holidays Act Amendment (MAR 1940) `_ + `Holidays Act Amendment (SEP 1940) (In-effect 1941) `_ + `Removal of Royal Language for King's Birthday (B.E 2484/1941) `_ + `Holidays Act, Franco-Thai War Armistice Day added (B.E. 2485/1942) `_ + `Holidays Act, Franco-Thai War Armistice Day Repealed (B.E. 2487/1944) `_ + `Removal of Royal Language for King's Birthday Repealed (B.E 2488/1945) `_ + `Holidays Act Amendment (DEC B.E. 2488/1945) `_ + `Holidays Act Amendment (AUG B.E. 2489/1946) `_ + `Special Weekend Arrangement for 4 Southern Provinces (4SP) `_ + `Holidays Act, B.E. 2491 (1948) `_ + `Holidays Act (No. 2), B.E. 2493 (1950) `_ + `Holidays Act (No. 3), B.E. 2494 (1951) `_ + `HM King Bhumibol Adulyadej Birthday Holidays Adjustment `_ + `Holidays Act (No. 4), B.E. 2495 (1952) `_ + `Holidays Act (No. 6), B.E. 2497 (1954) `_ + `Holidays Act (No. 7), B.E. 2497 (1954); United Nations Day added `_ + `Holidays Act (No. 8), B.E. 2499 (1956); Mothers Day, Children's Day added `_ + `Holidays Act (No. 9), B.E. 2499 (1956); Weekend is now Buddhist Sabbath-SUN `_ + `Holidays Act (No. 10), B.E. 2500 (1957); Weekend Change Reverted `_ + `Holidays Act (No. 11), B.E. 2500 (1957) `_ + `Holidays Act (No. 12), B.E. 2502 (1959); Weekend is full day SAT-SUN `_ + `Holidays Act (No. 13), B.E. 2503 (1960); National Day is now Dec 5 `_ + `Holidays Act (No. 14), B.E. 2505 (1962); Asarnha Bucha added `_ + `Holidays Act (No. 16), B.E. 2506 (1963); 4SP weekend is now SAT-SUN `_ + `Eid-al-Fitr and Eit al-Adha added for 4SP `_ + `Holidays Act (No. 17), B.E. 2525 (1982); Chakri Day Full Name Changed `_ + `Holidays Act (No. 19), B.E. 2540 (1997); Songkran Date Changed `_ + `Holidays Act (No. 20), B.E. 2555 (2012); CNY in 4SP `_ + `Holidays Act (No. 21), B.E. 2556 (2013); Songkhla added to 4SP `_ + `Holidays Act (No. 22), B.E. 2560 (2017); Father's Day Date Clarification `_ + `Holidays Act (No. 23), B.E. 2560 (2017); Rama X's Birthday added `_ + `HM Queen Suthida's Birthday added `_ + `Holidays Act, B.E. 2562 (2019) `_ - Checked with: `Bank of Thailand lists `_ - [In Lieus] - `isranews.org `_ @@ -69,12 +123,14 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC https://www.matichon.co.th/politics/news_526200 - [HM King Chulalongkorn Memorial Day] ``_ + - https://www.sanook.com/news/9072518/ - [HM King Bhumibol Adulyadej's Birthday] - `Ministry of Culture `_ - https://hilight.kapook.com/view/148862 - [National Father's Day] https://www.brh.go.th/index.php/2019-02-27-04-12-21/594-5-5 - [Constitution Day] + - https://th.wikipedia.org/wiki/วันรัฐธรรมนูญ_(ประเทศไทย) - https://hilight.kapook.com/view/18208 - `Bank of Thailand `_ - ``_ @@ -121,13 +177,8 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC - This is only 100% accurate for 1997-2025; 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 2157 (B.E. 2700) as we only have Thai year-type data for - cross-checking until then. + - Thai Lunar Calendar Holidays only work until 2157 (B.E. 2700) 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 @@ -143,9 +194,8 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC # %s (in lieu). observed_label = tr("ชดเชย%s") supported_languages = ("en_US", "th") - # Due to Thai Calendar Migration, this is capped off at 1941. - # But certain holidays were implemented before 1941. - start_year = 1941 + # First Holiday Decree was promulgated in March 1914. + start_year = 1914 def __init__(self, *args, **kwargs): InternationalHolidays.__init__(self) @@ -163,60 +213,110 @@ def _populate_public_holidays(self): # วันขึ้นปีใหม่ # Status: In-Use. # Starts in the present form in 1941 (B.E. 2484). - # TODO: Add check for 1941 if we support earlier dates. + # From 1941-1945 and 1948-1954 JAN 2nd was also observed. + # For pre- observance, see New Year's Eve entry. - # New Year's Day. - self._add_observed(self._add_new_years_day(tr("วันขึ้นปีใหม่"))) + if self._year >= 1941: + # New Year's Day. + name = tr("วันขึ้นปีใหม่") + self._add_observed(self._add_new_years_day(name)) + if self._year <= 1945 or 1948 <= self._year <= 1954: + self._add_new_years_day_two(name) # วันเด็กแห่งชาติ # Status: In-Use. - # Starts in 1955 as the 1st Monday of October. + # Starts in 1955 (B.E. 2498) as the 1st Monday of OCT. + # Its status as a Public Holiday was reaffirmed in 1956. # No event was held in 1964 due to date changes came into effect too late. - # Moved to 2nd Saturday of January since 1965. + # Moved to 2nd Saturday of JAN since 1965. # No in-lieus are observed, and still remain a Public Holidays than just Observed. if self._year >= 1955 and self._year != 1964: # National Children's Day - childrens_day = tr("วันเด็กแห่งชาติ") + name = tr("วันเด็กแห่งชาติ") if self._year <= 1963: - self._add_holiday_1st_mon_of_oct(childrens_day) + self._add_holiday_1st_mon_of_oct(name) else: - self._add_holiday_2nd_sat_of_jan(childrens_day) + self._add_holiday_2nd_sat_of_jan(name) - # วันจักรี - # Status: In-Use. - # Starts in present form in 1918 (B.E. 2461). - # TODO: Add check for 1918 if we support earlier dates. + # วันลงนามในสัญญาพักรบระหว่างประเทศไทยกับประเทศอินโดจีนฝรั่งเศส + # Status: Defunct. + # Started in 1942 (B.E. 2485), abandoned from 1945 onwards. - # Chakri Memorial Day. - self._add_observed(self._add_holiday_apr_6(tr("วันจักรี"))) + if 1942 <= self._year <= 1944: + # Franco-Thai War Armistice Day. + self._add_holiday_jan_28(tr("วันลงนามในสัญญาพักรบระหว่างประเทศไทยกับประเทศอินโดจีนฝรั่งเศส")) - # วันสงกรานต์ + # วันจักรี + # Status: In-Use. + # Starts in present form in 1926 (B.E. 2469). + + if self._year >= 1926: + if self._year >= 1983: + # Chakri Memorial Day. + name = tr("วันพระบาทสมเด็จพระพุทธยอดฟ้าจุฬาโลกมหาราช และวันที่ระลึกมหาจักรีบรมราชวงศ์") + elif self._year >= 1938: + # Chakri Day. + name = tr("วันจักรี") + else: + # Maha Chakri Memorial Day. + name = tr("วันที่ระลึกมหาจักรี") + self._add_observed(self._add_holiday_apr_6(name)) + + # พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์ (1914-1925) + # ตะรุษะสงกรานต์ (1926-1937) + # วันตรุษสงกรานต์ (1938-1939) + # วันตรุษสงกรานต์และขึ้นปีใหม่ (1940) + # วันสงกรานต์ (1941-Present) # Status: In-Use. - # Used to be April 1st as Thai New Year Day. - # Initially abandoned in 1941 (B.E. 2484), declared again as - # public holidays in 1948 (2491 B.E). - # - 1948-1953, celebrated on Apr 13-15 - # - 1954-1956, abandoned as a public holiday - # - 1957-1988, only celebrated on Apr 13 - # - 1989-1997, celebrated on Apr 12-14 - # - 1998-Present, celebrated on Apr 13-15 + # Started in 1914 (B.E. 2457). + # Earliest form of Songkran public holidays was observed from MAR 28th to APR 15th + # (19 days). Later extended for MoJ staff only upto APR 27th from 1915 (30 days). + # - 1926-1937, celebrated on MAR 31st-APR 3rd. + # - 1938-1940, celebrated on MAR 31st-APR 2nd. + # - 1941-1947, abandoned as a public holiday. + # - 1948-1953, celebrated on APR 13th-15th. + # - 1954-1956, abandoned as a public holiday. + # - 1957-1988, only celebrated on APR 13th. + # - 1989-1997, celebrated on APR 12th-14th. + # - 1998-Present, celebrated on APR 13th-15th. # (Except for 2020 due to Covid-19 outbreaks) # This has its own in-lieu trigger. - if 1948 <= self._year <= 1953 or 1957 <= self._year != 2020: + if self._year <= 1940 or 1948 <= self._year <= 1953 or 1957 <= self._year != 2020: # Songkran Festival. - songkran_festival = tr("วันสงกรานต์") - if 1957 <= self._year <= 1988: - self._add_observed(self._add_holiday_apr_13(songkran_festival)) + name = tr("วันสงกรานต์") + if self._year <= 1925: + # Songkran New Year Holidays. + name = tr("พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์") + dt = self._add_holiday_mar_28(name) + for delta in range(1, 19): + self._add_holiday(name, _timedelta(dt, delta)) + elif 1926 <= self._year <= 1940: + if self._year == 1940: + # Songkran New Year. + name = tr("วันตรุษสงกรานต์และขึ้นปีใหม่") + elif self._year >= 1938: + # Songkran New Year. + name = tr("วันตรุษสงกรานต์") + else: + # Songkran New Year. + name = tr("ตะรุษะสงกรานต์") + self._add_holiday_mar_31(name) + self._add_holiday_apr_1(name) + self._add_holiday_apr_2(name) + if self._year <= 1937: + self._add_holiday_apr_3(name) + elif 1957 <= self._year <= 1988: + self._add_observed(self._add_holiday_apr_13(name)) elif 1989 <= self._year <= 1997: - dt = self._add_holiday_apr_12(songkran_festival) - self._add_holiday_apr_13(songkran_festival) - self._add_holiday_apr_14(songkran_festival) + dt = self._add_holiday_apr_12(name) + self._add_holiday_apr_13(name) + self._add_holiday_apr_14(name) else: - dt = self._add_holiday_apr_13(songkran_festival) - self._add_holiday_apr_14(songkran_festival) - self._add_holiday_apr_15(songkran_festival) + dt = self._add_holiday_apr_13(name) + self._add_holiday_apr_14(name) + self._add_holiday_apr_15(name) # วันหยุดชดเชยวันสงกรานต์ # If Songkran happened to be held on the weekends, only one in-lieu @@ -241,32 +341,70 @@ def _populate_public_holidays(self): # National Labor Day. self._add_observed(self._add_labor_day(tr("วันแรงงานแห่งชาติ"))) - # วันชาติ + # วันขอพระราชทานรัฐธรรมนูญ (1938-1939) + # วันชาติ (1940-Present) # Status: In-Use. - # Starts in 1939 (B.E. 2482) by Plaek Phibunsongkhram. - # Replaced by Rama IX's birthday in 1960 (B.E. 2503) by Sarit Thanarat. - # TODO: Add check for 1939 if we support earlier dates. - - # National Day. - national_day = tr("วันชาติ") - self._add_observed( - self._add_holiday_jun_24(national_day) - if self._year <= 1959 - else self._add_holiday_dec_5(national_day) - ) - - # วันฉัตรมงคล - # Starts in 1958 (B.E. 2501) for Rama IX's Coronation: May 5th. - # No celebration in 2017-2019 (B.E 2560-2562). - # Reestablished with Rama X's Coronation in 2020: May 4th. - - # Coronation Day. - coronation_day = tr("วันฉัตรมงคล") + # Started as Constitution Petition Day in 1938 (B.E. 2481) for JUN 24th. + # Got its current name in 1940 by Plaek Phibunsongkhram. + # This was observed JUN 23th-25th between 1940-1948. + # Moved to Rama IX's birthday in 1960 (B.E. 2503) by Sarit Thanarat. + + if self._year >= 1938: + name = ( + # National Day. + tr("วันชาติ") + if self._year >= 1939 + # Constitution Petition Day. + else tr("วันขอพระราชทานรัฐธรรมนูญ") + ) + self._add_observed( + self._add_holiday_jun_24(name) + if self._year <= 1959 + else self._add_holiday_dec_5(name) + ) + if 1940 <= self._year <= 1948 or 1952 <= self._year <= 1953: + self._add_holiday_jun_23(name) + self._add_holiday_jun_25(name) - if 1958 <= self._year <= 2016: - self._add_observed(self._add_holiday_may_5(coronation_day)) - elif self._year >= 2020: - self._add_observed(self._add_holiday_may_4(coronation_day)) + # วันรัฐธรรมนูญชั่วคราว + # Status: Defunct. + # Started in 1938, abandoned in 1940. + + if 1938 <= self._year <= 1939: + # Provisional Constitution Day. + self._add_holiday_jun_27(tr("วันรัฐธรรมนูญชั่วคราว")) + + # ทำบุญพระบรมอัษฐิ และพระราชพิธีฉัตรมงคล (1914-1925) + # พระราชพิธีฉัตรมงคล (1926-1937) + # วันฉัตรมงคล (1958-Present) + # First observed for Rama VI from 1914-1925 from NOV 9th-12th. + # For Rama VII (1926-1937) this was FEB 24th-26th. + # Even though Rama VII abdicated on MAR 2nd, 1935, there's no recorded + # change in terms of holiday arrangement until 1938. + # Starts in 1958 (B.E. 2501) for Rama IX's Coronation: MAY 5th. + # No celebration in 2017-2019 (B.E. 2560-2562). + # Reestablished with Rama X's Coronation in 2020: MAY 4th. + + if self._year <= 1937 or self._year >= 1958: + # Coronation Day. + name = tr("วันฉัตรมงคล") + if 1914 <= self._year <= 1925: + # Merit-making Ceremony for the Royal Ashes and the Coronation Day. + name = tr("ทำบุญพระบรมอัษฐิ และพระราชพิธีฉัตรมงคล") + self._add_holiday_nov_9(name) + self._add_holiday_nov_10(name) + self._add_holiday_nov_11(name) + self._add_holiday_nov_12(name) + if 1926 <= self._year <= 1937: + # Coronation Day. + name = tr("พระราชพิธีฉัตรมงคล") + self._add_holiday_feb_24(name) + self._add_holiday_feb_25(name) + self._add_holiday_feb_26(name) + elif 1958 <= self._year <= 2016: + self._add_observed(self._add_holiday_may_5(name)) + elif self._year >= 2020: + self._add_observed(self._add_holiday_may_4(name)) # วันเฉลิมพระชนมพรรษา พระราชินี # Status: In-Use. @@ -282,7 +420,7 @@ def _populate_public_holidays(self): # วันเฉลิมพระชนมพรรษา รัชกาลที่ 10 # Status: In-Use. - # Started in 2017 (B.E 2560). + # Started in 2017 (B.E. 2560). if self._year >= 2017: self._add_observed( @@ -295,7 +433,7 @@ def _populate_public_holidays(self): ) ) - # วันเฉลิมพระชนมพรรษา พระบรมราชินีนาถ ( 1976-2017) + # วันเฉลิมพระชนมพรรษา พระบรมราชินีนาถ (1976-2017) # วันเฉลิมพระชนมพรรษา พระบรมราชชนนีพันปีหลวง (2017-Present) # Status: In-Use. # Started in 1976 (B.E. 2519) alongside Mother's Day. @@ -315,79 +453,161 @@ def _populate_public_holidays(self): # วันแม่แห่งชาติ # Status: In-Use. - # Started 1950 (B.E 2493) initially as April 15 and cancelled in - # 1958 (B.E 2501) when the Min. of Culture was abolished. + # Started 1950 (B.E. 2493) initially as APR 15th and cancelled in + # 1958 (B.E. 2501) when the Min. of Culture was abolished. + # Its status as a Public Holiday was reaffirmed in 1956. # Restarts again in 1976 (B.E. 2519) on Queen Sirikit's Birthday - # (August 12) and stay that way from that point onwards. + # (AUG 12th) and stay that way from that point onwards. # National Mother's Day. - thai_mothers_day = tr("วันแม่แห่งชาติ") - + name = tr("วันแม่แห่งชาติ") if 1950 <= self._year <= 1957: - self._add_observed(self._add_holiday_apr_15(thai_mothers_day)) + self._add_observed(self._add_holiday_apr_15(name)) elif self._year >= 1976: - self._add_observed(self._add_holiday_aug_12(thai_mothers_day)) + self._add_observed(self._add_holiday_aug_12(name)) + + # วันประกาศสันติภาพ + # Status: Defunct. + # Started in 1946 (B.E. 2489), removed in 1948. + + if 1946 <= self._year <= 1947: + # Peace Proclamation Day. + self._add_holiday_aug_16(tr("วันประกาศสันติภาพ")) - # วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทร มหาภูมิพลอดุลยเดช บรมนาถบพิตร + # วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร (2017-2018) + # วันคล้ายวันสวรรคตพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร (2019-2022) + # วันนวมินทรมหาราช (2023-Present) # Status: In-Use. - # Started in 2017 (B.E 2560). + # Started in 2017 (B.E. 2560). # Got conferred with 'the Great' title in 2019 (B.E. 2562). if self._year >= 2017: if self._year >= 2023: # HM King Bhumibol Adulyadej Memorial Day. - k_bhumibol_memorial = tr("วันนวมินทรมหาราช") + name = tr("วันนวมินทรมหาราช") elif self._year >= 2019: # Anniversary for the Death of King Bhumibol Adulyadej the Great. - k_bhumibol_memorial = tr( + name = tr( "วันคล้ายวันสวรรคตพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" ) else: # Anniversary for the Death of King Bhumibol Adulyadej. - k_bhumibol_memorial = tr( - "วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" - ) - self._add_observed(self._add_holiday_oct_13(k_bhumibol_memorial)) + name = tr("วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร") + self._add_observed(self._add_holiday_oct_13(name)) - # วันปิยมหาราช + # ทำบุญพระบรมอัษฐิพระพุทธเจ้าหลวง (1914-1925) + # วันสวรรคตแห่งพระบาทสมเด็จพระพุทธเจ้าหลวง (1926-1937) + # วันปิยมหาราช (1946-Present) # Status: In-Use. - # Started in 1911 (B.E. 2454). - # TODO: Add check for 1911 if we support earlier dates. - - # HM King Chulalongkorn Memorial Day. - self._add_observed(self._add_holiday_oct_23(tr("วันปิยมหาราช"))) + # Started in 1914 (B.E. 2457). + # Was abandoned between 1938-1945. + + if self._year <= 1937 or self._year >= 1946: + if self._year >= 1946: + # HM King Chulalongkorn Memorial Day. + name = tr("วันปิยมหาราช") + elif self._year >= 1926: + # Anniversary for the Death of HM King Chulalongkorn. + name = tr("วันสวรรคตแห่งพระบาทสมเด็จพระพุทธเจ้าหลวง") + else: + # Merit-making Ceremony for the Royal Ashes of HM King Chulalongkorn. + name = tr("ทำบุญพระบรมอัษฐิพระพุทธเจ้าหลวง") + self._add_observed(self._add_holiday_oct_23(name)) + # วันสหประชาชาติ + # Status: Defunct. + # Added since 1951 (B.E. 2494), removed in 1957. + # Technically removed in 1954, but was re-added soon after. + + if 1951 <= self._year <= 1956: + # United Nations Day. + self._add_united_nations_day(tr("วันสหประชาชาติ")) + + # เฉลิมพระชนมพรรษา (1914-1925) + # เฉลิมพระชนม์พรรษา (1926-1937) + # วันเฉลิมพระชนม์พรรษา (1938-1940) + # วันเกิดในสมเด็จพระเจ้าอยู่หัว (1941-1944)** + # วันเฉลิมพระชนมพรรษา (1945-1959) # วันเฉลิมพระชนมพรรษา รัชกาลที่ 9 (1960-2016) # วันคล้ายวันเฉลิมพระชนมพรรษา รัชกาลที่ 9 (2017-Present) # Status: In-Use. - # Replaced Nataion Day (26 June) in 1960 (B.E. 2503) by Sarit Thanarat. - # Confirmed as still in-use in 2017. - # Got conferred with 'the Great' title in 2019 (B.E. 2562). + # Rama VI's Birthday was observed from DEC 30th-JAN 3rd between 1914-1925. + # Rama VII's Birthday was observed from NOV 7th-9th between 1926-1934. + # After Rama VII abdicated on MAR 2nd, 1935, there's no recorded + # change in terms of holiday arrangement until 1938, + # thus, a gap in holidays arrangement is assumed. + # Rama VIII's Birthday was observed on SEP 20th between 1938-1945. + # Between 1940-1945 the 2nd day (SEP 21st) was also observed as well. + # Rama IX's Birthday was observed from 1946-Present. + # Between 1946-1953 DEC 6th was also observed. From 1948 onwards DEC 4th + # was observed too except in 1951 when it was temporarily moved to DEC 7th. + # Replaced National Day (JUN 26th) in 1960 (B.E. 2503) by Sarit Thanarat. + # Confirmed as still in-use as Rama IX's in 2017. + # Rama IX got conferred with 'the Great' title in 2019 (B.E. 2562). + # For historical purpose, 1926-1940 entry uses the old spelling. + # **Official naming was override by "Birthday Name Decree" between 1941-1944. - if self._year >= 1960: - if self._year >= 2019: - k_bhumibol_bday = ( - # HM King Bhumibol Adulyadej's the Great's Birthday Anniversary. - tr( - "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรม" - "ชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" - ) - ) - elif self._year >= 2016: - k_bhumibol_bday = ( - # HM King Bhumibol Adulyadej Birthday Anniversary. - tr("วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร") - ) - else: - k_bhumibol_bday = ( - # HM King Bhumibol Adulyadej Birthday Anniversary. - tr("วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร") - ) - self._add_observed(self._add_holiday_dec_5(k_bhumibol_bday)) + if self._year >= 2019: + # HM King Bhumibol Adulyadej the Great's Birthday Anniversary. + name = tr( + "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร " + "มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" + ) + elif self._year >= 2016: + # HM King Bhumibol Adulyadej Birthday Anniversary. + name = tr("วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร") + elif self._year >= 1960: + # HM King Bhumibol Adulyadej Birthday Anniversary. + name = tr("วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร") + elif self._year >= 1945: + # The King's Birthday. + name = tr("วันเฉลิมพระชนมพรรษา") + elif self._year >= 1941: + # The King's Birthday. + name = tr("วันเกิดในสมเด็จพระเจ้าอยู่หัว") + elif self._year >= 1938: + # The King's Birthday. + name = tr("วันเฉลิมพระชนม์พรรษา") + elif self._year >= 1926: + # The King's Birthday. + name = tr("เฉลิมพระชนม์พรรษา") + else: + # The King's Birthday. + name = tr("เฉลิมพระชนมพรรษา") + + if self._year >= 1946: + # Rama IX (1946-2016; In Memoriam 2017-Present). + self._add_observed(self._add_holiday_dec_5(name)) + if self._year <= 1953: + self._add_holiday_dec_6(name) + if self._year == 1951: + self._add_holiday_dec_7(name) + elif self._year >= 1948: + self._add_holiday_dec_4(name) + elif self._year >= 1938: + # Rama VIII (1938*-1945). + # *There was no decree confirming his holiday until 1938. + self._add_holiday_sep_20(name) + if self._year >= 1940: + self._add_holiday_sep_21(name) + elif 1926 <= self._year <= 1934: + # Rama VII (1926-1934). + self._add_holiday_nov_7(name) + self._add_holiday_nov_8(name) + self._add_holiday_nov_9(name) + elif self._year <= 1925: + # Rama VI (1914-1925). + if self._year <= 1924: + self._add_holiday_dec_30(name) + self._add_holiday_dec_31(name) + if self._year >= 1915: + self._add_holiday_jan_1(name) + self._add_holiday_jan_2(name) + self._add_holiday_jan_3(name) # วันพ่อแห่งชาติ # Status: In-Use. - # Starts in 1980 (B.E 2523). + # Starts in 1980 (B.E. 2523). # Technically, a replication of HM King Bhumibol Adulyadej's Birthday # but it's in the official calendar, so may as well have this here. @@ -397,92 +617,147 @@ def _populate_public_holidays(self): # วันรัฐธรรมนูญ # Status: In-Use. - # Presumed to starts in 1932 (B.E. 2475). - # Last known official record is Bank of Thailand's in 1992 (B.E. 2535). - # TODO: Add check for 1932 if we support earlier dates. - - # Constitution Day. - self._add_observed(self._add_holiday_dec_10(tr("วันรัฐธรรมนูญ"))) + # Starts in 1938 (B.E. 2481). + # Initially as DEC 9th-11th, got trimmed down to DEC 10th in 1947. + # Readded Pre- and Post- holidays in 1950 before removed again in 1954. + + if self._year >= 1938: + # Constitution Day. + name = tr("วันรัฐธรรมนูญ") + self._add_observed(self._add_holiday_dec_10(name)) + if self._year <= 1947 or 1950 <= self._year <= 1953: + self._add_holiday_dec_9(name) + self._add_holiday_dec_11(name) # วันสิ้นปี # Status: In-Use. - # Presumed to start in the present form in 1941 (B.E. 2484). - # Last known official record is Bank of Thailand's in 1992 (B.E. 2535). - # TODO: Add check for 1941 if we support earlier dates. + # Started in 1941 (B.E. 2484; as part of New Year Holidays) + # Abandoned in 1957, presumed to restart in 1989. # This has its own in-lieu trigger. - # New Year's Eve. - name = tr("วันสิ้นปี") - self._add_new_years_eve(name) + if 1941 <= self._year <= 1956 or self._year >= 1989: + # New Year's Eve. + name = tr("วันสิ้นปี") + self._add_new_years_eve(name) - # วันหยุดชดเชยวันสิ้นปี - # Status: In-Use. - # Added separately from New Year's Eve itself so that it would't - # go over the next year. - # - CASE 1: SAT-SUN -> 1 in-lieu on TUE. - # - CASE 2: SUN-MON -> 1 in-lieu on TUE. - # See in lieu logic in `_add_observed(dt: date)`. + # วันหยุดชดเชยวันสิ้นปี + # Status: In-Use. + # Added separately from New Year's Eve itself so that it would't + # go over the next year. + # - CASE 1: SAT-SUN -> 1 in-lieu on TUE. + # - CASE 2: SUN-MON -> 1 in-lieu on TUE. + # See in lieu logic in `_add_observed(dt: date)`. - if self._year >= 1995 and self._year != 2024: - self._add_observed(date(self._year - 1, DEC, 31), name=name, rule=SAT_SUN_TO_NEXT_TUE) + if self._year >= 1995 and self._year != 2024: + self._add_observed( + date(self._year - 1, DEC, 31), name=name, rule=SAT_SUN_TO_NEXT_TUE + ) # Thai Lunar Calendar Holidays # See `_ThaiLunisolar` in holidays/utils.py for more details. - # Thai Lunar Calendar Holidays only work from 1941 to 2057. # วันมาฆบูชา # Status: In-Use. - - # Makha Bucha. - self._add_observed(self._add_makha_bucha(tr("วันมาฆบูชา"))) + # Started in 1915 (B.E. 2457**), not observed between 1926-1937. + # For historical purpose, pre-1925 entry uses the old spelling. + # **For pre-1941 data, Buddhist Era year starts on APR 1st. + + if 1915 <= self._year <= 1925 or self._year >= 1938: + name = ( + # Makha Bucha. + tr("วันมาฆบูชา") + if self._year >= 1938 + # Makha Bucha, the Fourfold Assembly Day. + else tr("มาฆบูชา จาตุรงฅ์สันนิบาต") + ) + self._add_observed(self._add_makha_bucha(name)) # วันวิสาขบูชา # Status: In-Use. + # Started in 1914 (B.E. 2457) with pre- and post- observance. + # From 1938-1953 only post- is added. + # For historical purpose, pre-1957 entry uses the old spelling. + # Note that the ones during Rama VII era uses ศ instead of ส. - # Visakha Bucha. - self._add_observed(self._add_visakha_bucha(tr("วันวิสาขบูชา"))) - - # วันอาสาฬหบูชา + if self._year >= 1957: + # Visakha Bucha. + name = tr("วันวิสาขบูชา") + elif self._year >= 1938: + # Visakha Bucha. + name = tr("วันวิสาขะบูชา") + elif self._year >= 1926: + # Visakha Bucha. + name = tr("วิศาขะบูชา") + else: + # Visakha Bucha. + name = tr("วิสาขะบูชา") + + dt = self._add_visakha_bucha(name) + if self._year <= 1953: + self._add_holiday(name, _timedelta(dt, +1)) + if self._year <= 1937: + self._add_holiday(name, _timedelta(dt, -1)) + else: + self._add_observed(dt) + + # วันเข้าพรรษา-วันอาสาฬหบูชา # Status: In-Use. + # - Started in 1914 (B.E. 2457) with Asarnha Bucha and pre-Asarnha Bucha observance. + # - From 1938-1953 only Asarnha Bucha is added. + # - 2nd, 3rd, 4th, and 5th day was also observed pre-1926. + # - Asarnha Bucha was re-added with its own name from 1962 onwards. + # For historical purpose, pre-1938 entry uses the old spelling. + # When used in combo with Asarnha Bucha Day. # - CASE 1: FRI-SAT -> 1 in-lieu on MON # - CASE 2: SAT-SUN -> 1 in-lieu on MON # - CASE 3: SUN-MON -> 1 in-lieu on TUE - self._add_observed( - # Asarnha Bucha. - self._add_asarnha_bucha(tr("วันอาสาฬหบูชา")), - rule=SAT_SUN_TO_NEXT_MON_TUE, + name = ( + # Buddhist Lent Day. + tr("วันเข้าพรรษา") + if self._year >= 1938 + # Buddhist Lent Day. + else tr("เข้าปุริมพรรษา") ) - - # วันเข้าพรรษา - # Status: In-Use. - # - CASE 1: FRI-SAT -> 1 in-lieu on MON - # - CASE 2: SAT-SUN -> 1 in-lieu on MON - # - CASE 3: SUN-MON -> 1 in-lieu on TUE - - # Buddhist Lent Day. - self._add_observed(self._add_khao_phansa(tr("วันเข้าพรรษา")), rule=SAT_TO_NEXT_MON) + dt = self._add_khao_phansa(name) + if self._year <= 1953: + self._add_asarnha_bucha(name) + if self._year <= 1937: + self._add_holiday(name, _timedelta(dt, -2)) + if self._year <= 1925: + self._add_holiday(name, _timedelta(dt, +1)) + self._add_holiday(name, _timedelta(dt, +2)) + self._add_holiday(name, _timedelta(dt, +3)) + self._add_holiday(name, _timedelta(dt, +4)) + else: + self._add_observed(dt, rule=SAT_TO_NEXT_MON) + if self._year >= 1962: + self._add_observed( + # Asarnha Bucha. + self._add_asarnha_bucha(tr("วันอาสาฬหบูชา")), + rule=SAT_SUN_TO_NEXT_MON_TUE, + ) def _populate_armed_forces_holidays(self): # วันกองทัพไทย # Status: In-Use. - # First started in 1959 on the foundation of Ministry of Defense Day (APR 8). - # Moved to JAN 25 (Supposedly King Naresuan's Decisive Battle) in 1980. - # Corrected to the battle's actual date (JAN 18) in 2007. + # First started in 1959 (B.E. 2502) on the Ministry of Defense Foundation Day (APR 8th). + # Moved to JAN 25th (Supposedly King Naresuan's Decisive Battle) in 1980. + # Corrected to the battle's actual date (JAN 18th) in 2007. # Only applys to members of the Royal Thai Armed Forces. if self._year >= 1959: # Royal Thai Armed Forces Day - armed_forces_day = tr("วันกองทัพไทย") + name = tr("วันกองทัพไทย") if self._year >= 2007: - self._add_holiday_jan_18(armed_forces_day) + self._add_holiday_jan_18(name) elif self._year >= 1980: - self._add_holiday_jan_25(armed_forces_day) + self._add_holiday_jan_25(name) else: - self._add_holiday_apr_8(armed_forces_day) + self._add_holiday_apr_8(name) def _populate_bank_holidays(self): - # Bank of Thailand, the ones who decreed this wasn't found until December 10, 1942 + # Bank of Thailand, the ones who decreed this wasn't found until DEC 10th, 1942. # So it's safe to assume with that as our start date. if self._year <= 1942: return None @@ -513,7 +788,8 @@ def _populate_government_holidays(self): # No Future Fixed Date Holidays # วันพืชมงคล - # Restarts in 1947 (B.E. 2490), wouldn't become an holiday again until 1960 (B.E. 2503). + # Restarts in 1947 (B.E. 2490), become holiday again between 1952- + # Become an holiday again until 1960 (B.E. 2503). # Removed as an holiday in 1999 due to financial crisis, reinstated in 2000. # No event was held in 2021 due to local Covid-19 situation, though it stays a day off. # Is dated on an annual basis by the Royal Palace, always on weekdays. @@ -521,7 +797,7 @@ def _populate_government_holidays(self): # this from 1966 onwards. For earlier records the date was refered as วันแรกนาขวัญ. # This isn't even fixed even by the Thai Lunar Calendar besides being in Month 6 # to concides with the rainy season, but instead by Court Astrologers; All chosen dates - # so far are all in the first three weeks of May. + # so far are all in the first three weeks of MAY. # *** NOTE: only observed by government sectors. # TODO: Update this annually around Dec of each year. @@ -679,7 +955,7 @@ def _populate_workday_holidays(self): # วันลอยกระทง # Status: In-Use. - # Started in 1941. + # Started in 1914. # Loy Krathong self._add_loy_krathong(tr("วันลอยกระทง")) @@ -694,7 +970,12 @@ class THA(Thailand): class ThailandStaticHolidays: - # วันหยุดพิเศษ (เพิ่มเติม) - see Bank of Thailand's DB for Cross-Check. + """ + วันหยุดพิเศษ (เพิ่มเติม) - see Bank of Thailand's DB for Cross-Check. + + Special Bank Holidays Pre-1992: + - `HM Queen Rambai Barni's Royal Cremation Ceremony. `_ + """ # Special In Lieu Holiday. thai_special_in_lieu_holidays = tr("วันหยุดชดเชย") @@ -705,27 +986,24 @@ class ThailandStaticHolidays: # Special Cases. - # HM King Bhumibol Adulyadej's Golden Jubilee. - rama_ix_golden_jubilee = tr("พระราชพิธีกาญจนาภิเษก พ.ศ. 2539") # HM King Bhumibol Adulyadej's 60th Anniversary of Accession Event. rama_ix_sixty_accession = tr("พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549") - # Emergency Lockdown (Thai Military Coup d'état). - thai_military_emergency_lockdown = tr("วันหยุดพิเศษ (คมช.)") # Emergency Lockdown (Thai Political Unrest). thai_political_emergency_lockdown = tr("วันหยุดพิเศษ (การเมือง)") # Emergency Lockdown (2011 Thailand Floods). thai_flood_2011_emergency_lockdown = tr("วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)") - # Day of Mourning for HM King Bhumibol Adulyadej. - rama_ix_mourning = tr("วันหยุดพิเศษ (ร่วมถวายอาลัย ส่งดวงพระวิญญาณพระบรมศพ)") - # HM King Bhumibol Adulyadej's Royal Cremation Ceremony. - rama_ix_cremation = tr("วันพระราชพิธีถวายพระเพลิงพระบรมศพพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช") - # HM King Maha Vajiralongkorn's Coronation Celebrations. - rama_x_coronation_celebrations = tr("พระราชพิธีบรมราชาภิเษก พระบาทสมเด็จพระวชิรเกล้าเจ้าอยู่หัว") # Songkran Festival. songkran_festival = tr("วันสงกรานต์") + special_bank_holidays = { + # HM Queen Rambai Barni's Royal Cremation Ceremony. + 1985: (APR, 9, tr("วันพระราชพิธีถวายพระเพลิงพระบรมศพสมเด็จพระนางเจ้ารำไพพรรณี")) + } special_public_holidays = { # 1992-1994 (include In Lieus, Checked with Bank of Thailand Data). + # 1995-1997 (Bank of Thailand Data). + # 1998-2000 (include In Lieus, Checked with Bank of Thailand Data). + # From 2001 Onwards (Checked with Bank of Thailand Data). 1992: ( (MAY, 18, thai_special_in_lieu_holidays), (DEC, 7, thai_special_in_lieu_holidays), @@ -743,9 +1021,8 @@ class ThailandStaticHolidays: (OCT, 24, thai_special_in_lieu_holidays), (DEC, 12, thai_special_in_lieu_holidays), ), - # 1995-1997 (Bank of Thailand Data). - 1996: (JUN, 10, rama_ix_golden_jubilee), - # 1998-2000 (include In Lieus, Checked with Bank of Thailand Data). + # HM King Bhumibol Adulyadej's Golden Jubilee. + 1996: (JUN, 10, tr("พระราชพิธีกาญจนาภิเษก พ.ศ. 2539")), 1998: ( (MAY, 11, thai_special_in_lieu_holidays), (DEC, 7, thai_special_in_lieu_holidays), @@ -763,13 +1040,13 @@ class ThailandStaticHolidays: (DEC, 11, thai_special_in_lieu_holidays), (DEC, 29, thai_election), ), - # From 2001 Onwards (Checked with Bank of Thailand Data). 2006: ( (APR, 19, thai_election), (JUN, 9, rama_ix_sixty_accession), (JUN, 12, rama_ix_sixty_accession), (JUN, 13, rama_ix_sixty_accession), - (SEP, 20, thai_military_emergency_lockdown), + # Emergency Lockdown (Thai Military Coup d'état). + (SEP, 20, tr("วันหยุดพิเศษ (คมช.)")), ), 2009: ( (JAN, 2, thai_bridge_public_holiday), @@ -801,10 +1078,13 @@ class ThailandStaticHolidays: 2016: ( (MAY, 6, thai_bridge_public_holiday), (JUL, 18, thai_bridge_public_holiday), - (OCT, 14, rama_ix_mourning), + # Day of Mourning for HM King Bhumibol Adulyadej. + (OCT, 14, tr("วันหยุดพิเศษ (ร่วมถวายอาลัย ส่งดวงพระวิญญาณพระบรมศพ)")), ), - 2017: (OCT, 26, rama_ix_cremation), - 2019: (MAY, 6, rama_x_coronation_celebrations), + # HM King Bhumibol Adulyadej's Royal Cremation Ceremony. + 2017: (OCT, 26, tr("วันพระราชพิธีถวายพระเพลิงพระบรมศพพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช")), + # HM King Maha Vajiralongkorn's Coronation Celebrations. + 2019: (MAY, 6, tr("พระราชพิธีบรมราชาภิเษก พระบาทสมเด็จพระวชิรเกล้าเจ้าอยู่หัว")), 2020: ( (NOV, 19, thai_bridge_public_holiday), (NOV, 20, thai_bridge_public_holiday), diff --git a/holidays/locale/en_US/LC_MESSAGES/TH.po b/holidays/locale/en_US/LC_MESSAGES/TH.po index 003e8c833..67751c1d9 100644 --- a/holidays/locale/en_US/LC_MESSAGES/TH.po +++ b/holidays/locale/en_US/LC_MESSAGES/TH.po @@ -14,17 +14,16 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.42\n" +"Project-Id-Version: Holidays 0.63\n" "POT-Creation-Date: 2023-03-18 15:58-0700\n" -"PO-Revision-Date: 2024-01-24 17:51+0200\n" -"Last-Translator: ~Jhellico \n" +"PO-Revision-Date: 2024-12-12 10:31+0700\n" +"Last-Translator: PPsyrius \n" "Language-Team: Holidays Localization Team\n" "Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.5\n" #. Special In Lieu Holiday. msgid "วันหยุดชดเชย" @@ -88,10 +87,35 @@ msgstr "New Year's Eve" msgid "วันเด็กแห่งชาติ" msgstr "National Children's Day" -#. Chakri Memorial Day. +#. Maha Chakri Memorial Day. +msgid "วันที่ระลึกมหาจักรี" +msgstr "Maha Chakri Memorial Day" + +#. Chakri Day. msgid "วันจักรี" +msgstr "Chakri Day" + +#. Chakri Memorial Day. +msgid "" +"วันพระบาทสมเด็จพระพุทธยอดฟ้าจุฬาโลกมหาราช และวันที่ระลึกมหาจักรีบรมราชวงศ์" msgstr "Chakri Memorial Day" +#. Songkran New Year Holidays. +msgid "พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์" +msgstr "Songkran New Year Holidays" + +#. Songkran New Year. +msgid "ตะรุษะสงกรานต์" +msgstr "Songkran New Year" + +#. Songkran New Year. +msgid "วันตรุษสงกรานต์" +msgstr "Songkran New Year" + +#. Songkran New Year. +msgid "วันตรุษสงกรานต์และขึ้นปีใหม่" +msgstr "Songkran New Year" + #. Songkran Festival. msgid "วันสงกรานต์" msgstr "Songkran Festival" @@ -100,10 +124,26 @@ msgstr "Songkran Festival" msgid "วันแรงงานแห่งชาติ" msgstr "National Labor Day" +#. Constitution Petition Day. +msgid "วันขอพระราชทานรัฐธรรมนูญ" +msgstr "Constitution Petition Day" + #. National Day. msgid "วันชาติ" msgstr "National Day" +#. Provisional Constitution Day. +msgid "วันรัฐธรรมนูญชั่วคราว" +msgstr "Provisional Constitution Day" + +#. Merit-making Ceremony for the Royal Ashes and the Coronation Day. +msgid "ทำบุญพระบรมอัษฐิ และพระราชพิธีฉัตรมงคล" +msgstr "Merit-making Ceremony for the Royal Ashes and the Coronation Day" + +#. Coronation Day. +msgid "พระราชพิธีฉัตรมงคล" +msgstr "Coronation Day" + #. Coronation Day. msgid "วันฉัตรมงคล" msgstr "Coronation Day" @@ -141,10 +181,42 @@ msgid "" "บรมนาถบพิตร" msgstr "HM King Bhumibol Adulyadej the Great Memorial Day" +#. HM King Bhumibol Adulyadej Memorial Day. +msgid "วันนวมินทรมหาราช" +msgstr "HM King Bhumibol Adulyadej Memorial Day" + +#. Merit-making Ceremony for the Royal Ashes of HM King Chulalongkorn. +msgid "ทำบุญพระบรมอัษฐิพระพุทธเจ้าหลวง" +msgstr "Merit-making Ceremony for the Royal Ashes of HM King Chulalongkorn" + +#. Anniversary for the Death of HM King Chulalongkorn. +msgid "วันสวรรคตแห่งพระบาทสมเด็จพระพุทธเจ้าหลวง" +msgstr "Anniversary for the Death of HM King Chulalongkorn" + #. HM King Chulalongkorn Memorial Day. msgid "วันปิยมหาราช" msgstr "HM King Chulalongkorn Memorial Day" +#. The King's Birthday. +msgid "เฉลิมพระชนมพรรษา" +msgstr "The King's Birthday" + +#. The King's Birthday. +msgid "เฉลิมพระชนม์พรรษา" +msgstr "The King's Birthday" + +#. The King's Birthday. +msgid "วันเฉลิมพระชนม์พรรษา" +msgstr "The King's Birthday" + +#. The King's Birthday. +msgid "วันเกิดในสมเด็จพระเจ้าอยู่หัว" +msgstr "The King's Birthday" + +#. The King's Birthday. +msgid "วันเฉลิมพระชนมพรรษา" +msgstr "The King's Birthday" + #. HM King Bhumibol Adulyadej Birthday Anniversary. msgid "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" msgstr "HM King Bhumibol Adulyadej's Birthday" @@ -155,7 +227,7 @@ msgid "" "บรมนาถบพิตร" msgstr "HM King Bhumibol Adulyadej's Birthday" -#. HM King Bhumibol Adulyadej's the Great's Birthday Anniversary. +#. HM King Bhumibol Adulyadej the Great's Birthday Anniversary. msgid "" "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร " "มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" @@ -169,10 +241,26 @@ msgstr "National Father's Day" msgid "วันรัฐธรรมนูญ" msgstr "Constitution Day" +#. Makha Bucha, the Fourfold Assembly Day. +msgid "มาฆบูชา จาตุรงฅ์สันนิบาต" +msgstr "Makha Bucha, the Fourfold Assembly Day" + #. Makha Bucha. msgid "วันมาฆบูชา" msgstr "Makha Bucha" +#. Visakha Bucha. +msgid "วิสาขะบูชา" +msgstr "Visakha Bucha" + +#. Visakha Bucha. +msgid "วิศาขะบูชา" +msgstr "Visakha Bucha" + +#. Visakha Bucha. +msgid "วันวิสาขะบูชา" +msgstr "Visakha Bucha" + #. Visakha Bucha. msgid "วันวิสาขบูชา" msgstr "Visakha Bucha" @@ -181,6 +269,10 @@ msgstr "Visakha Bucha" msgid "วันอาสาฬหบูชา" msgstr "Asarnha Bucha" +#. Buddhist Lent Day. +msgid "เข้าปุริมพรรษา" +msgstr "Buddhist Lent Day" + #. Buddhist Lent Day. msgid "วันเข้าพรรษา" msgstr "Buddhist Lent Day" @@ -245,6 +337,18 @@ msgstr "HM King Ramkamhaeng Memorial Day" msgid "วันพระราชทานธงชาติไทย" msgstr "Thai National Flag Day" -#. HM King Bhumibol Adulyadej Memorial Day. -msgid "วันนวมินทรมหาราช" -msgstr "HM King Bhumibol Adulyadej Memorial Day" +#. Franco-Thai War Armistice Day. +msgid "วันลงนามในสัญญาพักรบระหว่างประเทศไทยกับประเทศอินโดจีนฝรั่งเศส" +msgstr "Franco-Thai War Armistice Day" + +#. Peace Proclamation Day. +msgid "วันประกาศสันติภาพ" +msgstr "Peace Proclamation Day" + +#. United Nations Day. +msgid "วันสหประชาชาติ" +msgstr "United Nations Day" + +#. HM Queen Rambai Barni's Royal Cremation Ceremony. +msgid "วันพระราชพิธีถวายพระเพลิงพระบรมศพสมเด็จพระนางเจ้ารำไพพรรณี" +msgstr "HM Queen Rambai Barni's Royal Cremation Ceremony" diff --git a/holidays/locale/th/LC_MESSAGES/TH.po b/holidays/locale/th/LC_MESSAGES/TH.po index 41b736673..1f143a27e 100644 --- a/holidays/locale/th/LC_MESSAGES/TH.po +++ b/holidays/locale/th/LC_MESSAGES/TH.po @@ -14,17 +14,16 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.39\n" +"Project-Id-Version: Holidays 0.63\n" "POT-Creation-Date: 2023-03-02 00:37+0700\n" -"PO-Revision-Date: 2023-11-30 21:09+0200\n" -"Last-Translator: ~Jhellico \n" +"PO-Revision-Date: 2024-12-12 10:31+0700\n" +"Last-Translator: PPsyrius \n" "Language-Team: Holidays Localization Team\n" "Language: th\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.5\n" #. Special In Lieu Holiday. msgid "วันหยุดชดเชย" @@ -88,10 +87,35 @@ msgstr "" msgid "วันเด็กแห่งชาติ" msgstr "" -#. Chakri Memorial Day. +#. Maha Chakri Memorial Day. +msgid "วันที่ระลึกมหาจักรี" +msgstr "" + +#. Chakri Day. msgid "วันจักรี" msgstr "" +#. Chakri Memorial Day. +msgid "" +"วันพระบาทสมเด็จพระพุทธยอดฟ้าจุฬาโลกมหาราช และวันที่ระลึกมหาจักรีบรมราชวงศ์" +msgstr "" + +#. Songkran New Year Holidays. +msgid "พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์" +msgstr "" + +#. Songkran New Year. +msgid "ตะรุษะสงกรานต์" +msgstr "" + +#. Songkran New Year. +msgid "วันตรุษสงกรานต์" +msgstr "" + +#. Songkran New Year. +msgid "วันตรุษสงกรานต์และขึ้นปีใหม่" +msgstr "" + #. Songkran Festival. msgid "วันสงกรานต์" msgstr "" @@ -100,10 +124,26 @@ msgstr "" msgid "วันแรงงานแห่งชาติ" msgstr "" +#. Constitution Petition Day. +msgid "วันขอพระราชทานรัฐธรรมนูญ" +msgstr "" + #. National Day. msgid "วันชาติ" msgstr "" +#. Provisional Constitution Day. +msgid "วันรัฐธรรมนูญชั่วคราว" +msgstr "" + +#. Merit-making Ceremony for the Royal Ashes and the Coronation Day. +msgid "ทำบุญพระบรมอัษฐิ และพระราชพิธีฉัตรมงคล" +msgstr "" + +#. Coronation Day. +msgid "พระราชพิธีฉัตรมงคล" +msgstr "" + #. Coronation Day. msgid "วันฉัตรมงคล" msgstr "" @@ -141,10 +181,42 @@ msgid "" "บรมนาถบพิตร" msgstr "" +#. HM King Bhumibol Adulyadej Memorial Day. +msgid "วันนวมินทรมหาราช" +msgstr "" + +#. Merit-making Ceremony for the Royal Ashes of HM King Chulalongkorn. +msgid "ทำบุญพระบรมอัษฐิพระพุทธเจ้าหลวง" +msgstr "" + +#. Anniversary for the Death of HM King Chulalongkorn. +msgid "วันสวรรคตแห่งพระบาทสมเด็จพระพุทธเจ้าหลวง" +msgstr "" + #. HM King Chulalongkorn Memorial Day. msgid "วันปิยมหาราช" msgstr "" +#. The King's Birthday. +msgid "เฉลิมพระชนมพรรษา" +msgstr "" + +#. The King's Birthday. +msgid "เฉลิมพระชนม์พรรษา" +msgstr "" + +#. The King's Birthday. +msgid "วันเฉลิมพระชนม์พรรษา" +msgstr "" + +#. The King's Birthday. +msgid "วันเกิดในสมเด็จพระเจ้าอยู่หัว" +msgstr "" + +#. The King's Birthday. +msgid "วันเฉลิมพระชนมพรรษา" +msgstr "" + #. HM King Bhumibol Adulyadej Birthday Anniversary. msgid "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" msgstr "" @@ -155,7 +227,7 @@ msgid "" "บรมนาถบพิตร" msgstr "" -#. HM King Bhumibol Adulyadej's the Great's Birthday Anniversary. +#. HM King Bhumibol Adulyadej the Great's Birthday Anniversary. msgid "" "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร " "มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" @@ -169,10 +241,26 @@ msgstr "" msgid "วันรัฐธรรมนูญ" msgstr "" +#. Makha Bucha, the Fourfold Assembly Day. +msgid "มาฆบูชา จาตุรงฅ์สันนิบาต" +msgstr "" + #. Makha Bucha. msgid "วันมาฆบูชา" msgstr "" +#. Visakha Bucha. +msgid "วิสาขะบูชา" +msgstr "" + +#. Visakha Bucha. +msgid "วิศาขะบูชา" +msgstr "" + +#. Visakha Bucha. +msgid "วันวิสาขะบูชา" +msgstr "" + #. Visakha Bucha. msgid "วันวิสาขบูชา" msgstr "" @@ -181,6 +269,10 @@ msgstr "" msgid "วันอาสาฬหบูชา" msgstr "" +#. Buddhist Lent Day. +msgid "เข้าปุริมพรรษา" +msgstr "" + #. Buddhist Lent Day. msgid "วันเข้าพรรษา" msgstr "" @@ -243,6 +335,18 @@ msgstr "" msgid "วันพระราชทานธงชาติไทย" msgstr "" -#. HM King Bhumibol Adulyadej Memorial Day. -msgid "วันนวมินทรมหาราช" +#. Franco-Thai War Armistice Day. +msgid "วันลงนามในสัญญาพักรบระหว่างประเทศไทยกับประเทศอินโดจีนฝรั่งเศส" +msgstr "" + +#. Peace Proclamation Day. +msgid "วันประกาศสันติภาพ" +msgstr "" + +#. United Nations Day. +msgid "วันสหประชาชาติ" +msgstr "" + +#. HM Queen Rambai Barni's Royal Cremation Ceremony. +msgid "วันพระราชพิธีถวายพระเพลิงพระบรมศพสมเด็จพระนางเจ้ารำไพพรรณี" msgstr "" diff --git a/snapshots/countries/TH_COMMON.json b/snapshots/countries/TH_COMMON.json index 565f2affe..35fe9a282 100644 --- a/snapshots/countries/TH_COMMON.json +++ b/snapshots/countries/TH_COMMON.json @@ -1,117 +1,156 @@ { "1950-01-01": "New Year's Day", + "1950-01-02": "New Year's Day", "1950-02-03": "Thai Veterans Day", "1950-03-03": "Makha Bucha", "1950-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1950-04-06": "Chakri Memorial Day", + "1950-04-06": "Chakri Day", "1950-04-13": "Songkran Festival", "1950-04-14": "Songkran Festival", "1950-04-15": "National Mother's Day; Songkran Festival", "1950-05-31": "Visakha Bucha", + "1950-06-01": "Visakha Bucha", "1950-06-24": "National Day", "1950-07-01": "Mid-Year Closing Day", - "1950-07-29": "Asarnha Bucha", + "1950-07-29": "Buddhist Lent Day", "1950-07-30": "Buddhist Lent Day", "1950-10-23": "HM King Chulalongkorn Memorial Day", "1950-11-24": "Loy Krathong", + "1950-12-04": "The King's Birthday", + "1950-12-05": "The King's Birthday", + "1950-12-06": "The King's Birthday", + "1950-12-09": "Constitution Day", "1950-12-10": "Constitution Day", + "1950-12-11": "Constitution Day", "1950-12-31": "New Year's Eve", "1951-01-01": "New Year's Day", + "1951-01-02": "New Year's Day", "1951-02-03": "Thai Veterans Day", "1951-02-21": "Makha Bucha", "1951-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1951-04-06": "Chakri Memorial Day", + "1951-04-06": "Chakri Day", "1951-04-13": "Songkran Festival", "1951-04-14": "Songkran Festival", "1951-04-15": "National Mother's Day; Songkran Festival", "1951-05-20": "Visakha Bucha", + "1951-05-21": "Visakha Bucha", "1951-06-24": "National Day", "1951-07-01": "Mid-Year Closing Day", - "1951-07-18": "Asarnha Bucha", + "1951-07-18": "Buddhist Lent Day", "1951-07-19": "Buddhist Lent Day", "1951-10-23": "HM King Chulalongkorn Memorial Day", + "1951-10-24": "United Nations Day", "1951-11-13": "Loy Krathong", + "1951-12-05": "The King's Birthday", + "1951-12-06": "The King's Birthday", + "1951-12-07": "The King's Birthday", + "1951-12-09": "Constitution Day", "1951-12-10": "Constitution Day", + "1951-12-11": "Constitution Day", "1951-12-31": "New Year's Eve", "1952-01-01": "New Year's Day", + "1952-01-02": "New Year's Day", "1952-02-03": "Thai Veterans Day", "1952-02-10": "Makha Bucha", "1952-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1952-04-06": "Chakri Memorial Day", + "1952-04-06": "Chakri Day", "1952-04-13": "Songkran Festival", "1952-04-14": "Songkran Festival", "1952-04-15": "National Mother's Day; Songkran Festival", "1952-05-08": "Visakha Bucha", + "1952-05-09": "Visakha Bucha", + "1952-06-23": "National Day", "1952-06-24": "National Day", + "1952-06-25": "National Day", "1952-07-01": "Mid-Year Closing Day", - "1952-07-07": "Asarnha Bucha", + "1952-07-07": "Buddhist Lent Day", "1952-07-08": "Buddhist Lent Day", "1952-10-23": "HM King Chulalongkorn Memorial Day", + "1952-10-24": "United Nations Day", "1952-11-02": "Loy Krathong", + "1952-12-04": "The King's Birthday", + "1952-12-05": "The King's Birthday", + "1952-12-06": "The King's Birthday", + "1952-12-09": "Constitution Day", "1952-12-10": "Constitution Day", + "1952-12-11": "Constitution Day", "1952-12-31": "New Year's Eve", "1953-01-01": "New Year's Day", + "1953-01-02": "New Year's Day", "1953-02-03": "Thai Veterans Day", "1953-02-28": "Makha Bucha", "1953-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1953-04-06": "Chakri Memorial Day", + "1953-04-06": "Chakri Day", "1953-04-13": "Songkran Festival", "1953-04-14": "Songkran Festival", "1953-04-15": "National Mother's Day; Songkran Festival", "1953-05-28": "Visakha Bucha", + "1953-05-29": "Visakha Bucha", + "1953-06-23": "National Day", "1953-06-24": "National Day", + "1953-06-25": "National Day", "1953-07-01": "Mid-Year Closing Day", - "1953-07-26": "Asarnha Bucha", + "1953-07-26": "Buddhist Lent Day", "1953-07-27": "Buddhist Lent Day", "1953-10-23": "HM King Chulalongkorn Memorial Day", + "1953-10-24": "United Nations Day", "1953-11-21": "Loy Krathong", + "1953-12-04": "The King's Birthday", + "1953-12-05": "The King's Birthday", + "1953-12-06": "The King's Birthday", + "1953-12-09": "Constitution Day", "1953-12-10": "Constitution Day", + "1953-12-11": "Constitution Day", "1953-12-31": "New Year's Eve", "1954-01-01": "New Year's Day", + "1954-01-02": "New Year's Day", "1954-02-03": "Thai Veterans Day", "1954-02-18": "Makha Bucha", "1954-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1954-04-06": "Chakri Memorial Day", + "1954-04-06": "Chakri Day", "1954-04-15": "National Mother's Day", "1954-05-17": "Visakha Bucha", "1954-06-24": "National Day", "1954-07-01": "Mid-Year Closing Day", - "1954-07-15": "Asarnha Bucha", "1954-07-16": "Buddhist Lent Day", "1954-10-23": "HM King Chulalongkorn Memorial Day", + "1954-10-24": "United Nations Day", "1954-11-10": "Loy Krathong", + "1954-12-05": "The King's Birthday", "1954-12-10": "Constitution Day", "1954-12-31": "New Year's Eve", "1955-01-01": "New Year's Day", "1955-02-03": "Thai Veterans Day", "1955-02-07": "Makha Bucha", "1955-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1955-04-06": "Chakri Memorial Day", + "1955-04-06": "Chakri Day", "1955-04-15": "National Mother's Day", "1955-05-06": "Visakha Bucha", "1955-06-24": "National Day", "1955-07-01": "Mid-Year Closing Day", - "1955-07-04": "Asarnha Bucha", "1955-07-05": "Buddhist Lent Day", "1955-10-03": "National Children's Day", "1955-10-23": "HM King Chulalongkorn Memorial Day", + "1955-10-24": "United Nations Day", "1955-10-30": "Loy Krathong", + "1955-12-05": "The King's Birthday", "1955-12-10": "Constitution Day", "1955-12-31": "New Year's Eve", "1956-01-01": "New Year's Day", "1956-02-03": "Thai Veterans Day", "1956-02-25": "Makha Bucha", "1956-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1956-04-06": "Chakri Memorial Day", + "1956-04-06": "Chakri Day", "1956-04-15": "National Mother's Day", "1956-05-24": "Visakha Bucha", "1956-06-24": "National Day", "1956-07-01": "Mid-Year Closing Day", - "1956-07-22": "Asarnha Bucha", "1956-07-23": "Buddhist Lent Day", "1956-10-01": "National Children's Day", "1956-10-23": "HM King Chulalongkorn Memorial Day", + "1956-10-24": "United Nations Day", "1956-11-17": "Loy Krathong", + "1956-12-05": "The King's Birthday", "1956-12-10": "Constitution Day", "1956-12-31": "New Year's Eve", "1957-01-01": "New Year's Day", @@ -119,90 +158,84 @@ "1957-02-03": "Thai Veterans Day", "1957-02-14": "Makha Bucha", "1957-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1957-04-06": "Chakri Memorial Day", + "1957-04-06": "Chakri Day", "1957-04-13": "Songkran Festival", "1957-04-15": "National Mother's Day", "1957-05-13": "Visakha Bucha", "1957-06-24": "National Day", "1957-07-01": "Mid-Year Closing Day", - "1957-07-12": "Asarnha Bucha", "1957-07-13": "Buddhist Lent Day", "1957-10-07": "National Children's Day", "1957-10-23": "HM King Chulalongkorn Memorial Day", "1957-11-07": "Loy Krathong", + "1957-12-05": "The King's Birthday", "1957-12-10": "Constitution Day", - "1957-12-31": "New Year's Eve", "1958-01-01": "New Year's Day", "1958-01-16": "Teacher's Day", "1958-02-03": "Thai Veterans Day", "1958-03-05": "Makha Bucha", "1958-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1958-04-06": "Chakri Memorial Day", + "1958-04-06": "Chakri Day", "1958-04-13": "Songkran Festival", "1958-05-05": "Coronation Day", "1958-06-02": "Visakha Bucha", "1958-06-24": "National Day", "1958-07-01": "Mid-Year Closing Day", - "1958-07-31": "Asarnha Bucha", "1958-08-01": "Buddhist Lent Day", "1958-10-06": "National Children's Day", "1958-10-23": "HM King Chulalongkorn Memorial Day", "1958-11-26": "Loy Krathong", + "1958-12-05": "The King's Birthday", "1958-12-10": "Constitution Day", - "1958-12-31": "New Year's Eve", "1959-01-01": "New Year's Day", "1959-01-16": "Teacher's Day", "1959-02-03": "Thai Veterans Day", "1959-02-23": "Makha Bucha", "1959-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1959-04-06": "Chakri Memorial Day", + "1959-04-06": "Chakri Day", "1959-04-08": "Royal Thai Armed Forces Day", "1959-04-13": "Songkran Festival", "1959-05-05": "Coronation Day", "1959-05-22": "Visakha Bucha", "1959-06-24": "National Day", "1959-07-01": "Mid-Year Closing Day", - "1959-07-20": "Asarnha Bucha", "1959-07-21": "Buddhist Lent Day", "1959-10-05": "National Children's Day", "1959-10-23": "HM King Chulalongkorn Memorial Day", "1959-11-15": "Loy Krathong", + "1959-12-05": "The King's Birthday", "1959-12-10": "Constitution Day", - "1959-12-31": "New Year's Eve", "1960-01-01": "New Year's Day", "1960-01-16": "Teacher's Day", "1960-02-03": "Thai Veterans Day", "1960-02-12": "Makha Bucha", "1960-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1960-04-06": "Chakri Memorial Day", + "1960-04-06": "Chakri Day", "1960-04-08": "Royal Thai Armed Forces Day", "1960-04-13": "Songkran Festival", "1960-05-02": "Royal Ploughing Ceremony", "1960-05-05": "Coronation Day", "1960-05-10": "Visakha Bucha", "1960-07-01": "Mid-Year Closing Day", - "1960-07-08": "Asarnha Bucha", "1960-07-09": "Buddhist Lent Day", "1960-10-03": "National Children's Day", "1960-10-23": "HM King Chulalongkorn Memorial Day", "1960-11-03": "Loy Krathong", "1960-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1960-12-10": "Constitution Day", - "1960-12-31": "New Year's Eve", "1961-01-01": "New Year's Day", "1961-01-02": "New Year's Day (in lieu)", "1961-01-16": "Teacher's Day", "1961-02-03": "Thai Veterans Day", "1961-03-01": "Makha Bucha", "1961-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1961-04-06": "Chakri Memorial Day", + "1961-04-06": "Chakri Day", "1961-04-08": "Royal Thai Armed Forces Day", "1961-04-13": "Songkran Festival", "1961-05-05": "Coronation Day", "1961-05-11": "Royal Ploughing Ceremony", "1961-05-29": "Visakha Bucha", "1961-07-01": "Mid-Year Closing Day", - "1961-07-27": "Asarnha Bucha", "1961-07-28": "Buddhist Lent Day", "1961-10-02": "National Children's Day", "1961-10-23": "HM King Chulalongkorn Memorial Day", @@ -210,13 +243,12 @@ "1961-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1961-12-10": "Constitution Day", "1961-12-11": "Constitution Day (in lieu)", - "1961-12-31": "New Year's Eve", "1962-01-01": "New Year's Day", "1962-01-16": "Teacher's Day", "1962-02-03": "Thai Veterans Day", "1962-02-19": "Makha Bucha", "1962-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1962-04-06": "Chakri Memorial Day", + "1962-04-06": "Chakri Day", "1962-04-08": "Royal Thai Armed Forces Day", "1962-04-13": "Songkran Festival", "1962-05-05": "Coronation Day", @@ -230,14 +262,13 @@ "1962-11-11": "Loy Krathong", "1962-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1962-12-10": "Constitution Day", - "1962-12-31": "New Year's Eve", "1963-01-01": "New Year's Day", "1963-01-16": "Teacher's Day", "1963-02-03": "Thai Veterans Day", "1963-02-08": "Makha Bucha", "1963-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1963-04-06": "Chakri Memorial Day", - "1963-04-08": "Chakri Memorial Day (in lieu); Royal Thai Armed Forces Day", + "1963-04-06": "Chakri Day", + "1963-04-08": "Chakri Day (in lieu); Royal Thai Armed Forces Day", "1963-04-13": "Songkran Festival", "1963-04-15": "Songkran Festival (in lieu)", "1963-05-05": "Coronation Day", @@ -253,13 +284,12 @@ "1963-11-01": "Loy Krathong", "1963-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1963-12-10": "Constitution Day", - "1963-12-31": "New Year's Eve", "1964-01-01": "New Year's Day", "1964-01-16": "Teacher's Day", "1964-02-03": "Thai Veterans Day", "1964-02-27": "Makha Bucha", "1964-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1964-04-06": "Chakri Memorial Day", + "1964-04-06": "Chakri Day", "1964-04-08": "Royal Thai Armed Forces Day", "1964-04-13": "Songkran Festival", "1964-05-05": "Coronation Day", @@ -274,14 +304,13 @@ "1964-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1964-12-07": "HM King Bhumibol Adulyadej's Birthday (in lieu); National Day (in lieu)", "1964-12-10": "Constitution Day", - "1964-12-31": "New Year's Eve", "1965-01-01": "New Year's Day", "1965-01-09": "National Children's Day", "1965-01-16": "Teacher's Day", "1965-02-03": "Thai Veterans Day", "1965-02-16": "Makha Bucha", "1965-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1965-04-06": "Chakri Memorial Day", + "1965-04-06": "Chakri Day", "1965-04-08": "Royal Thai Armed Forces Day", "1965-04-13": "Songkran Festival", "1965-05-05": "Coronation Day", @@ -297,7 +326,6 @@ "1965-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1965-12-06": "HM King Bhumibol Adulyadej's Birthday (in lieu); National Day (in lieu)", "1965-12-10": "Constitution Day", - "1965-12-31": "New Year's Eve", "1966-01-01": "New Year's Day", "1966-01-03": "New Year's Day (in lieu)", "1966-01-08": "National Children's Day", @@ -306,7 +334,7 @@ "1966-03-06": "Makha Bucha", "1966-03-07": "Makha Bucha (in lieu)", "1966-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1966-04-06": "Chakri Memorial Day", + "1966-04-06": "Chakri Day", "1966-04-08": "Royal Thai Armed Forces Day", "1966-04-13": "Songkran Festival", "1966-05-05": "Coronation Day", @@ -321,7 +349,6 @@ "1966-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1966-12-10": "Constitution Day", "1966-12-12": "Constitution Day (in lieu)", - "1966-12-31": "New Year's Eve", "1967-01-01": "New Year's Day", "1967-01-02": "New Year's Day (in lieu)", "1967-01-14": "National Children's Day", @@ -329,7 +356,7 @@ "1967-02-03": "Thai Veterans Day", "1967-02-24": "Makha Bucha", "1967-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1967-04-06": "Chakri Memorial Day", + "1967-04-06": "Chakri Day", "1967-04-08": "Royal Thai Armed Forces Day", "1967-04-13": "Songkran Festival", "1967-05-05": "Coronation Day", @@ -344,15 +371,14 @@ "1967-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1967-12-10": "Constitution Day", "1967-12-11": "Constitution Day (in lieu)", - "1967-12-31": "New Year's Eve", "1968-01-01": "New Year's Day", "1968-01-13": "National Children's Day", "1968-01-16": "Teacher's Day", "1968-02-03": "Thai Veterans Day", "1968-02-13": "Makha Bucha", "1968-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1968-04-06": "Chakri Memorial Day", - "1968-04-08": "Chakri Memorial Day (in lieu); Royal Thai Armed Forces Day", + "1968-04-06": "Chakri Day", + "1968-04-08": "Chakri Day (in lieu); Royal Thai Armed Forces Day", "1968-04-13": "Songkran Festival", "1968-04-15": "Songkran Festival (in lieu)", "1968-05-05": "Coronation Day", @@ -367,7 +393,6 @@ "1968-11-04": "Loy Krathong", "1968-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1968-12-10": "Constitution Day", - "1968-12-31": "New Year's Eve", "1969-01-01": "New Year's Day", "1969-01-11": "National Children's Day", "1969-01-16": "Teacher's Day", @@ -375,8 +400,8 @@ "1969-03-02": "Makha Bucha", "1969-03-03": "Makha Bucha (in lieu)", "1969-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1969-04-06": "Chakri Memorial Day", - "1969-04-07": "Chakri Memorial Day (in lieu)", + "1969-04-06": "Chakri Day", + "1969-04-07": "Chakri Day (in lieu)", "1969-04-08": "Royal Thai Armed Forces Day", "1969-04-13": "Songkran Festival", "1969-04-14": "Songkran Festival (in lieu)", @@ -390,14 +415,13 @@ "1969-11-23": "Loy Krathong", "1969-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1969-12-10": "Constitution Day", - "1969-12-31": "New Year's Eve", "1970-01-01": "New Year's Day", "1970-01-10": "National Children's Day", "1970-01-16": "Teacher's Day", "1970-02-03": "Thai Veterans Day", "1970-02-20": "Makha Bucha", "1970-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1970-04-06": "Chakri Memorial Day", + "1970-04-06": "Chakri Day", "1970-04-08": "Royal Thai Armed Forces Day", "1970-04-13": "Songkran Festival", "1970-05-05": "Coronation Day", @@ -412,14 +436,13 @@ "1970-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1970-12-07": "HM King Bhumibol Adulyadej's Birthday (in lieu); National Day (in lieu)", "1970-12-10": "Constitution Day", - "1970-12-31": "New Year's Eve", "1971-01-01": "New Year's Day", "1971-01-09": "National Children's Day", "1971-01-16": "Teacher's Day", "1971-02-03": "Thai Veterans Day", "1971-02-10": "Makha Bucha", "1971-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1971-04-06": "Chakri Memorial Day", + "1971-04-06": "Chakri Day", "1971-04-08": "Royal Thai Armed Forces Day", "1971-04-13": "Songkran Festival", "1971-05-05": "Coronation Day", @@ -435,7 +458,6 @@ "1971-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1971-12-06": "HM King Bhumibol Adulyadej's Birthday (in lieu); National Day (in lieu)", "1971-12-10": "Constitution Day", - "1971-12-31": "New Year's Eve", "1972-01-01": "New Year's Day", "1972-01-03": "New Year's Day (in lieu)", "1972-01-08": "National Children's Day", @@ -443,7 +465,7 @@ "1972-02-03": "Thai Veterans Day", "1972-02-28": "Makha Bucha", "1972-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1972-04-06": "Chakri Memorial Day", + "1972-04-06": "Chakri Day", "1972-04-08": "Royal Thai Armed Forces Day", "1972-04-13": "Songkran Festival", "1972-05-05": "Coronation Day", @@ -458,7 +480,6 @@ "1972-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1972-12-10": "Constitution Day", "1972-12-11": "Constitution Day (in lieu)", - "1972-12-31": "New Year's Eve", "1973-01-01": "New Year's Day", "1973-01-13": "National Children's Day", "1973-01-16": "Teacher's Day", @@ -466,7 +487,7 @@ "1973-02-17": "Makha Bucha", "1973-02-19": "Makha Bucha (in lieu)", "1973-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1973-04-06": "Chakri Memorial Day", + "1973-04-06": "Chakri Day", "1973-04-08": "Royal Thai Armed Forces Day", "1973-04-13": "Songkran Festival", "1973-05-05": "Coronation Day", @@ -480,14 +501,13 @@ "1973-11-10": "Loy Krathong", "1973-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1973-12-10": "Constitution Day", - "1973-12-31": "New Year's Eve", "1974-01-01": "New Year's Day", "1974-01-12": "National Children's Day", "1974-01-16": "Teacher's Day", "1974-02-03": "Thai Veterans Day", "1974-02-07": "Makha Bucha", "1974-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1974-04-06": "Chakri Memorial Day", + "1974-04-06": "Chakri Day", "1974-04-08": "Royal Thai Armed Forces Day", "1974-04-13": "Songkran Festival", "1974-05-01": "National Labor Day", @@ -501,14 +521,13 @@ "1974-10-30": "Loy Krathong", "1974-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1974-12-10": "Constitution Day", - "1974-12-31": "New Year's Eve", "1975-01-01": "New Year's Day", "1975-01-11": "National Children's Day", "1975-01-16": "Teacher's Day", "1975-02-03": "Thai Veterans Day", "1975-02-25": "Makha Bucha", "1975-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1975-04-06": "Chakri Memorial Day", + "1975-04-06": "Chakri Day", "1975-04-08": "Royal Thai Armed Forces Day", "1975-04-13": "Songkran Festival", "1975-05-01": "National Labor Day", @@ -522,14 +541,13 @@ "1975-11-18": "Loy Krathong", "1975-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1975-12-10": "Constitution Day", - "1975-12-31": "New Year's Eve", "1976-01-01": "New Year's Day", "1976-01-10": "National Children's Day", "1976-01-16": "Teacher's Day", "1976-02-03": "Thai Veterans Day", "1976-02-15": "Makha Bucha", "1976-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1976-04-06": "Chakri Memorial Day", + "1976-04-06": "Chakri Day", "1976-04-08": "Royal Thai Armed Forces Day", "1976-04-13": "Songkran Festival", "1976-05-01": "National Labor Day", @@ -544,14 +562,13 @@ "1976-11-06": "Loy Krathong", "1976-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1976-12-10": "Constitution Day", - "1976-12-31": "New Year's Eve", "1977-01-01": "New Year's Day", "1977-01-08": "National Children's Day", "1977-01-16": "Teacher's Day", "1977-02-03": "Thai Veterans Day", "1977-03-04": "Makha Bucha", "1977-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1977-04-06": "Chakri Memorial Day", + "1977-04-06": "Chakri Day", "1977-04-08": "Royal Thai Armed Forces Day", "1977-04-13": "Songkran Festival", "1977-05-01": "National Labor Day", @@ -566,14 +583,13 @@ "1977-11-25": "Loy Krathong", "1977-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1977-12-10": "Constitution Day", - "1977-12-31": "New Year's Eve", "1978-01-01": "New Year's Day", "1978-01-14": "National Children's Day", "1978-01-16": "Teacher's Day", "1978-02-03": "Thai Veterans Day", "1978-02-22": "Makha Bucha", "1978-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1978-04-06": "Chakri Memorial Day", + "1978-04-06": "Chakri Day", "1978-04-08": "Royal Thai Armed Forces Day", "1978-04-13": "Songkran Festival", "1978-05-01": "National Labor Day", @@ -588,14 +604,13 @@ "1978-11-14": "Loy Krathong", "1978-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1978-12-10": "Constitution Day", - "1978-12-31": "New Year's Eve", "1979-01-01": "New Year's Day", "1979-01-13": "National Children's Day", "1979-01-16": "Teacher's Day", "1979-02-03": "Thai Veterans Day", "1979-02-11": "Makha Bucha", "1979-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1979-04-06": "Chakri Memorial Day", + "1979-04-06": "Chakri Day", "1979-04-08": "Royal Thai Armed Forces Day", "1979-04-13": "Songkran Festival", "1979-05-01": "National Labor Day", @@ -610,7 +625,6 @@ "1979-11-04": "Loy Krathong", "1979-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day", "1979-12-10": "Constitution Day", - "1979-12-31": "New Year's Eve", "1980-01-01": "New Year's Day", "1980-01-12": "National Children's Day", "1980-01-16": "Teacher's Day", @@ -618,7 +632,7 @@ "1980-02-03": "Thai Veterans Day", "1980-03-01": "Makha Bucha", "1980-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1980-04-06": "Chakri Memorial Day", + "1980-04-06": "Chakri Day", "1980-04-13": "Songkran Festival", "1980-05-01": "National Labor Day", "1980-05-05": "Coronation Day", @@ -632,7 +646,6 @@ "1980-11-22": "Loy Krathong", "1980-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1980-12-10": "Constitution Day", - "1980-12-31": "New Year's Eve", "1981-01-01": "New Year's Day", "1981-01-10": "National Children's Day", "1981-01-16": "Teacher's Day", @@ -640,7 +653,7 @@ "1981-02-03": "Thai Veterans Day", "1981-02-19": "Makha Bucha", "1981-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1981-04-06": "Chakri Memorial Day", + "1981-04-06": "Chakri Day", "1981-04-13": "Songkran Festival", "1981-05-01": "National Labor Day", "1981-05-05": "Coronation Day", @@ -654,7 +667,6 @@ "1981-11-11": "Loy Krathong", "1981-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1981-12-10": "Constitution Day", - "1981-12-31": "New Year's Eve", "1982-01-01": "New Year's Day", "1982-01-09": "National Children's Day", "1982-01-16": "Teacher's Day", @@ -662,7 +674,7 @@ "1982-02-03": "Thai Veterans Day", "1982-02-08": "Makha Bucha", "1982-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", - "1982-04-06": "Chakri Memorial Day", + "1982-04-06": "Chakri Day", "1982-04-13": "Songkran Festival", "1982-05-01": "National Labor Day", "1982-05-05": "Coronation Day", @@ -677,7 +689,6 @@ "1982-10-31": "Loy Krathong", "1982-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1982-12-10": "Constitution Day", - "1982-12-31": "New Year's Eve", "1983-01-01": "New Year's Day", "1983-01-08": "National Children's Day", "1983-01-16": "Teacher's Day", @@ -700,7 +711,6 @@ "1983-11-19": "Loy Krathong", "1983-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1983-12-10": "Constitution Day", - "1983-12-31": "New Year's Eve", "1984-01-01": "New Year's Day", "1984-01-14": "National Children's Day", "1984-01-16": "Teacher's Day", @@ -723,7 +733,6 @@ "1984-11-07": "Loy Krathong", "1984-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1984-12-10": "Constitution Day", - "1984-12-31": "New Year's Eve", "1985-01-01": "New Year's Day", "1985-01-12": "National Children's Day", "1985-01-16": "Teacher's Day", @@ -733,6 +742,7 @@ "1985-03-05": "Makha Bucha", "1985-04-01": "Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives", "1985-04-06": "Chakri Memorial Day", + "1985-04-09": "HM Queen Rambai Barni's Royal Cremation Ceremony", "1985-04-13": "Songkran Festival", "1985-05-01": "National Labor Day", "1985-05-05": "Coronation Day", @@ -747,7 +757,6 @@ "1985-11-26": "Loy Krathong", "1985-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1985-12-10": "Constitution Day", - "1985-12-31": "New Year's Eve", "1986-01-01": "New Year's Day", "1986-01-11": "National Children's Day", "1986-01-16": "Teacher's Day", @@ -771,7 +780,6 @@ "1986-11-15": "Loy Krathong", "1986-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1986-12-10": "Constitution Day", - "1986-12-31": "New Year's Eve", "1987-01-01": "New Year's Day", "1987-01-10": "National Children's Day", "1987-01-16": "Teacher's Day", @@ -795,7 +803,6 @@ "1987-11-05": "Loy Krathong", "1987-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1987-12-10": "Constitution Day", - "1987-12-31": "New Year's Eve", "1988-01-01": "New Year's Day", "1988-01-09": "National Children's Day", "1988-01-16": "Teacher's Day", @@ -819,7 +826,6 @@ "1988-11-23": "Loy Krathong", "1988-12-05": "HM King Bhumibol Adulyadej's Birthday; National Day; National Father's Day", "1988-12-10": "Constitution Day", - "1988-12-31": "New Year's Eve", "1989-01-01": "New Year's Day", "1989-01-14": "National Children's Day", "1989-01-16": "Teacher's Day", diff --git a/tests/countries/test_thailand.py b/tests/countries/test_thailand.py index d8f0121d0..5b609bb4d 100644 --- a/tests/countries/test_thailand.py +++ b/tests/countries/test_thailand.py @@ -20,14 +20,14 @@ class TestThailand(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - support_range = range(1941, 2050) + support_range = range(1914, 2050) super().setUpClass(Thailand, years=support_range, years_non_observed=support_range) def test_country_aliases(self): self.assertAliases(Thailand, TH, THA) def test_no_holidays(self): - self.assertNoHolidays(Thailand(years=1940, categories=(PUBLIC, WORKDAY))) + self.assertNoHolidays(Thailand(years=1913, categories=(PUBLIC, WORKDAY))) self.assertNoHolidays(Thailand(years=1942, categories=BANK)) self.assertNoHolidays(Thailand(years=1956, categories=(GOVERNMENT, SCHOOL))) self.assertNoHolidays(Thailand(years=1958, categories=ARMED_FORCES)) @@ -120,7 +120,14 @@ def test_special_holidays(self): def test_new_years_day(self): name = "วันขึ้นปีใหม่" + self.assertHolidayName(name, (f"{year}-01-01" for year in range(1941, 2050))) + self.assertHolidayName( + name, + (f"{year}-01-02" for year in range(1941, 1945)), + (f"{year}-01-02" for year in range(1948, 1954)), + ) + self.assertNoHolidayName(name, range(1914, 1941)) self.assertNoNonObservedHoliday( "2011-01-03", @@ -155,11 +162,28 @@ def test_national_childrens_day(self): "2025-01-11", ) self.assertHolidayName(name, dt) - self.assertNoHolidayName(name, range(1941, 1955), 1964) + self.assertNoHolidayName(name, range(1914, 1955), 1964) + + def test_franco_thai_war_armistice_day(self): + name = "วันลงนามในสัญญาพักรบระหว่างประเทศไทยกับประเทศอินโดจีนฝรั่งเศส" + self.assertHolidayName(name, (f"{year}-01-28" for year in range(1942, 1945))) + self.assertNoHolidayName(name, range(1914, 1942), range(1945, 2050)) def test_chakri_memorial_day(self): - name = "วันจักรี" - self.assertHolidayName(name, (f"{year}-04-06" for year in range(1941, 2050))) + name_maha_chakri = "วันที่ระลึกมหาจักรี" + name_chakri = "วันจักรี" + name_rama_one = "วันพระบาทสมเด็จพระพุทธยอดฟ้าจุฬาโลกมหาราช และวันที่ระลึกมหาจักรีบรมราชวงศ์" + years_pre = range(1914, 1926) + years_maha_chakri = range(1926, 1938) + years_chakri = range(1938, 1983) + years_rama_one = range(1983, 2050) + + self.assertHolidayName(name_maha_chakri, (f"{year}-04-06" for year in years_maha_chakri)) + self.assertHolidayName(name_chakri, (f"{year}-04-06" for year in years_chakri)) + self.assertHolidayName(name_rama_one, (f"{year}-04-06" for year in years_rama_one)) + self.assertNoHolidayName(name_maha_chakri, years_pre, years_chakri, years_rama_one) + self.assertNoHolidayName(name_chakri, years_pre, years_maha_chakri, years_rama_one) + self.assertNoHolidayName(name_rama_one, years_pre, years_maha_chakri, years_chakri) self.assertNoNonObservedHoliday( "2013-04-08", @@ -171,18 +195,37 @@ def test_chakri_memorial_day(self): ) def test_songkran_festival(self): - name = "วันสงกรานต์" + name_1914 = "พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์" + name_1926 = "ตะรุษะสงกรานต์" + name_1938 = "วันตรุษสงกรานต์" + name_1939 = "วันตรุษสงกรานต์และขึ้นปีใหม่" + name_1948 = "วันสงกรานต์" + + # MAR 28 - APR 15 + for year in range(1914, 1926): + self.assertHolidayName(name_1914, (f"{year}-03-28", f"{year}-04-01", f"{year}-04-15")) + self.assertNoHolidayName(name_1914, range(1926, 2050)) + # MAR 31 - APR 3 + for year in range(1926, 1938): + self.assertHolidayName(name_1926, (f"{year}-03-31", f"{year}-04-01", f"{year}-04-03")) + self.assertNoHolidayName(name_1926, range(1914, 1926), range(1938, 2050)) + # MAR 28 - APR 2 + for year in range(1938, 1940): + self.assertHolidayName(name_1938, (f"{year}-03-31", f"{year}-04-01", f"{year}-04-02")) + self.assertHolidayName(name_1939, "1940-03-31", "1940-04-01", "1940-04-02") + self.assertNoHolidayName(name_1938, range(1914, 1938), range(1940, 2050)) + self.assertNoHolidayName(name_1939, range(1914, 1940), range(1941, 2050)) # APR 13-14-15 for year in [*range(1948, 1954), *range(1998, 2020), *range(2021, 2050)]: - self.assertHolidayName(name, (f"{year}-04-13", f"{year}-04-14", f"{year}-04-15")) + self.assertHolidayName(name_1948, (f"{year}-04-13", f"{year}-04-14", f"{year}-04-15")) # APR 12-13-14 for year in range(1989, 1998): - self.assertHolidayName(name, (f"{year}-04-12", f"{year}-04-13", f"{year}-04-14")) + self.assertHolidayName(name_1948, (f"{year}-04-12", f"{year}-04-13", f"{year}-04-14")) # APR 13 - self.assertHolidayName(name, (f"{year}-04-13" for year in range(1957, 1989))) + self.assertHolidayName(name_1948, (f"{year}-04-13" for year in range(1957, 1989))) # None (2020 is special_public_holidays instead) - self.assertNoHolidayName(name, "2020-04-13", "2020-04-14", "2020-04-15") - self.assertNoHolidayName(name, range(1941, 1948), range(1954, 1957)) + self.assertNoHolidayName(name_1948, "2020-04-13", "2020-04-14", "2020-04-15") + self.assertNoHolidayName(name_1948, range(1914, 1948), range(1954, 1957)) self.assertNoNonObservedHoliday( "2012-04-16", @@ -202,8 +245,9 @@ def test_songkran_festival(self): def test_national_labour_day(self): name = "วันแรงงานแห่งชาติ" + self.assertHolidayName(name, (f"{year}-05-01" for year in range(1974, 2050))) - self.assertNoHolidayName(name, range(1941, 1974)) + self.assertNoHolidayName(name, range(1914, 1974)) self.assertNoNonObservedHoliday( "2010-05-03", @@ -215,10 +259,21 @@ def test_national_labour_day(self): ) def test_coronation_day(self): - name = "วันฉัตรมงคล" - self.assertHolidayName(name, (f"{year}-05-05" for year in range(1958, 2017))) - self.assertHolidayName(name, (f"{year}-05-04" for year in range(2020, 2050))) - self.assertNoHolidayName(name, range(1941, 1958), range(2017, 2020)) + name_1914 = "ทำบุญพระบรมอัษฐิ และพระราชพิธีฉัตรมงคล" + name_1926 = "พระราชพิธีฉัตรมงคล" + name_1958 = "วันฉัตรมงคล" + + for year in range(1914, 1925): + self.assertHolidayName( + name_1914, (f"{year}-11-09", f"{year}-11-10", f"{year}-11-11", f"{year}-11-12") + ) + self.assertNoHolidayName(name_1914, range(1926, 2050)) + for year in range(1926, 1938): + self.assertHolidayName(name_1926, (f"{year}-02-24", f"{year}-02-25", f"{year}-02-26")) + self.assertNoHolidayName(name_1926, range(1914, 1926), range(1938, 2050)) + self.assertHolidayName(name_1958, (f"{year}-05-05" for year in range(1958, 2017))) + self.assertHolidayName(name_1958, (f"{year}-05-04" for year in range(2020, 2050))) + self.assertNoHolidayName(name_1958, range(1914, 1958), range(2017, 2020)) self.assertNoNonObservedHoliday( "2012-05-07", @@ -230,8 +285,9 @@ def test_coronation_day(self): def test_queen_suthida_birthday(self): name = "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสุทิดา พัชรสุธาพิมลลักษณ พระบรมราชินี" + self.assertHolidayName(name, (f"{year}-06-03" for year in range(2019, 2050))) - self.assertNoHolidayName(name, range(1941, 2019)) + self.assertNoHolidayName(name, range(1914, 2019)) self.assertNoNonObservedHoliday( "2023-06-05", @@ -240,17 +296,36 @@ def test_queen_suthida_birthday(self): ) def test_national_day(self): - name = "วันชาติ" - self.assertHolidayName(name, (f"{year}-06-24" for year in range(1941, 1960))) - self.assertHolidayName(name, (f"{year}-12-05" for year in range(1960, 2050))) + name_1938 = "วันขอพระราชทานรัฐธรรมนูญ" + name_1939 = "วันชาติ" + + self.assertHolidayName(name_1938, "1938-06-24") + for year in [*range(1940, 1948), *range(1952, 1954)]: + self.assertHolidayName(name_1939, (f"{year}-06-23", f"{year}-06-24", f"{year}-06-25")) + self.assertHolidayName( + name_1939, + "1939-06-24", + (f"{year}-06-24" for year in range(1948, 1952)), + (f"{year}-06-24" for year in range(1954, 1960)), + ) + self.assertHolidayName(name_1939, (f"{year}-12-05" for year in range(1960, 2050))) + self.assertNoHolidayName(name_1938, range(1914, 1938), range(1939, 2050)) + self.assertNoHolidayName(name_1939, range(1914, 1939)) # No in lieus during its existense on June 24th # 1960+ In lieus are same as HM King Bhumibol Adulyadej's Birthday + def test_provisional_constitution_day(self): + name = "วันรัฐธรรมนูญชั่วคราว" + + self.assertHolidayName(name, (f"{year}-06-27" for year in range(1938, 1940))) + self.assertNoHolidayName(name, range(1914, 1938), range(1940, 2050)) + def test_rama_x_birthday(self): name = "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรเมนทรรามาธิบดีศรีสินทรมหาวชิราลงกรณ พระวชิรเกล้าเจ้าอยู่หัว" + self.assertHolidayName(name, (f"{year}-07-28" for year in range(2017, 2050))) - self.assertNoHolidayName(name, range(1941, 2017)) + self.assertNoHolidayName(name, range(1914, 2017)) self.assertNoNonObservedHoliday( "2018-07-30", @@ -263,7 +338,7 @@ def test_rama_x_birthday(self): def test_queen_sirikit_birthday(self): name_ix = "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถ" name_x = "วันเฉลิมพระชนมพรรษาสมเด็จพระบรมราชชนนีพันปีหลวง" - years_pre = range(1941, 1976) + years_pre = range(1914, 1976) years_ix = range(1976, 2017) years_x = range(2017, 2050) @@ -286,16 +361,21 @@ def test_national_mothers_day(self): self.assertHolidayName(name, (f"{year}-04-15" for year in range(1950, 1958))) self.assertHolidayName(name, (f"{year}-08-12" for year in range(1976, 2050))) - self.assertNoHolidayName(name, range(1941, 1950), range(1958, 1976)) + self.assertNoHolidayName(name, range(1914, 1950), range(1958, 1976)) # April 15 (1950-1958) exists prior to in lieu laws # In lieus are same as HM Queen Sirikit's Birthday + def test_peace_proclamation_day(self): + name = "วันประกาศสันติภาพ" + self.assertHolidayName(name, (f"{year}-08-16" for year in range(1946, 1948))) + self.assertNoHolidayName(name, range(1914, 1946), range(1948, 2050)) + def test_rama_ix_memorial_day(self): name_ix = "วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" name_x = "วันคล้ายวันสวรรคตพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" name_x_memorial = "วันนวมินทรมหาราช" - years_pre = range(1941, 2017) + years_pre = range(1914, 2017) years_ix = range(2017, 2019) years_x = range(2019, 2023) years_x_memorial = range(2023, 2050) @@ -316,8 +396,20 @@ def test_rama_ix_memorial_day(self): ) def test_rama_five_memorial_day(self): - name = "วันปิยมหาราช" - self.assertHolidayName(name, (f"{year}-10-23" for year in range(1941, 2050))) + name_ashes = "ทำบุญพระบรมอัษฐิพระพุทธเจ้าหลวง" + name_death = "วันสวรรคตแห่งพระบาทสมเด็จพระพุทธเจ้าหลวง" + name_memorial = "วันปิยมหาราช" + years_ashes = range(1914, 1926) + years_death = range(1926, 1938) + years_none = range(1938, 1946) + years_memorial = range(1946, 2050) + + self.assertHolidayName(name_ashes, (f"{year}-10-23" for year in years_ashes)) + self.assertHolidayName(name_death, (f"{year}-10-23" for year in years_death)) + self.assertHolidayName(name_memorial, (f"{year}-10-23" for year in years_memorial)) + self.assertNoHolidayName(name_ashes, years_death, years_none, years_memorial) + self.assertNoHolidayName(name_death, years_ashes, years_none, years_memorial) + self.assertNoHolidayName(name_memorial, years_ashes, years_death, years_none) self.assertNoNonObservedHoliday( "2010-10-25", @@ -328,23 +420,54 @@ def test_rama_five_memorial_day(self): "2027-10-25", ) - def test_rama_ix_birthday(self): - name_reign = "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" - name_dead = "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" - name_great = ( + def test_united_nations_day(self): + name = "วันสหประชาชาติ" + self.assertHolidayName(name, (f"{year}-10-24" for year in range(1951, 1957))) + self.assertNoHolidayName(name, range(1914, 1951), range(1957, 2050)) + + def test_rama_vi_to_ix_birthday(self): + name_1914 = "เฉลิมพระชนมพรรษา" + name_1926 = "เฉลิมพระชนม์พรรษา" + name_1938 = "วันเฉลิมพระชนม์พรรษา" + name_1941 = "วันเกิดในสมเด็จพระเจ้าอยู่หัว" + name_1945 = "วันเฉลิมพระชนมพรรษา" + name_1960 = "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" + name_2016 = "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" + name_2019 = ( "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" ) - years_pre = range(1941, 1960) - years_reign = range(1960, 2016) - years_dead = range(2016, 2019) - years_great = range(2019, 2050) - self.assertHolidayName(name_reign, (f"{year}-12-05" for year in years_reign)) - self.assertHolidayName(name_dead, (f"{year}-12-05" for year in years_dead)) - self.assertHolidayName(name_great, (f"{year}-12-05" for year in years_great)) - self.assertNoHolidayName(name_reign, years_pre, years_dead, years_great) - self.assertNoHolidayName(name_dead, years_pre, years_reign, years_great) - self.assertNoHolidayName(name_great, years_pre, years_reign, years_dead) + # Rama VI. + for year in range(1914, 1925): + self.assertHolidayName(name_1914, (f"{year}-12-30", f"{year}-12-31")) + for year in range(1915, 1926): + self.assertHolidayName(name_1914, (f"{year}-01-01", f"{year}-01-02", f"{year}-01-03")) + # Rama VII. + for year in range(1926, 1935): + self.assertHolidayName(name_1926, (f"{year}-11-07", f"{year}-11-08", f"{year}-11-09")) + # Rama VIII. + self.assertHolidayName(name_1938, (f"{year}-09-20" for year in range(1938, 1940))) + self.assertHolidayName(name_1938, "1940-09-20", "1940-09-21") + for year in range(1941, 1945): + self.assertHolidayName(name_1941, (f"{year}-09-20", f"{year}-09-21")) + self.assertHolidayName(name_1945, "1945-09-20", "1945-09-21") + # Rama IX. + for year in range(1946, 1948): + self.assertHolidayName(name_1945, (f"{year}-12-05", f"{year}-12-06")) + for year in [*range(1948, 1951), *range(1952, 1954)]: + self.assertHolidayName(name_1945, (f"{year}-12-04", f"{year}-12-05", f"{year}-12-06")) + self.assertHolidayName(name_1945, "1951-12-05", "1951-12-06", "1951-12-07") + self.assertHolidayName(name_1960, (f"{year}-12-05" for year in range(1960, 2016))) + self.assertHolidayName(name_2016, (f"{year}-12-05" for year in range(2016, 2019))) + self.assertHolidayName(name_2019, (f"{year}-12-05" for year in range(2019, 2050))) + self.assertNoHolidayName(name_1914, range(1926, 2050)) + self.assertNoHolidayName(name_1926, range(1914, 1926), range(1935, 2050)) + self.assertNoHolidayName(name_1938, range(1914, 1938), range(1941, 2050)) + self.assertNoHolidayName(name_1941, range(1914, 1941), range(1945, 2050)) + self.assertNoHolidayName(name_1945, range(1914, 1945), range(1960, 2050)) + self.assertNoHolidayName(name_1960, range(1914, 1960), range(2016, 2050)) + self.assertNoHolidayName(name_2016, range(1914, 2016), range(2019, 2050)) + self.assertNoHolidayName(name_2019, range(1914, 2019)) self.assertNoNonObservedHoliday( "2010-12-06", @@ -360,13 +483,21 @@ def test_national_fathers_day(self): # This concides with HM King Bhumibol Adulyadej's Birthday self.assertHolidayName(name, (f"{year}-12-05" for year in range(1980, 2050))) - self.assertNoHolidayName(name, range(1941, 1980)) + self.assertNoHolidayName(name, range(1914, 1980)) # In lieus are same as HM King Bhumibol Adulyadej's Birthday def test_constitution_day(self): name = "วันรัฐธรรมนูญ" - self.assertHolidayName(name, (f"{year}-12-10" for year in range(1941, 2050))) + + for year in [*range(1938, 1948), *range(1950, 1954)]: + self.assertHolidayName(name, (f"{year}-12-09", f"{year}-12-10", f"{year}-12-11")) + self.assertHolidayName( + name, + (f"{year}-12-10" for year in range(1948, 1950)), + (f"{year}-12-10" for year in range(1954, 2050)), + ) + self.assertNoHolidayName(name, range(1914, 1938)) self.assertNoNonObservedHoliday( "2011-12-12", @@ -379,7 +510,13 @@ def test_constitution_day(self): def test_new_years_eve(self): name = "วันสิ้นปี" - self.assertHolidayName(name, (f"{year}-12-31" for year in range(1941, 2050))) + + self.assertHolidayName( + name, + (f"{year}-12-31" for year in range(1941, 1957)), + (f"{year}-12-31" for year in range(1989, 2050)), + ) + self.assertNoHolidayName(name, range(1914, 1941), range(1957, 1989)) self.assertNoNonObservedHoliday( "2012-01-03", @@ -389,30 +526,51 @@ def test_new_years_eve(self): "2029-01-02", ) - def test_buddhist_holidays_in_lieu(self): + def test_makha_bucha(self): + self.assertNoHolidayName("มาฆบูชา จาตุรงฅ์สันนิบาต", 1914, range(1938, 2050)) + self.assertNoHolidayName("วันมาฆบูชา", range(1914, 1938)) + self.assertNoNonObservedHoliday( - # Makha Bucha "2010-03-01", "2017-02-13", "2020-02-10", "2024-02-26", "2024-02-22", "2030-02-18", - # Visakha Bucha + ) + + def test_visakha_bucha(self): + self.assertNoHolidayName("วิสาขะบูชา", range(1926, 2050)) + self.assertNoHolidayName("วิศาขะบูชา", range(1914, 1926), range(1938, 2050)) + self.assertNoHolidayName("วันวิสาขะบูชา", range(1914, 1938), range(1957, 2050)) + self.assertNoHolidayName("วันวิสาขบูชา", range(1914, 1957)) + + self.assertNoNonObservedHoliday( "2019-05-20", "2022-05-16", "2023-06-05", "2025-05-12", "2026-06-01", "2029-05-28", - # Asarnha Bucha + ) + + def test_asarnha_bucha(self): + self.assertNoHolidayName("วันอาสาฬหบูชา", range(1914, 1962)) + + self.assertNoNonObservedHoliday( "2017-07-10", "2020-07-07", "2021-07-26", "2024-07-22", "2027-07-20", "2030-07-16", - # Khao Phansa + ) + + def test_buddhist_lent_day(self): + self.assertNoHolidayName("เข้าปุริมพรรษา", range(1938, 2050)) + self.assertNoHolidayName("วันเข้าพรรษา", range(1914, 1938)) + + self.assertNoNonObservedHoliday( "2011-07-18", "2014-07-14", "2018-07-30", @@ -420,6 +578,7 @@ def test_buddhist_holidays_in_lieu(self): def test_raeknakhwan(self): name = "วันพืชมงคล" + dt = ( "1960-05-02", "1961-05-11", @@ -495,6 +654,7 @@ def test_raeknakhwan(self): def test_armed_forces_holiday(self): name = "วันกองทัพไทย" + armed_forces_holidays = Thailand(categories=ARMED_FORCES, years=range(1958, 2050)) self.assertHolidayName( name, armed_forces_holidays, (f"{year}-04-08" for year in range(1959, 1980)) @@ -511,6 +671,7 @@ def test_armed_forces_holiday(self): def test_bank_holiday(self): name_agri = "วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร" name_mid = "วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ" + bank_holidays = Thailand(categories=BANK, years=range(1942, 2023)) self.assertHolidayName( name_agri, bank_holidays, (f"{year}-04-01" for year in range(1943, 2022)) @@ -525,6 +686,7 @@ def test_bank_holiday(self): def test_school_holiday(self): name = "วันครู" + school_holidays = Thailand(categories=SCHOOL, years=range(1956, 2050)) self.assertHolidayName( name, school_holidays, (f"{year}-01-16" for year in range(1957, 2050)) @@ -639,7 +801,7 @@ def test_l10n_default(self): ("2022-02-16", "วันมาฆบูชา"), ("2022-02-26", "วันศิลปินแห่งชาติ"), ("2022-03-08", "วันสตรีสากล"), - ("2022-04-06", "วันจักรี"), + ("2022-04-06", "วันพระบาทสมเด็จพระพุทธยอดฟ้าจุฬาโลกมหาราช และวันที่ระลึกมหาจักรีบรมราชวงศ์"), ("2022-04-13", "วันสงกรานต์"), ("2022-04-14", "วันสงกรานต์"), ("2022-04-15", "วันสงกรานต์"), From 2785a4a51328e1602dfda45bff240437673445a4 Mon Sep 17 00:00:00 2001 From: PPsyrius <19505219+PPsyrius@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:46:42 +0700 Subject: [PATCH 3/5] Fixed up any remaining reference to the old start date --- holidays/calendars/thai.py | 8 ++++---- holidays/countries/thailand.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/holidays/calendars/thai.py b/holidays/calendars/thai.py index e668969b2..510fc8fc0 100644 --- a/holidays/calendars/thai.py +++ b/holidays/calendars/thai.py @@ -250,9 +250,9 @@ class _ThaiLunisolar: } # While Buddhist Holy Days have been observed since the 1900s - # Due to the calendar changes in 1941 (B.E. 2484) and that - # our array only goes up to B.E. 2700; We'll thus only populate - # the data for 1941-2157 (B.E. 2484-2700). + # Thailand's Public Holiday Act wasn't codified until 1914 (B.E. 2457) + # and that our array only goes up to B.E. 2700; We'll thus only populate + # the data for 1914-2157 (B.E. 2457-2700). # Sources: หนังสือเวียนกรมการปกครอง กระทรวงมหาดไทย มท 0310.1/ว4 5 ก.พ. 2539 START_DATE = date(1913, 11, 28) START_YEAR = 1914 @@ -286,7 +286,7 @@ def _get_start_date(self, year: int) -> Optional[date]: Calculate the start date of that particular Thai Lunar Calendar Year. This usually falls in November or December of the previous Gregorian year in question. Should the year be outside of working scope - (1941-2157: B.E 2484-2700), this will returns None instead. + (1914-2157: B.E 2457-2700), this will returns None instead. :param year: The Gregorian year. diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index 9d6366d77..da4da1565 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -788,7 +788,8 @@ def _populate_government_holidays(self): # No Future Fixed Date Holidays # วันพืชมงคล - # Restarts in 1947 (B.E. 2490), become holiday again between 1952- + # Restarts in 1947 (B.E. 2490), become holiday again since 1952 + # but since we lacked the exact date records, this will be ignored. # Become an holiday again until 1960 (B.E. 2503). # Removed as an holiday in 1999 due to financial crisis, reinstated in 2000. # No event was held in 2021 due to local Covid-19 situation, though it stays a day off. From c4e2b4b6e9273bbcc37ab04e2cbd4115c8c4d959 Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Sat, 14 Dec 2024 09:58:06 +0700 Subject: [PATCH 4/5] Update holidays/countries/thailand.py Co-authored-by: ~Jhellico --- holidays/countries/thailand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index da4da1565..48db2b84b 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -395,7 +395,7 @@ def _populate_public_holidays(self): self._add_holiday_nov_10(name) self._add_holiday_nov_11(name) self._add_holiday_nov_12(name) - if 1926 <= self._year <= 1937: + elif 1926 <= self._year <= 1937: # Coronation Day. name = tr("พระราชพิธีฉัตรมงคล") self._add_holiday_feb_24(name) From e0b5c2cc5ccb6353545ce0b0e398d35ff37c17c4 Mon Sep 17 00:00:00 2001 From: PPsyrius <19505219+PPsyrius@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:42:28 +0700 Subject: [PATCH 5/5] Sort TH holidays logic by recentness, unify Rama VII-VIII holiday gap --- holidays/countries/thailand.py | 88 +++++++++++++------------ holidays/locale/en_US/LC_MESSAGES/TH.po | 30 ++++----- holidays/locale/th/LC_MESSAGES/TH.po | 30 ++++----- tests/countries/test_thailand.py | 4 +- 4 files changed, 79 insertions(+), 73 deletions(-) diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index 48db2b84b..53bd7dd1b 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -232,7 +232,7 @@ def _populate_public_holidays(self): # No in-lieus are observed, and still remain a Public Holidays than just Observed. if self._year >= 1955 and self._year != 1964: - # National Children's Day + # National Children's Day. name = tr("วันเด็กแห่งชาติ") if self._year <= 1963: self._add_holiday_1st_mon_of_oct(name) @@ -286,12 +286,12 @@ def _populate_public_holidays(self): if self._year <= 1940 or 1948 <= self._year <= 1953 or 1957 <= self._year != 2020: # Songkran Festival. name = tr("วันสงกรานต์") - if self._year <= 1925: - # Songkran New Year Holidays. - name = tr("พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์") - dt = self._add_holiday_mar_28(name) - for delta in range(1, 19): - self._add_holiday(name, _timedelta(dt, delta)) + if 1989 <= self._year <= 1997: + dt = self._add_holiday_apr_12(name) + self._add_holiday_apr_13(name) + self._add_holiday_apr_14(name) + elif 1957 <= self._year <= 1988: + self._add_observed(self._add_holiday_apr_13(name)) elif 1926 <= self._year <= 1940: if self._year == 1940: # Songkran New Year. @@ -307,12 +307,12 @@ def _populate_public_holidays(self): self._add_holiday_apr_2(name) if self._year <= 1937: self._add_holiday_apr_3(name) - elif 1957 <= self._year <= 1988: - self._add_observed(self._add_holiday_apr_13(name)) - elif 1989 <= self._year <= 1997: - dt = self._add_holiday_apr_12(name) - self._add_holiday_apr_13(name) - self._add_holiday_apr_14(name) + elif self._year <= 1925: + # Songkran New Year Holidays. + name = tr("พระราชพิธีตะรุษะสงกรานต์ แลนักขัตฤกษ์") + dt = self._add_holiday_mar_28(name) + for delta in range(1, 19): + self._add_holiday(name, _timedelta(dt, delta)) else: dt = self._add_holiday_apr_13(name) self._add_holiday_apr_14(name) @@ -378,33 +378,39 @@ def _populate_public_holidays(self): # พระราชพิธีฉัตรมงคล (1926-1937) # วันฉัตรมงคล (1958-Present) # First observed for Rama VI from 1914-1925 from NOV 9th-12th. - # For Rama VII (1926-1937) this was FEB 24th-26th. - # Even though Rama VII abdicated on MAR 2nd, 1935, there's no recorded - # change in terms of holiday arrangement until 1938. + # For Rama VII (1926-1935) this was FEB 24th-26th. + # After Rama VII abdicated on MAR 2nd, 1935, there's no recorded + # change in terms of holiday arrangement until 1938, + # thus, a gap in holidays arrangement is assumed. + # Rama VIII passes away without a coronation ceremony. # Starts in 1958 (B.E. 2501) for Rama IX's Coronation: MAY 5th. # No celebration in 2017-2019 (B.E. 2560-2562). # Reestablished with Rama X's Coronation in 2020: MAY 4th. - if self._year <= 1937 or self._year >= 1958: + if self._year <= 1935 or self._year >= 1958: # Coronation Day. name = tr("วันฉัตรมงคล") - if 1914 <= self._year <= 1925: + if self._year >= 2020: + # Rama X (2020-Present). + self._add_observed(self._add_holiday_may_4(name)) + elif 1958 <= self._year <= 2016: + # Rama IX (1958-2016). + self._add_observed(self._add_holiday_may_5(name)) + elif 1926 <= self._year <= 1935: + # Coronation Day. + name = tr("พระราชพิธีฉัตรมงคล") + # Rama VII (1926-1935). + self._add_holiday_feb_24(name) + self._add_holiday_feb_25(name) + self._add_holiday_feb_26(name) + elif self._year <= 1925: # Merit-making Ceremony for the Royal Ashes and the Coronation Day. name = tr("ทำบุญพระบรมอัษฐิ และพระราชพิธีฉัตรมงคล") + # Rama VI (1914-1925). self._add_holiday_nov_9(name) self._add_holiday_nov_10(name) self._add_holiday_nov_11(name) self._add_holiday_nov_12(name) - elif 1926 <= self._year <= 1937: - # Coronation Day. - name = tr("พระราชพิธีฉัตรมงคล") - self._add_holiday_feb_24(name) - self._add_holiday_feb_25(name) - self._add_holiday_feb_26(name) - elif 1958 <= self._year <= 2016: - self._add_observed(self._add_holiday_may_5(name)) - elif self._year >= 2020: - self._add_observed(self._add_holiday_may_4(name)) # วันเฉลิมพระชนมพรรษา พระราชินี # Status: In-Use. @@ -747,7 +753,7 @@ def _populate_armed_forces_holidays(self): # Only applys to members of the Royal Thai Armed Forces. if self._year >= 1959: - # Royal Thai Armed Forces Day + # Royal Thai Armed Forces Day. name = tr("วันกองทัพไทย") if self._year >= 2007: self._add_holiday_jan_18(name) @@ -771,7 +777,7 @@ def _populate_bank_holidays(self): if self._year <= 2021: self._add_holiday_apr_1( - # Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives + # Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives. tr("วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร") ) @@ -781,7 +787,7 @@ def _populate_bank_holidays(self): # Abandoned in 2019. if self._year <= 2018: - # Mid-Year Closing Day + # Mid-Year Closing Day. self._add_holiday_jul_1(tr("วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ")) def _populate_government_holidays(self): @@ -884,7 +890,7 @@ def _populate_school_holidays(self): # Only applies to Ministry of Education (Students, Teachers, etc.), no in-lieus are given. if self._year >= 1957: - # Teacher's Day + # Teacher's Day. self._add_holiday_jan_16(tr("วันครู")) def _populate_workday_holidays(self): @@ -896,7 +902,7 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 1948. - # Thai Veterans Day + # Thai Veterans Day. self._add_holiday_feb_3(tr("วันทหารผ่านศึก")) if self._year >= 1982: @@ -904,7 +910,7 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 1982. - # National Science Day + # National Science Day. self._add_holiday_aug_18(tr("วันวิทยาศาสตร์แห่งชาติ")) if self._year >= 1985: @@ -912,7 +918,7 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 1985. - # National Artist Day + # National Artist Day. self._add_holiday_feb_26(tr("วันศิลปินแห่งชาติ")) if self._year >= 1989: @@ -920,7 +926,7 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 1989. - # International Women's Day + # International Women's Day. self._add_womens_day(tr("วันสตรีสากล")) if self._year >= 1990: @@ -928,14 +934,14 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 1990. - # National Forest Conservation Day + # National Forest Conservation Day. self._add_holiday_jan_14(tr("วันอนุรักษ์ทรัพยากรป่าไม้ของชาติ")) # วันพ่อขุนรามคำแหงมหาราช # Status: In-Use. # Started in 1990. - # HM King Ramkamhaeng Memorial Day + # HM King Ramkamhaeng Memorial Day. self._add_holiday_jan_17(tr("วันพ่อขุนรามคำแหงมหาราช")) if self._year >= 1995: @@ -943,7 +949,7 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 1995. - # National Aviation Day + # National Aviation Day. self._add_holiday_jan_13(tr("วันการบินแห่งชาติ")) if self._year >= 2017: @@ -951,14 +957,14 @@ def _populate_workday_holidays(self): # Status: In-Use. # Started in 2017. - # Thai National Flag Day + # Thai National Flag Day. self._add_holiday_sep_28(tr("วันพระราชทานธงชาติไทย")) # วันลอยกระทง # Status: In-Use. # Started in 1914. - # Loy Krathong + # Loy Krathong. self._add_loy_krathong(tr("วันลอยกระทง")) diff --git a/holidays/locale/en_US/LC_MESSAGES/TH.po b/holidays/locale/en_US/LC_MESSAGES/TH.po index 67751c1d9..32b42bdc3 100644 --- a/holidays/locale/en_US/LC_MESSAGES/TH.po +++ b/holidays/locale/en_US/LC_MESSAGES/TH.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Holidays 0.63\n" "POT-Creation-Date: 2023-03-18 15:58-0700\n" -"PO-Revision-Date: 2024-12-12 10:31+0700\n" +"PO-Revision-Date: 2024-12-14 10:19+0700\n" "Last-Translator: PPsyrius \n" "Language-Team: Holidays Localization Team\n" "Language: en_US\n" @@ -83,7 +83,7 @@ msgstr "New Year's Day" msgid "วันสิ้นปี" msgstr "New Year's Eve" -#. National Children's Day +#. National Children's Day. msgid "วันเด็กแห่งชาติ" msgstr "National Children's Day" @@ -277,19 +277,19 @@ msgstr "Buddhist Lent Day" msgid "วันเข้าพรรษา" msgstr "Buddhist Lent Day" -#. Royal Thai Armed Forces Day +#. Royal Thai Armed Forces Day. msgid "วันกองทัพไทย" msgstr "Royal Thai Armed Forces Day" #. Additional Closing Day for Bank for Agriculture and Agricultural -#. Cooperatives +#. Cooperatives. msgid "" "วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร" msgstr "" "Additional Closing Day for Bank for Agriculture and Agricultural " "Cooperatives" -#. Mid-Year Closing Day +#. Mid-Year Closing Day. msgid "วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ" msgstr "Mid-Year Closing Day" @@ -297,43 +297,43 @@ msgstr "Mid-Year Closing Day" msgid "วันพืชมงคล" msgstr "Royal Ploughing Ceremony" -#. Teacher's Day +#. Teacher's Day. msgid "วันครู" msgstr "Teacher's Day" -#. National Aviation Day +#. National Aviation Day. msgid "วันการบินแห่งชาติ" msgstr "National Aviation Day" -#. National Forest Conservation Day +#. National Forest Conservation Day. msgid "วันอนุรักษ์ทรัพยากรป่าไม้ของชาติ" msgstr "National Forest Conservation Day" -#. National Artist Day +#. National Artist Day. msgid "วันศิลปินแห่งชาติ" msgstr "National Artist Day" -#. International Women's Day +#. International Women's Day. msgid "วันสตรีสากล" msgstr "International Women's Day" -#. Loy Krathong +#. Loy Krathong. msgid "วันลอยกระทง" msgstr "Loy Krathong" -#. Thai Veterans Day +#. Thai Veterans Day. msgid "วันทหารผ่านศึก" msgstr "Thai Veterans Day" -#. National Science Day +#. National Science Day. msgid "วันวิทยาศาสตร์แห่งชาติ" msgstr "National Science Day" -#. HM King Ramkamhaeng Memorial Day +#. HM King Ramkamhaeng Memorial Day. msgid "วันพ่อขุนรามคำแหงมหาราช" msgstr "HM King Ramkamhaeng Memorial Day" -#. Thai National Flag Day +#. Thai National Flag Day. msgid "วันพระราชทานธงชาติไทย" msgstr "Thai National Flag Day" diff --git a/holidays/locale/th/LC_MESSAGES/TH.po b/holidays/locale/th/LC_MESSAGES/TH.po index 1f143a27e..716bd3e5e 100644 --- a/holidays/locale/th/LC_MESSAGES/TH.po +++ b/holidays/locale/th/LC_MESSAGES/TH.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Holidays 0.63\n" "POT-Creation-Date: 2023-03-02 00:37+0700\n" -"PO-Revision-Date: 2024-12-12 10:31+0700\n" +"PO-Revision-Date: 2024-12-14 10:20+0700\n" "Last-Translator: PPsyrius \n" "Language-Team: Holidays Localization Team\n" "Language: th\n" @@ -83,7 +83,7 @@ msgstr "" msgid "วันสิ้นปี" msgstr "" -#. National Children's Day +#. National Children's Day. msgid "วันเด็กแห่งชาติ" msgstr "" @@ -277,17 +277,17 @@ msgstr "" msgid "วันเข้าพรรษา" msgstr "" -#. Royal Thai Armed Forces Day +#. Royal Thai Armed Forces Day. msgid "วันกองทัพไทย" msgstr "" #. Additional Closing Day for Bank for Agriculture and Agricultural -#. Cooperatives +#. Cooperatives. msgid "" "วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร" msgstr "" -#. Mid-Year Closing Day +#. Mid-Year Closing Day. msgid "วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ" msgstr "" @@ -295,43 +295,43 @@ msgstr "" msgid "วันพืชมงคล" msgstr "" -#. Teacher's Day +#. Teacher's Day. msgid "วันครู" msgstr "" -#. National Aviation Day +#. National Aviation Day. msgid "วันการบินแห่งชาติ" msgstr "" -#. National Forest Conservation Day +#. National Forest Conservation Day. msgid "วันอนุรักษ์ทรัพยากรป่าไม้ของชาติ" msgstr "" -#. National Artist Day +#. National Artist Day. msgid "วันศิลปินแห่งชาติ" msgstr "" -#. International Women's Day +#. International Women's Day. msgid "วันสตรีสากล" msgstr "" -#. Loy Krathong +#. Loy Krathong. msgid "วันลอยกระทง" msgstr "" -#. Thai Veterans Day +#. Thai Veterans Day. msgid "วันทหารผ่านศึก" msgstr "" -#. National Science Day +#. National Science Day. msgid "วันวิทยาศาสตร์แห่งชาติ" msgstr "" -#. HM King Ramkamhaeng Memorial Day +#. HM King Ramkamhaeng Memorial Day. msgid "วันพ่อขุนรามคำแหงมหาราช" msgstr "" -#. Thai National Flag Day +#. Thai National Flag Day. msgid "วันพระราชทานธงชาติไทย" msgstr "" diff --git a/tests/countries/test_thailand.py b/tests/countries/test_thailand.py index 5b609bb4d..f109072c8 100644 --- a/tests/countries/test_thailand.py +++ b/tests/countries/test_thailand.py @@ -268,9 +268,9 @@ def test_coronation_day(self): name_1914, (f"{year}-11-09", f"{year}-11-10", f"{year}-11-11", f"{year}-11-12") ) self.assertNoHolidayName(name_1914, range(1926, 2050)) - for year in range(1926, 1938): + for year in range(1926, 1936): self.assertHolidayName(name_1926, (f"{year}-02-24", f"{year}-02-25", f"{year}-02-26")) - self.assertNoHolidayName(name_1926, range(1914, 1926), range(1938, 2050)) + self.assertNoHolidayName(name_1926, range(1914, 1926), range(1936, 2050)) self.assertHolidayName(name_1958, (f"{year}-05-05" for year in range(1958, 2017))) self.assertHolidayName(name_1958, (f"{year}-05-04" for year in range(2020, 2050))) self.assertNoHolidayName(name_1958, range(1914, 1958), range(2017, 2020))