diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 3560c2730..5d946c852 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -15,6 +15,13 @@ on: tags: - 'v*' workflow_dispatch: + workflow_run: + workflows: ["Update pre-commit hooks"] + branches: + - update-pre-commit-hooks + types: + - completed + env: FORCE_COLOR: 1 @@ -36,6 +43,7 @@ jobs: with: check-latest: true python-version: '3.12' + - name: Run pre-commit uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 303c4f466..d75fe9a38 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: - --py39-plus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.1 + rev: v0.8.3 hooks: - id: ruff - id: ruff-format diff --git a/CHANGES b/CHANGES index d10f335dc..748e08787 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,16 @@ +Version 0.63 +============ + +Released December 16, 2024 + +- Update CI/CD trigger section (#2170 by @arkid15r) +- Update KZ holidays: add 2025 special holidays (#2167 by @qaziqarta) +- Update Thailand holidays: extend support year down to 1914 (#2166 by @PPsyrius) +- Add French subdivision aliases (#2162 by @bors-ltd) +- Align financial markets MIC codes with ISO 10383 (#2158 by @KJhellico) +- Enforce 100% test coverage (#2173 by @arkid15r) +- Inline single-use variables, update .py files formatting (#2161 by @KJhellico) + Version 0.62 ============ diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index afa8b0095..58caba261 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -14,7 +14,7 @@ from the `dev branch`_ to work on the latest code and reduce merging issues. If you add/change holiday official dates or names your code must include references to all sources (government sites, archived web pages, wiki pages, etc) you've used while working on this PR. That could be done either as a ``References`` section update or -as a comment on the relevant part of the code. Contributed PRs_ are required to include valid test +as a comment on the relevant part of the code. Contributed PRs_ are required to include 100% test coverage in order to be merged. Please don't hesitate to ask for help if you need one with the tests. diff --git a/README.rst b/README.rst index 4c2404aaa..6e1608f89 100644 --- a/README.rst +++ b/README.rst @@ -437,7 +437,7 @@ All other default values are highlighted with bold: - UNOFFICIAL * - France - FR - - DOM/TOM: BL, GES, GP, GY, MF, MQ, NC, PF, RE, WF, YT + - DOM/TOM: BL (Saint-Barthélemy), GES (Alsace, Champagne-Ardenne, Lorraine), GP (Guadeloupe), GY (Guyane), MF (Saint-Martin), MQ (Martinique), NC (Nouvelle-Calédonie), PF (Polynésie Française), RE (La Réunion), WF (Wallis-et-Futuna), YT (Mayotte) - en_US, **fr**, uk - * - Gabon @@ -980,8 +980,12 @@ following financial markets are available: - Code - Info - Supported Languages + * - Brasil, Bolsa, Balcão + - BVMF + - Brazil Stock Exchange and Over-the-Counter Market holidays (same as ANBIMA holidays) + - en_US, **pt_BR**, uk * - European Central Bank - - ECB + - XECB - Trans-European Automated Real-time Gross Settlement (TARGET2) - * - ICE Futures Europe @@ -992,10 +996,6 @@ following financial markets are available: - XNYS - NYSE market holidays (used by all other US-exchanges, including NASDAQ, etc.) - - * - Brasil, Bolsa, Balcão - - BVMF - - Brazil Stock Exchange and Over-the-Counter Market holidays (same as ANBIMA holidays) - - en_US, **pt_BR**, uk Contributions diff --git a/SECURITY.md b/SECURITY.md index 8f91016a0..2ed75828b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,8 +4,8 @@ | Version | Supported | | ------- | ------------------ | -| 0.62 | :white_check_mark: | -| < 0.62 | :x: | +| 0.63 | :white_check_mark: | +| < 0.63 | :x: | ## Reporting a Vulnerability diff --git a/holidays/calendars/thai.py b/holidays/calendars/thai.py index 268c729e7..510fc8fc0 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, @@ -234,12 +250,12 @@ 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(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: @@ -270,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/angola.py b/holidays/countries/angola.py index 3254ef4d4..f525fe07f 100644 --- a/holidays/countries/angola.py +++ b/holidays/countries/angola.py @@ -71,7 +71,7 @@ def _add_observed(self, dt: date, **kwargs) -> tuple[bool, Optional[date]]: def _populate_public_holidays(self): # New Year's Day. - name = self.tr("Dia do Ano Novo") + name = tr("Dia do Ano Novo") dt = self._add_new_years_day(name) if self._year <= 2011 or self._year >= 2018: self._add_observed(dt) @@ -84,14 +84,15 @@ def _populate_public_holidays(self): self._add_holiday_jan_4(tr("Dia dos Mártires da Repressão Colonial")) ) - name = ( - # Beginning of the Armed Struggle for National Liberation Day. - tr("Dia do Início da Luta Armada de Libertação Nacional") - if self._year >= 2012 - # Beginning of the Armed Struggle Day. - else tr("Dia do Início da Luta Armada") + self._add_observed( + self._add_holiday_feb_4( + # Beginning of the Armed Struggle for National Liberation Day. + tr("Dia do Início da Luta Armada de Libertação Nacional") + if self._year >= 2012 + # Beginning of the Armed Struggle Day. + else tr("Dia do Início da Luta Armada") + ) ) - self._add_observed(self._add_holiday_feb_4(name)) # Law #16/96. if self._year >= 1997: @@ -103,17 +104,13 @@ def _populate_public_holidays(self): # Law #11/18. if self._year >= 2019: - self._add_observed( - # Southern Africa Liberation Day. - self._add_holiday_mar_23(tr("Dia da Libertação da África Austral")) - ) + # Southern Africa Liberation Day. + self._add_observed(self._add_holiday_mar_23(tr("Dia da Libertação da África Austral"))) # Law #7/03. if self._year >= 2003: - self._add_observed( - # Peace and National Reconciliation Day. - self._add_holiday_apr_4(tr("Dia da Paz e Reconciliação Nacional")) - ) + # Peace and National Reconciliation Day. + self._add_observed(self._add_holiday_apr_4(tr("Dia da Paz e Reconciliação Nacional"))) # Law #16/96. if self._year >= 1997: @@ -145,21 +142,22 @@ def _populate_public_holidays(self): if self._year <= 2010 or self._year >= 2018: self._add_observed(dt) - name = ( - # National Independence Day. - tr("Dia da Independência Nacional") - if self._year >= 1996 - # Independence Day. - else tr("Dia da Independência") + self._add_observed( + self._add_holiday_nov_11( + # National Independence Day. + tr("Dia da Independência Nacional") + if self._year >= 1996 + # Independence Day. + else tr("Dia da Independência") + ) ) - self._add_observed(self._add_holiday_nov_11(name)) # Decree # 7/92. if self._year <= 1991: # Date of Founding of MPLA - Labor Party. self._add_holiday_dec_10(tr("Data da Fundacao do MPLA - Partido do Trabalho")) - name = ( + dt = self._add_christmas_day( # Christmas and Family Day. tr("Dia de Natal e da Família") if self._year >= 2011 @@ -169,7 +167,6 @@ def _populate_public_holidays(self): else tr("Dia da Família") # Family Day. ) ) - dt = self._add_christmas_day(name) if self._year <= 2010 or self._year >= 2018: self._add_observed(dt) diff --git a/holidays/countries/argentina.py b/holidays/countries/argentina.py index bc5508bab..356ee1b0f 100644 --- a/holidays/countries/argentina.py +++ b/holidays/countries/argentina.py @@ -205,7 +205,7 @@ def _populate_public_holidays(self): if self._year >= 2016: jun_17 = self._add_holiday_jun_17( # Pass to the Immortality of General Don Martin Miguel de Guemes. - tr("Paso a la Inmortalidad del General Don Martín Miguel de Güemes"), + tr("Paso a la Inmortalidad del General Don Martín Miguel de Güemes") ) # If Jun 17 is Friday, then it should move to Mon, Jun 20 # but Jun 20 is Gen. Belgrano holiday @@ -232,14 +232,13 @@ def _populate_public_holidays(self): # In 2010 the holiday became movable and its name was changed. if self._year >= 1917: - name = ( + oct_12 = self._add_columbus_day( # Respect for Cultural Diversity Day. tr("Día del Respeto a la Diversidad Cultural") if self._year >= 2010 # Columbus Day. else tr("Día de la Raza") ) - oct_12 = self._add_columbus_day(name) if self._year >= 2010: self._move_holiday(oct_12) diff --git a/holidays/countries/bolivia.py b/holidays/countries/bolivia.py index 76afdc027..6e5b799b3 100644 --- a/holidays/countries/bolivia.py +++ b/holidays/countries/bolivia.py @@ -83,7 +83,7 @@ def _populate_public_holidays(self): self._add_good_friday(tr("Viernes Santo")) # Labor Day. - self._add_observed(may_1 := self._add_labor_day(self.tr("Día del Trabajo"))) + self._add_observed(may_1 := self._add_labor_day(tr("Día del Trabajo"))) # Supreme Decree #1210. if 2012 <= self._year <= 2015: self._add_observed(may_1, rule=TUE_TO_PREV_MON + THU_TO_NEXT_FRI) diff --git a/holidays/countries/bosnia_and_herzegovina.py b/holidays/countries/bosnia_and_herzegovina.py index 91cbf2e1a..aa719f1d5 100644 --- a/holidays/countries/bosnia_and_herzegovina.py +++ b/holidays/countries/bosnia_and_herzegovina.py @@ -224,7 +224,7 @@ def _populate_subdiv_srp_public_holidays(self): self._add_holiday_nov_21( # Dayton Agreement Day. - tr("Dan uspostave Opšteg okvirnog sporazuma za mir u Bosni i Hercegovini"), + tr("Dan uspostave Opšteg okvirnog sporazuma za mir u Bosni i Hercegovini") ) # Catholic Christmas Eve. diff --git a/holidays/countries/cambodia.py b/holidays/countries/cambodia.py index 88393cc4c..1edb93cd4 100644 --- a/holidays/countries/cambodia.py +++ b/holidays/countries/cambodia.py @@ -128,7 +128,7 @@ def _populate_public_holidays(self): # NORODOM SIHAMONI, King of Cambodia "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី" ) - dt = self._add_holiday_may_14(king_sihamoni_bday) + self._add_holiday_may_14(king_sihamoni_bday) if self._year <= 2019: self._add_holiday_may_13(king_sihamoni_bday) self._add_holiday_may_15(king_sihamoni_bday) @@ -159,7 +159,7 @@ def _populate_public_holidays(self): if self._year >= 1994: self._add_holiday_jun_18( # Birthday of Her Majesty the Queen-Mother NORODOM MONINEATH SIHANOUK of Cambodia - tr("ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ"), + tr("ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ") ) # ទិវាប្រកាសរដ្ឋធម្មនុញ្ញ @@ -176,13 +176,12 @@ def _populate_public_holidays(self): if self._year >= 2012: self._add_holiday_oct_15( - # Mourning Day of the Late King-Father - # NORODOM SIHANOUK of Cambodia + # Mourning Day of the Late King-Father NORODOM SIHANOUK of Cambodia tr( "ទិវាប្រារព្ឋពិធីគោរពព្រះវិញ្ញាណក្ខន្ឋ ព្រះករុណា ព្រះបាទសម្តេចព្រះ នរោត្តម " "សីហនុ ព្រះមហាវីរក្សត្រ ព្រះវររាជបិតាឯករាជ្យ បូរណភាពទឹកដី និងឯកភាពជាតិខ្មែរ " "ព្រះបរមរតនកោដ្ឋ" - ), + ) ) # ទិវារំលឹកសន្ធិសញ្ញាសន្តិភាពទីក្រុងប៉ារីស @@ -207,7 +206,7 @@ def _populate_public_holidays(self): "ព្រះរាជពិធីគ្រងព្រះបរមរាជសម្បត្តិ របស់ ព្រះករុណា " "ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី " "ព្រះមហាក្សត្រនៃព្រះរាជាណាចក្រកម្ពុជា" - ), + ) ) # ពិធីបុណ្យឯករាជ្យជាតិ @@ -226,7 +225,7 @@ def _populate_public_holidays(self): self._add_holiday_dec_10(tr("ទិវាសិទ្ធិមនុស្សអន្តរជាតិ")) # Cambodian Lunar Calendar Holidays - # See `_ThaiLunisolar` in holidays/utils.py for more details. + # See `_ThaiLunisolar` in holidays/calendars/thai.py for more details. # Cambodian Lunar Calendar Holidays only work from 1941 to 2157. # ពិធីបុណ្យមាឃបូជា diff --git a/holidays/countries/canada.py b/holidays/countries/canada.py index 6247e0ccd..d1ff0c313 100644 --- a/holidays/countries/canada.py +++ b/holidays/countries/canada.py @@ -236,14 +236,13 @@ def _populate_subdiv_mb_public_holidays(self): def _populate_subdiv_mb_optional_holidays(self): if self._year >= 1900: - name = ( + self._add_holiday_1st_mon_of_aug( # Terry Fox Day. tr("Terry Fox Day") if self._year >= 2015 # Civic Holiday. else tr("Civic Holiday") ) - self._add_holiday_1st_mon_of_aug(name) if self._year >= 1931: # Remembrance Day. diff --git a/holidays/countries/chile.py b/holidays/countries/chile.py index 4c08d74e8..002c7174f 100644 --- a/holidays/countries/chile.py +++ b/holidays/countries/chile.py @@ -143,10 +143,8 @@ def _populate_public_holidays(self): # Day of National Liberation. self._add_holiday_sep_11(tr("Día de la Liberación Nacional")) elif 1999 <= self._year <= 2001: - self._add_holiday_1st_mon_of_sep( - # Day of National Unity. - tr("Día de la Unidad Nacional") - ) + # Day of National Unity. + self._add_holiday_1st_mon_of_sep(tr("Día de la Unidad Nacional")) if self._year >= 2007: self._add_observed( @@ -168,14 +166,15 @@ def _populate_public_holidays(self): self._add_holiday_sep_20(tr("Fiestas Patrias")) if self._year >= 1922 and self._year != 1973: - name = ( - # Meeting of Two Worlds' Day. - tr("Día del Encuentro de dos Mundos") - if self._year >= 2000 - # Columbus Day. - else tr("Día de la Raza") + self._move_holiday( + self._add_columbus_day( + # Meeting of Two Worlds' Day. + tr("Día del Encuentro de dos Mundos") + if self._year >= 2000 + # Columbus Day. + else tr("Día de la Raza") + ) ) - self._move_holiday(self._add_columbus_day(name)) if self._year >= 2008: # This holiday is moved to the preceding Friday if it falls on a Tuesday, diff --git a/holidays/countries/costa_rica.py b/holidays/countries/costa_rica.py index cb0930eb6..ce9ed2ab0 100644 --- a/holidays/countries/costa_rica.py +++ b/holidays/countries/costa_rica.py @@ -106,7 +106,7 @@ def _populate_optional_holidays(self): if self._year >= 2021: aug_31 = self._add_holiday_aug_31( # Day of the Black Person and Afro-Costa Rican Culture. - self.tr("Día de la Persona Negra y la Cultura Afrocostarricense") + tr("Día de la Persona Negra y la Cultura Afrocostarricense") ) if self._year in {2021, 2022, 2023}: # Move to next Sunday. diff --git a/holidays/countries/croatia.py b/holidays/countries/croatia.py index c4a82f9b7..caba9b882 100644 --- a/holidays/countries/croatia.py +++ b/holidays/countries/croatia.py @@ -67,14 +67,13 @@ def _populate_public_holidays(self): # Anti-Fascist Struggle Day. self._add_holiday_jun_22(tr("Dan antifašističke borbe")) - name = ( + self._add_holiday_aug_5( # Victory and Homeland Thanksgiving Day and Croatian Veterans Day. tr("Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja") if self._year >= 2008 # Victory and Homeland Thanksgiving Day. else tr("Dan pobjede i domovinske zahvalnosti") ) - self._add_holiday_aug_5(name) # Assumption Day. self._add_assumption_of_mary_day(tr("Velika Gospa")) diff --git a/holidays/countries/czechia.py b/holidays/countries/czechia.py index f1e34b787..06b670930 100644 --- a/holidays/countries/czechia.py +++ b/holidays/countries/czechia.py @@ -36,7 +36,7 @@ def _populate_public_holidays(self): tr("Den obnovy samostatného českého státu") if self._year >= 2000 # New Year's Day. - else tr("Nový rok"), + else tr("Nový rok") ) if self._year <= 1951 or self._year >= 2016: diff --git a/holidays/countries/dominica.py b/holidays/countries/dominica.py index f31748282..89e7c7dfb 100644 --- a/holidays/countries/dominica.py +++ b/holidays/countries/dominica.py @@ -75,14 +75,13 @@ def _populate_public_holidays(self): # Whit Monday. self._add_whit_monday("Whit Monday") - first_monday_of_august_holiday_name = ( + self._add_holiday_1st_mon_of_aug( # Emancipation Day. "Emancipation Day" if self._year >= 1998 # First Monday of August. else "First Monday of August" ) - self._add_holiday_1st_mon_of_aug(first_monday_of_august_holiday_name) # Independence Day. self._add_observed(self._add_holiday_nov_3("Independence Day"), rule=SUN_TO_NEXT_TUE) diff --git a/holidays/countries/france.py b/holidays/countries/france.py index e0786b901..636c2d1c9 100644 --- a/holidays/countries/france.py +++ b/holidays/countries/france.py @@ -35,18 +35,33 @@ class France(HolidayBase, ChristianHolidays, InternationalHolidays): default_language = "fr" supported_languages = ("en_US", "fr", "uk") subdivisions = ( - "BL", # Saint Barthelemy. + "BL", # Saint-Barthélemy. "GES", # Alsace, Champagne-Ardenne, Lorraine(Moselle). "GP", # Guadeloupe. "GY", # Guyane. - "MF", # Saint Martin. + "MF", # Saint-Martin. "MQ", # Martinique. "NC", # Nouvelle-Calédonie, "PF", # Polynésie Française. - "RE", # Reunion. + "RE", # La Réunion. "WF", # Wallis-et-Futuna. "YT", # Mayotte. ) + subdivisions_aliases = { + "Saint-Barthélemy": "BL", + "Alsace": "GES", + "Champagne-Ardenne": "GES", + "Lorraine": "GES", + "Guadeloupe": "GP", + "Guyane": "GY", + "Saint-Martin": "MF", + "Martinique": "MQ", + "Nouvelle-Calédonie": "NC", + "Polynésie Française": "PF", + "La Réunion": "RE", + "Wallis-et-Futuna": "WF", + "Mayotte": "YT", + } _deprecated_subdivisions = ( "Alsace-Moselle", diff --git a/holidays/countries/hungary.py b/holidays/countries/hungary.py index 8dbcd997a..cd9130702 100644 --- a/holidays/countries/hungary.py +++ b/holidays/countries/hungary.py @@ -54,7 +54,7 @@ def __init__(self, *args, **kwargs): def _populate_public_holidays(self): # New Year's Day. - self._add_new_years_day(self.tr("Újév")) + self._add_new_years_day(tr("Újév")) if 1945 <= self._year <= 1950 or self._year >= 1989: # National Day. @@ -90,7 +90,7 @@ def _populate_public_holidays(self): tr("A kenyér ünnepe") if 1950 <= self._year <= 1989 # State Foundation Day. - else tr("Az államalapítás ünnepe"), + else tr("Az államalapítás ünnepe") ) if self._year >= 1991: diff --git a/holidays/countries/israel.py b/holidays/countries/israel.py index 8fe08f6a8..283eff879 100644 --- a/holidays/countries/israel.py +++ b/holidays/countries/israel.py @@ -73,10 +73,9 @@ def _populate_public_holidays(self): # Yom Kippur (Day of Atonement). self._add_holiday(tr("יום כיפור"), self._get_holiday(YOM_KIPPUR)) - # Sukkot (Feast of Tabernacles). - name = tr("סוכות") sukkot_dt = self._get_holiday(SUKKOT) - self._add_holiday(name, sukkot_dt) + # Sukkot (Feast of Tabernacles). + self._add_holiday(tr("סוכות"), sukkot_dt) # Simchat Torah / Shemini Atzeret. self._add_holiday(tr("שמחת תורה/שמיני עצרת"), _timedelta(sukkot_dt, +7)) diff --git a/holidays/countries/kazakhstan.py b/holidays/countries/kazakhstan.py index f477123f2..1c0a631d0 100644 --- a/holidays/countries/kazakhstan.py +++ b/holidays/countries/kazakhstan.py @@ -74,6 +74,10 @@ class Kazakhstan( - `2022 `_ - `2023 `_ - `2024 `_ + - `2025 `_ + + Islamic holidays: + - 2025: ``_ """ country = "KZ" @@ -195,6 +199,7 @@ class KazakhstanIslamicHolidays(_CustomIslamicHolidays): 2022: (JUL, 9), 2023: (JUN, 28), 2024: (JUN, 16), + 2025: (JUN, 6), } @@ -284,6 +289,7 @@ class KazakhstanStaticHolidays: ), 2023: (JUL, 7, JUL, 1), 2024: (MAY, 8, MAY, 4), + 2025: (JAN, 3, JAN, 5), } special_public_holidays_observed = { diff --git a/holidays/countries/latvia.py b/holidays/countries/latvia.py index 7eb7a1aa3..cc01d36a2 100644 --- a/holidays/countries/latvia.py +++ b/holidays/countries/latvia.py @@ -55,10 +55,8 @@ def _populate_public_holidays(self): self._add_labor_day(tr("Darba svētki")) if self._year >= 2002: - dt = self._add_holiday_may_4( - # Restoration of Independence Day. - tr("Latvijas Republikas Neatkarības atjaunošanas diena") - ) + # Restoration of Independence Day. + dt = self._add_holiday_may_4(tr("Latvijas Republikas Neatkarības atjaunošanas diena")) if self._year >= 2008: self._add_observed(dt) diff --git a/holidays/countries/lithuania.py b/holidays/countries/lithuania.py index 05e346102..316940e8d 100644 --- a/holidays/countries/lithuania.py +++ b/holidays/countries/lithuania.py @@ -70,7 +70,7 @@ def _populate_public_holidays(self) -> None: tr( "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) " "ir Tautiškos giesmės diena" - ), + ) ) # Assumption Day. diff --git a/holidays/countries/namibia.py b/holidays/countries/namibia.py index a16830923..61827b07a 100644 --- a/holidays/countries/namibia.py +++ b/holidays/countries/namibia.py @@ -73,7 +73,7 @@ def _populate_public_holidays(self): self._add_holiday_sep_10( "Day of the Namibian Women and International Human Rights Day" if self._year >= 2005 - else "International Human Rights Day", + else "International Human Rights Day" ) ) diff --git a/holidays/countries/new_zealand.py b/holidays/countries/new_zealand.py index fa67210ad..eaad52c10 100644 --- a/holidays/countries/new_zealand.py +++ b/holidays/countries/new_zealand.py @@ -122,9 +122,7 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _get_nearest_monday(self, *args) -> Optional[date]: - dt = args if len(args) > 1 else args[0] - dt = dt if isinstance(dt, date) else date(self._year, *dt) - return self._get_observed_date(dt, rule=ALL_TO_NEAREST_MON) + return self._get_observed_date(date(self._year, *args), rule=ALL_TO_NEAREST_MON) def _populate_public_holidays(self): # Bank Holidays Act 1873 @@ -256,12 +254,9 @@ def _populate_subdiv_nsn_public_holidays(self): def _populate_subdiv_ntl_public_holidays(self): if 1964 <= self._year <= 1973: - name = "Waitangi Day" - dt = (FEB, 6) + self._add_holiday("Waitangi Day", self._get_nearest_monday(FEB, 6)) else: - name = "Auckland Anniversary Day" - dt = (JAN, 29) - self._add_holiday(name, self._get_nearest_monday(dt)) + self._add_holiday("Auckland Anniversary Day", self._get_nearest_monday(JAN, 29)) def _populate_subdiv_ota_public_holidays(self): # there is no easily determined single day of local observance?!?! diff --git a/holidays/countries/philippines.py b/holidays/countries/philippines.py index f396eaa0c..d528d2529 100644 --- a/holidays/countries/philippines.py +++ b/holidays/countries/philippines.py @@ -267,8 +267,8 @@ class PhilippinesStaticHolidays: (NOV, 2, additional_special), (DEC, 24, additional_special), ), - 2010: ((DEC, 24, additional_special),), - 2012: ((NOV, 2, additional_special),), + 2010: (DEC, 24, additional_special), + 2012: (NOV, 2, additional_special), 2013: ( (NOV, 2, additional_special), (DEC, 24, additional_special), diff --git a/holidays/countries/south_korea.py b/holidays/countries/south_korea.py index 2bf16dd88..263049582 100644 --- a/holidays/countries/south_korea.py +++ b/holidays/countries/south_korea.py @@ -399,10 +399,8 @@ class SouthKoreaStaticHolidays: # Joint Memorial Service for Fallen Soldiers. (JUN, 21, tr("전몰군인 합동위령제")), ), - 1951: ( - # Vice Presidential Election. - (MAY, 16, tr("부통령 선거일")), - ), + # Vice Presidential Election. + 1951: (MAY, 16, tr("부통령 선거일")), 1952: ( # City/Town/Township-level Local Elections. (APR, 25, local_election_day), @@ -411,10 +409,8 @@ class SouthKoreaStaticHolidays: # 2nd Presidential Election/3rd Vice President Election. (AUG, 5, presidential_election_day), ), - 1954: ( - # 3rd National Assembly Election. - (MAY, 20, national_assembly_election_day), - ), + # 3rd National Assembly Election. + 1954: (MAY, 20, national_assembly_election_day), 1956: ( # 3rd Presidential Election/4th Vice President Election. (MAY, 15, presidential_election_day), diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index 01897cdf5..53bd7dd1b 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("วันเด็กแห่งชาติ") + # National Children's Day. + 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)) - 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) + name = tr("วันสงกรานต์") + 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. + 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 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(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,76 @@ 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-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 <= 1935 or self._year >= 1958: + # Coronation Day. + name = tr("วันฉัตรมงคล") + 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) # วันเฉลิมพระชนมพรรษา พระราชินี # Status: In-Use. @@ -282,7 +426,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 +439,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. @@ -303,90 +447,173 @@ def _populate_public_holidays(self): # Now acts as the Queen Mother from 2017 onwards. if self._year >= 1976: - q_sirikit_bday = ( - # HM Queen Sirikit the Queen Mother's Birthday. - tr("วันเฉลิมพระชนมพรรษาสมเด็จพระบรมราชชนนีพันปีหลวง") - if self._year >= 2017 - # HM Queen Sirikit's Birthday. - else tr("วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถ") + self._add_observed( + self._add_holiday_aug_12( + # HM Queen Sirikit the Queen Mother's Birthday. + tr("วันเฉลิมพระชนมพรรษาสมเด็จพระบรมราชชนนีพันปีหลวง") + if self._year >= 2017 + # HM Queen Sirikit's Birthday. + else tr("วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถ") + ) ) - self._add_observed(self._add_holiday_aug_12(q_sirikit_bday)) # วันแม่แห่งชาติ # 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. @@ -396,92 +623,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("วันกองทัพไทย") + # Royal Thai Armed Forces Day. + 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 @@ -495,8 +777,8 @@ def _populate_bank_holidays(self): if self._year <= 2021: self._add_holiday_apr_1( - # Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives - tr("วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร"), + # Additional Closing Day for Bank for Agriculture and Agricultural Cooperatives. + tr("วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร") ) # วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ @@ -505,16 +787,16 @@ def _populate_bank_holidays(self): # Abandoned in 2019. if self._year <= 2018: - self._add_holiday_jul_1( - # Mid-Year Closing Day - tr("วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ"), - ) + # Mid-Year Closing Day. + self._add_holiday_jul_1(tr("วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ")) 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 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. # Is dated on an annual basis by the Royal Palace, always on weekdays. @@ -522,7 +804,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. @@ -608,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): @@ -620,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: @@ -628,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: @@ -636,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: @@ -644,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: @@ -652,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: @@ -667,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: @@ -675,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 1941. + # Started in 1914. - # Loy Krathong + # Loy Krathong. self._add_loy_krathong(tr("วันลอยกระทง")) @@ -695,7 +977,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("วันหยุดชดเชย") @@ -706,27 +993,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), @@ -744,9 +1028,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), @@ -764,13 +1047,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), @@ -802,10 +1085,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/countries/turkey.py b/holidays/countries/turkey.py index b409b79c7..93735276f 100644 --- a/holidays/countries/turkey.py +++ b/holidays/countries/turkey.py @@ -48,27 +48,25 @@ def _populate_public_holidays(self): # New Year's Day. self._add_new_years_day(tr("Yılbaşı")) - name = ( + self._add_holiday_apr_23( # National Sovereignty and Children's Day. tr("Ulusal Egemenlik ve Çocuk Bayramı") if self._year >= 1981 # National Sovereignty Day. else tr("Ulusal Egemenlik Bayramı") ) - self._add_holiday_apr_23(name) if self._year >= 2009: # Labour and Solidarity Day. self._add_labor_day(tr("Emek ve Dayanışma Günü")) - name = ( + self._add_holiday_may_19( # Commemoration of Atatürk, Youth and Sports Day. tr("Atatürk'ü Anma, Gençlik ve Spor Bayramı") if self._year >= 1981 # Youth and Sports Day. else tr("Gençlik ve Spor Bayramı") ) - self._add_holiday_may_19(name) if 1963 <= self._year <= 1980: # Freedom and Constitution Day. diff --git a/holidays/countries/united_states.py b/holidays/countries/united_states.py index 3905a8bfc..56031dbca 100644 --- a/holidays/countries/united_states.py +++ b/holidays/countries/united_states.py @@ -214,25 +214,29 @@ def _populate_subdiv_holidays(self): self._add_holiday_feb_22(name) # Columbus Day - if self._year >= 1937 and self.subdiv in { - "AS", - "AZ", - "CT", - "GA", - "ID", - "IL", - "IN", - "MA", - "MD", - "MO", - "MT", - "NJ", - "NY", - "OH", - "PA", - "UT", - "WV", - }: + if self._year >= 1937 and ( + self.subdiv is None + or self.subdiv + in { + "AS", + "AZ", + "CT", + "GA", + "ID", + "IL", + "IN", + "MA", + "MD", + "MO", + "MT", + "NJ", + "NY", + "OH", + "PA", + "UT", + "WV", + } + ): name = "Columbus Day" if self._year >= 1971: self._add_holiday_2nd_mon_of_oct(name) @@ -293,12 +297,11 @@ def _populate_subdiv_al_public_holidays(self): def _populate_subdiv_ar_public_holidays(self): # Martin Luther King Jr. Day if self._year >= 1986: - name = ( + self._add_holiday_3rd_mon_of_jan( "Martin Luther King Jr. Day" if self._year >= 2018 else "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays" ) - self._add_holiday_3rd_mon_of_jan(name) # Washington's Birthday name = "George Washington's Birthday and Daisy Gatson Bates Day" @@ -479,7 +482,7 @@ def _populate_subdiv_id_public_holidays(self): self._add_holiday_3rd_mon_of_jan( "Martin Luther King Jr. / Idaho Human Rights Day" if self._year >= 2006 - else "Martin Luther King Jr. Day", + else "Martin Luther King Jr. Day" ) def _populate_subdiv_il_public_holidays(self): @@ -637,7 +640,7 @@ def _populate_subdiv_ms_public_holidays(self): # Martin Luther King Jr. Day if self._year >= 1986: self._add_holiday_3rd_mon_of_jan( - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays" ) # Confederate Memorial Day diff --git a/holidays/countries/uruguay.py b/holidays/countries/uruguay.py index adbb75b5d..7afddb5fa 100644 --- a/holidays/countries/uruguay.py +++ b/holidays/countries/uruguay.py @@ -134,14 +134,15 @@ def _populate_bank_holidays(self): self._move_holiday(dt) if self._year <= 1932 or self._year >= 1937: - name = ( - # Cultural Diversity Day. - tr("Día de la Diversidad Cultural") - if self._year >= 2014 - # Columbus Day. - else tr("Día de la Raza") + self._move_holiday( + self._add_columbus_day( + # Cultural Diversity Day. + tr("Día de la Diversidad Cultural") + if self._year >= 2014 + # Columbus Day. + else tr("Día de la Raza") + ) ) - self._move_holiday(self._add_columbus_day(name)) if self._year <= 1932 or self._year >= 1938: # All Souls' Day. diff --git a/holidays/financial/__init__.py b/holidays/financial/__init__.py index 7f4c9b6c0..114544ebd 100644 --- a/holidays/financial/__init__.py +++ b/holidays/financial/__init__.py @@ -13,6 +13,6 @@ # flake8: noqa: F401 from .brasil_bolsa_balcao import BrasilBolsaBalcao, BVMF, B3 -from .european_central_bank import EuropeanCentralBank, ECB, TAR +from .european_central_bank import EuropeanCentralBank, XECB, ECB, TAR from .ice_futures_europe import ICEFuturesEurope, IFEU -from .ny_stock_exchange import NewYorkStockExchange, NYSE, XNYS +from .ny_stock_exchange import NewYorkStockExchange, XNYS, NYSE diff --git a/holidays/financial/european_central_bank.py b/holidays/financial/european_central_bank.py index abc47eec5..3a380af0d 100644 --- a/holidays/financial/european_central_bank.py +++ b/holidays/financial/european_central_bank.py @@ -19,11 +19,12 @@ class EuropeanCentralBank(HolidayBase, ChristianHolidays, InternationalHolidays) """ References: - https://en.wikipedia.org/wiki/TARGET2 + - https://www.ecb.europa.eu/ecb/contacts/working-hours/html/index.en.html - https://www.ecb.europa.eu/press/pr/date/1999/html/pr990715_1.en.html - https://www.ecb.europa.eu/press/pr/date/2000/html/pr001214_4.en.html """ - market = "ECB" + market = "XECB" start_year = 2000 def __init__(self, *args, **kwargs): @@ -36,12 +37,18 @@ def _populate_public_holidays(self): self._add_new_years_day("New Year's Day") self._add_good_friday("Good Friday") + self._add_easter_monday("Easter Monday") - self._add_labor_day("1 May (Labour Day)") + self._add_labor_day("Labour Day") self._add_christmas_day("Christmas Day") - self._add_christmas_day_two("26 December") + + self._add_christmas_day_two("Christmas Holiday") + + +class XECB(EuropeanCentralBank): + pass class ECB(EuropeanCentralBank): diff --git a/holidays/financial/ny_stock_exchange.py b/holidays/financial/ny_stock_exchange.py index 9231c71f0..3a1599b24 100644 --- a/holidays/financial/ny_stock_exchange.py +++ b/holidays/financial/ny_stock_exchange.py @@ -43,7 +43,7 @@ class NewYorkStockExchange( - https://web.archive.org/web/20211101162021/https://www.nyse.com/markets/hours-calendars """ - market = "NYSE" + market = "XNYS" observed_label = "%s (observed)" start_year = 1863 diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py index bf0bc72ec..052a4d137 100644 --- a/holidays/holiday_base.py +++ b/holidays/holiday_base.py @@ -448,8 +448,7 @@ def __getattr__(self, name): *_, month, day = tokens if month in MONTHS and day in DAYS: return lambda name: self._add_holiday( - name, - date(self._year, MONTHS[month], int(day)), + name, date(self._year, MONTHS[month], int(day)) ) elif len(tokens) == 7: @@ -687,15 +686,7 @@ def __str__(self) -> str: @property def __attribute_names(self): - return ( - "country", - "expand", - "language", - "market", - "observed", - "subdiv", - "years", - ) + return ("country", "expand", "language", "market", "observed", "subdiv", "years") @cached_property def _entity_code(self): diff --git a/holidays/locale/en_US/LC_MESSAGES/TH.po b/holidays/locale/en_US/LC_MESSAGES/TH.po index 003e8c833..32b42bdc3 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-14 10:19+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 "วันหยุดชดเชย" @@ -84,14 +83,39 @@ 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" -#. 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,23 +269,27 @@ msgstr "Visakha Bucha" msgid "วันอาสาฬหบูชา" msgstr "Asarnha Bucha" +#. Buddhist Lent Day. +msgid "เข้าปุริมพรรษา" +msgstr "Buddhist Lent Day" + #. 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" @@ -205,46 +297,58 @@ 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" -#. 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..716bd3e5e 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-14 10:20+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 "วันหยุดชดเชย" @@ -84,14 +83,39 @@ msgstr "" msgid "วันสิ้นปี" msgstr "" -#. National Children's Day +#. National Children's Day. 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,21 +269,25 @@ msgstr "" msgid "วันอาสาฬหบูชา" msgstr "" +#. Buddhist Lent Day. +msgid "เข้าปุริมพรรษา" +msgstr "" + #. Buddhist Lent Day. 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 "" @@ -203,46 +295,58 @@ 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 "" -#. 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/holidays/registry.py b/holidays/registry.py index 96818ded3..4df09fc37 100644 --- a/holidays/registry.py +++ b/holidays/registry.py @@ -183,9 +183,9 @@ } FINANCIAL: RegistryDict = { - "european_central_bank": ("EuropeanCentralBank", "ECB", "TAR"), + "european_central_bank": ("EuropeanCentralBank", "XECB", "ECB", "TAR"), "ice_futures_europe": ("ICEFuturesEurope", "IFEU"), - "ny_stock_exchange": ("NewYorkStockExchange", "NYSE", "XNYS"), + "ny_stock_exchange": ("NewYorkStockExchange", "XNYS", "NYSE"), "brasil_bolsa_balcao": ("BrasilBolsaBalcao", "BVMF", "B3"), } diff --git a/holidays/utils.py b/holidays/utils.py index 1da1ae3e1..ae6bd0c72 100755 --- a/holidays/utils.py +++ b/holidays/utils.py @@ -252,11 +252,7 @@ def financial_holidays( try: return getattr(holidays, market)( - years=years, - subdiv=subdiv, - expand=expand, - observed=observed, - language=language, + years=years, subdiv=subdiv, expand=expand, observed=observed, language=language ) except AttributeError: raise NotImplementedError(f"Financial market {market} not available") diff --git a/holidays/version.py b/holidays/version.py index e09afe488..bc67fe625 100644 --- a/holidays/version.py +++ b/holidays/version.py @@ -10,4 +10,4 @@ # Website: https://github.com/vacanza/holidays # License: MIT (see LICENSE file) -__version__ = "0.62" +__version__ = "0.63" diff --git a/pyproject.toml b/pyproject.toml index 9f725d14f..5cb011711 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,6 +82,9 @@ module = "holidays.groups.*" disable_error_code = "attr-defined" [tool.pytest.ini_options] +addopts = [ + "--cov-fail-under=100", +] filterwarnings = [ "ignore::DeprecationWarning:holidays.deprecations.v1_incompatibility", ] diff --git a/requirements/dev.txt b/requirements/dev.txt index 8ebd4d5de..b255ffb2d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -7,7 +7,7 @@ hijridate==2.5.0 lingva==5.0.4 pre-commit==4.0.1 pygithub==2.5.0 -ruff==0.8.0 +ruff==0.8.2 tox==4.23.2 urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/requirements/tests.txt b/requirements/tests.txt index 77ad1355f..2463cfb6d 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,11 +1,11 @@ # Test requirements. -coverage==7.6.8 +coverage==7.6.9 importlib-metadata==8.5.0 numpy<2.1.0; python_version < '3.10' -numpy==2.1.2; python_version >= '3.10' +numpy==2.2.0; python_version >= '3.10' polib==1.2.0 pytest-cov==6.0.0 pytest-xdist==3.6.1 -pytest==8.3.3 +pytest==8.3.4 zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/snapshots/countries/KZ_COMMON.json b/snapshots/countries/KZ_COMMON.json index fcf1d1045..cee56e14b 100644 --- a/snapshots/countries/KZ_COMMON.json +++ b/snapshots/countries/KZ_COMMON.json @@ -528,6 +528,7 @@ "2024-12-16": "Independence Day", "2025-01-01": "New Year's Day", "2025-01-02": "New Year's Day", + "2025-01-03": "Day off (substituted from 01/05/2025)", "2025-01-07": "Orthodox Christmas", "2025-03-08": "International Women's Day", "2025-03-10": "International Women's Day (observed)", @@ -539,7 +540,7 @@ "2025-05-01": "Kazakhstan's People Solidarity Holiday", "2025-05-07": "Defender of the Fatherland Day", "2025-05-09": "Victory Day", - "2025-06-06": "Eid al-Adha (estimated)", + "2025-06-06": "Eid al-Adha", "2025-07-06": "Capital Day", "2025-07-07": "Capital Day (observed)", "2025-08-30": "Constitution Day", 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/snapshots/countries/US_COMMON.json b/snapshots/countries/US_COMMON.json index 4d1010471..0b1335add 100644 --- a/snapshots/countries/US_COMMON.json +++ b/snapshots/countries/US_COMMON.json @@ -8,6 +8,7 @@ "1950-05-30": "Memorial Day", "1950-07-04": "Independence Day", "1950-09-04": "Labor Day", + "1950-10-12": "Columbus Day", "1950-10-31": "Halloween", "1950-11-10": "Armistice Day (observed)", "1950-11-11": "Armistice Day", @@ -21,6 +22,7 @@ "1951-05-30": "Memorial Day", "1951-07-04": "Independence Day", "1951-09-03": "Labor Day", + "1951-10-12": "Columbus Day", "1951-10-31": "Halloween", "1951-11-11": "Armistice Day", "1951-11-12": "Armistice Day (observed)", @@ -34,6 +36,7 @@ "1952-05-30": "Memorial Day", "1952-07-04": "Independence Day", "1952-09-01": "Labor Day", + "1952-10-12": "Columbus Day", "1952-10-31": "Halloween", "1952-11-04": "Election Day", "1952-11-11": "Armistice Day", @@ -48,6 +51,7 @@ "1953-07-03": "Independence Day (observed)", "1953-07-04": "Independence Day", "1953-09-07": "Labor Day", + "1953-10-12": "Columbus Day", "1953-10-31": "Halloween", "1953-11-11": "Armistice Day", "1953-11-26": "Thanksgiving", @@ -61,6 +65,7 @@ "1954-07-04": "Independence Day", "1954-07-05": "Independence Day (observed)", "1954-09-06": "Labor Day", + "1954-10-12": "Columbus Day", "1954-10-31": "Halloween", "1954-11-11": "Veterans Day", "1954-11-25": "Thanksgiving", @@ -75,6 +80,7 @@ "1955-05-30": "Memorial Day", "1955-07-04": "Independence Day", "1955-09-05": "Labor Day", + "1955-10-12": "Columbus Day", "1955-10-31": "Halloween", "1955-11-11": "Veterans Day", "1955-11-24": "Thanksgiving", @@ -89,6 +95,7 @@ "1956-05-30": "Memorial Day", "1956-07-04": "Independence Day", "1956-09-03": "Labor Day", + "1956-10-12": "Columbus Day", "1956-10-31": "Halloween", "1956-11-06": "Election Day", "1956-11-11": "Veterans Day", @@ -103,6 +110,7 @@ "1957-05-30": "Memorial Day", "1957-07-04": "Independence Day", "1957-09-02": "Labor Day", + "1957-10-12": "Columbus Day", "1957-10-31": "Halloween", "1957-11-11": "Veterans Day", "1957-11-28": "Thanksgiving", @@ -115,6 +123,7 @@ "1958-05-30": "Memorial Day", "1958-07-04": "Independence Day", "1958-09-01": "Labor Day", + "1958-10-12": "Columbus Day", "1958-10-31": "Halloween", "1958-11-11": "Veterans Day", "1958-11-27": "Thanksgiving", @@ -128,6 +137,7 @@ "1959-07-03": "Independence Day (observed)", "1959-07-04": "Independence Day", "1959-09-07": "Labor Day", + "1959-10-12": "Columbus Day", "1959-10-31": "Halloween", "1959-11-11": "Veterans Day", "1959-11-26": "Thanksgiving", @@ -140,6 +150,7 @@ "1960-05-30": "Memorial Day", "1960-07-04": "Independence Day", "1960-09-05": "Labor Day", + "1960-10-12": "Columbus Day", "1960-10-31": "Halloween", "1960-11-08": "Election Day", "1960-11-11": "Veterans Day", @@ -155,6 +166,7 @@ "1961-05-30": "Memorial Day", "1961-07-04": "Independence Day", "1961-09-04": "Labor Day", + "1961-10-12": "Columbus Day", "1961-10-31": "Halloween", "1961-11-10": "Veterans Day (observed)", "1961-11-11": "Veterans Day", @@ -168,6 +180,7 @@ "1962-05-30": "Memorial Day", "1962-07-04": "Independence Day", "1962-09-03": "Labor Day", + "1962-10-12": "Columbus Day", "1962-10-31": "Halloween", "1962-11-11": "Veterans Day", "1962-11-12": "Veterans Day (observed)", @@ -181,6 +194,7 @@ "1963-05-30": "Memorial Day", "1963-07-04": "Independence Day", "1963-09-02": "Labor Day", + "1963-10-12": "Columbus Day", "1963-10-31": "Halloween", "1963-11-11": "Veterans Day", "1963-11-28": "Thanksgiving", @@ -194,6 +208,7 @@ "1964-07-03": "Independence Day (observed)", "1964-07-04": "Independence Day", "1964-09-07": "Labor Day", + "1964-10-12": "Columbus Day", "1964-10-31": "Halloween", "1964-11-03": "Election Day", "1964-11-11": "Veterans Day", @@ -208,6 +223,7 @@ "1965-07-04": "Independence Day", "1965-07-05": "Independence Day (observed)", "1965-09-06": "Labor Day", + "1965-10-12": "Columbus Day", "1965-10-31": "Halloween", "1965-11-11": "Veterans Day", "1965-11-25": "Thanksgiving", @@ -222,6 +238,7 @@ "1966-05-30": "Memorial Day", "1966-07-04": "Independence Day", "1966-09-05": "Labor Day", + "1966-10-12": "Columbus Day", "1966-10-31": "Halloween", "1966-11-11": "Veterans Day", "1966-11-24": "Thanksgiving", @@ -236,6 +253,7 @@ "1967-05-30": "Memorial Day", "1967-07-04": "Independence Day", "1967-09-04": "Labor Day", + "1967-10-12": "Columbus Day", "1967-10-31": "Halloween", "1967-11-10": "Veterans Day (observed)", "1967-11-11": "Veterans Day", @@ -249,6 +267,7 @@ "1968-05-30": "Memorial Day", "1968-07-04": "Independence Day", "1968-09-02": "Labor Day", + "1968-10-12": "Columbus Day", "1968-10-31": "Halloween", "1968-11-05": "Election Day", "1968-11-11": "Veterans Day", @@ -262,6 +281,7 @@ "1969-05-30": "Memorial Day", "1969-07-04": "Independence Day", "1969-09-01": "Labor Day", + "1969-10-12": "Columbus Day", "1969-10-31": "Halloween", "1969-11-11": "Veterans Day", "1969-11-27": "Thanksgiving", @@ -275,6 +295,7 @@ "1970-07-03": "Independence Day (observed)", "1970-07-04": "Independence Day", "1970-09-07": "Labor Day", + "1970-10-12": "Columbus Day", "1970-10-31": "Halloween", "1970-11-11": "Veterans Day", "1970-11-26": "Thanksgiving", @@ -288,6 +309,7 @@ "1971-07-04": "Independence Day", "1971-07-05": "Independence Day (observed)", "1971-09-06": "Labor Day", + "1971-10-11": "Columbus Day", "1971-10-25": "Veterans Day", "1971-10-31": "Halloween", "1971-11-25": "Thanksgiving", @@ -302,6 +324,7 @@ "1972-05-29": "Memorial Day", "1972-07-04": "Independence Day", "1972-09-04": "Labor Day", + "1972-10-09": "Columbus Day", "1972-10-23": "Veterans Day", "1972-10-31": "Halloween", "1972-11-07": "Election Day", @@ -315,6 +338,7 @@ "1973-05-28": "Memorial Day", "1973-07-04": "Independence Day", "1973-09-03": "Labor Day", + "1973-10-08": "Columbus Day", "1973-10-22": "Veterans Day", "1973-10-31": "Halloween", "1973-11-22": "Thanksgiving", @@ -327,6 +351,7 @@ "1974-05-27": "Memorial Day", "1974-07-04": "Independence Day", "1974-09-02": "Labor Day", + "1974-10-14": "Columbus Day", "1974-10-28": "Veterans Day", "1974-10-31": "Halloween", "1974-11-28": "Thanksgiving", @@ -339,6 +364,7 @@ "1975-05-26": "Memorial Day", "1975-07-04": "Independence Day", "1975-09-01": "Labor Day", + "1975-10-13": "Columbus Day", "1975-10-27": "Veterans Day", "1975-10-31": "Halloween", "1975-11-27": "Thanksgiving", @@ -352,6 +378,7 @@ "1976-07-04": "Independence Day", "1976-07-05": "Independence Day (observed)", "1976-09-06": "Labor Day", + "1976-10-11": "Columbus Day", "1976-10-25": "Veterans Day", "1976-10-31": "Halloween", "1976-11-02": "Election Day", @@ -367,6 +394,7 @@ "1977-05-30": "Memorial Day", "1977-07-04": "Independence Day", "1977-09-05": "Labor Day", + "1977-10-10": "Columbus Day", "1977-10-24": "Veterans Day", "1977-10-31": "Halloween", "1977-11-24": "Thanksgiving", @@ -381,6 +409,7 @@ "1978-05-29": "Memorial Day", "1978-07-04": "Independence Day", "1978-09-04": "Labor Day", + "1978-10-09": "Columbus Day", "1978-10-31": "Halloween", "1978-11-10": "Veterans Day (observed)", "1978-11-11": "Veterans Day", @@ -394,6 +423,7 @@ "1979-05-28": "Memorial Day", "1979-07-04": "Independence Day", "1979-09-03": "Labor Day", + "1979-10-08": "Columbus Day", "1979-10-31": "Halloween", "1979-11-11": "Veterans Day", "1979-11-12": "Veterans Day (observed)", @@ -407,6 +437,7 @@ "1980-05-26": "Memorial Day", "1980-07-04": "Independence Day", "1980-09-01": "Labor Day", + "1980-10-13": "Columbus Day", "1980-10-31": "Halloween", "1980-11-04": "Election Day", "1980-11-11": "Veterans Day", @@ -421,6 +452,7 @@ "1981-07-03": "Independence Day (observed)", "1981-07-04": "Independence Day", "1981-09-07": "Labor Day", + "1981-10-12": "Columbus Day", "1981-10-31": "Halloween", "1981-11-11": "Veterans Day", "1981-11-26": "Thanksgiving", @@ -434,6 +466,7 @@ "1982-07-04": "Independence Day", "1982-07-05": "Independence Day (observed)", "1982-09-06": "Labor Day", + "1982-10-11": "Columbus Day", "1982-10-31": "Halloween", "1982-11-11": "Veterans Day", "1982-11-25": "Thanksgiving", @@ -448,6 +481,7 @@ "1983-05-30": "Memorial Day", "1983-07-04": "Independence Day", "1983-09-05": "Labor Day", + "1983-10-10": "Columbus Day", "1983-10-31": "Halloween", "1983-11-11": "Veterans Day", "1983-11-24": "Thanksgiving", @@ -462,6 +496,7 @@ "1984-05-28": "Memorial Day", "1984-07-04": "Independence Day", "1984-09-03": "Labor Day", + "1984-10-08": "Columbus Day", "1984-10-31": "Halloween", "1984-11-06": "Election Day", "1984-11-11": "Veterans Day", @@ -476,6 +511,7 @@ "1985-05-27": "Memorial Day", "1985-07-04": "Independence Day", "1985-09-02": "Labor Day", + "1985-10-14": "Columbus Day", "1985-10-31": "Halloween", "1985-11-11": "Veterans Day", "1985-11-28": "Thanksgiving", @@ -489,6 +525,7 @@ "1986-05-26": "Memorial Day", "1986-07-04": "Independence Day", "1986-09-01": "Labor Day", + "1986-10-13": "Columbus Day", "1986-10-31": "Halloween", "1986-11-11": "Veterans Day", "1986-11-27": "Thanksgiving", @@ -503,6 +540,7 @@ "1987-07-03": "Independence Day (observed)", "1987-07-04": "Independence Day", "1987-09-07": "Labor Day", + "1987-10-12": "Columbus Day", "1987-10-31": "Halloween", "1987-11-11": "Veterans Day", "1987-11-26": "Thanksgiving", @@ -516,6 +554,7 @@ "1988-05-30": "Memorial Day", "1988-07-04": "Independence Day", "1988-09-05": "Labor Day", + "1988-10-10": "Columbus Day", "1988-10-31": "Halloween", "1988-11-08": "Election Day", "1988-11-11": "Veterans Day", @@ -532,6 +571,7 @@ "1989-05-29": "Memorial Day", "1989-07-04": "Independence Day", "1989-09-04": "Labor Day", + "1989-10-09": "Columbus Day", "1989-10-31": "Halloween", "1989-11-10": "Veterans Day (observed)", "1989-11-11": "Veterans Day", @@ -546,6 +586,7 @@ "1990-05-28": "Memorial Day", "1990-07-04": "Independence Day", "1990-09-03": "Labor Day", + "1990-10-08": "Columbus Day", "1990-10-31": "Halloween", "1990-11-11": "Veterans Day", "1990-11-12": "Veterans Day (observed)", @@ -560,6 +601,7 @@ "1991-05-27": "Memorial Day", "1991-07-04": "Independence Day", "1991-09-02": "Labor Day", + "1991-10-14": "Columbus Day", "1991-10-31": "Halloween", "1991-11-11": "Veterans Day", "1991-11-28": "Thanksgiving", @@ -574,6 +616,7 @@ "1992-07-03": "Independence Day (observed)", "1992-07-04": "Independence Day", "1992-09-07": "Labor Day", + "1992-10-12": "Columbus Day", "1992-10-31": "Halloween", "1992-11-03": "Election Day", "1992-11-11": "Veterans Day", @@ -589,6 +632,7 @@ "1993-07-04": "Independence Day", "1993-07-05": "Independence Day (observed)", "1993-09-06": "Labor Day", + "1993-10-11": "Columbus Day", "1993-10-31": "Halloween", "1993-11-11": "Veterans Day", "1993-11-25": "Thanksgiving", @@ -604,6 +648,7 @@ "1994-05-30": "Memorial Day", "1994-07-04": "Independence Day", "1994-09-05": "Labor Day", + "1994-10-10": "Columbus Day", "1994-10-31": "Halloween", "1994-11-11": "Veterans Day", "1994-11-24": "Thanksgiving", @@ -619,6 +664,7 @@ "1995-05-29": "Memorial Day", "1995-07-04": "Independence Day", "1995-09-04": "Labor Day", + "1995-10-09": "Columbus Day", "1995-10-31": "Halloween", "1995-11-10": "Veterans Day (observed)", "1995-11-11": "Veterans Day", @@ -633,6 +679,7 @@ "1996-05-27": "Memorial Day", "1996-07-04": "Independence Day", "1996-09-02": "Labor Day", + "1996-10-14": "Columbus Day", "1996-10-31": "Halloween", "1996-11-05": "Election Day", "1996-11-11": "Veterans Day", @@ -647,6 +694,7 @@ "1997-05-26": "Memorial Day", "1997-07-04": "Independence Day", "1997-09-01": "Labor Day", + "1997-10-13": "Columbus Day", "1997-10-31": "Halloween", "1997-11-11": "Veterans Day", "1997-11-27": "Thanksgiving", @@ -661,6 +709,7 @@ "1998-07-03": "Independence Day (observed)", "1998-07-04": "Independence Day", "1998-09-07": "Labor Day", + "1998-10-12": "Columbus Day", "1998-10-31": "Halloween", "1998-11-11": "Veterans Day", "1998-11-26": "Thanksgiving", @@ -675,6 +724,7 @@ "1999-07-04": "Independence Day", "1999-07-05": "Independence Day (observed)", "1999-09-06": "Labor Day", + "1999-10-11": "Columbus Day", "1999-10-31": "Halloween", "1999-11-11": "Veterans Day", "1999-11-25": "Thanksgiving", @@ -690,6 +740,7 @@ "2000-05-29": "Memorial Day", "2000-07-04": "Independence Day", "2000-09-04": "Labor Day", + "2000-10-09": "Columbus Day", "2000-10-31": "Halloween", "2000-11-07": "Election Day", "2000-11-10": "Veterans Day (observed)", @@ -705,6 +756,7 @@ "2001-05-28": "Memorial Day", "2001-07-04": "Independence Day", "2001-09-03": "Labor Day", + "2001-10-08": "Columbus Day", "2001-10-31": "Halloween", "2001-11-11": "Veterans Day", "2001-11-12": "Veterans Day (observed)", @@ -719,6 +771,7 @@ "2002-05-27": "Memorial Day", "2002-07-04": "Independence Day", "2002-09-02": "Labor Day", + "2002-10-14": "Columbus Day", "2002-10-31": "Halloween", "2002-11-11": "Veterans Day", "2002-11-28": "Thanksgiving", @@ -732,6 +785,7 @@ "2003-05-26": "Memorial Day", "2003-07-04": "Independence Day", "2003-09-01": "Labor Day", + "2003-10-13": "Columbus Day", "2003-10-31": "Halloween", "2003-11-11": "Veterans Day", "2003-11-27": "Thanksgiving", @@ -746,6 +800,7 @@ "2004-07-04": "Independence Day", "2004-07-05": "Independence Day (observed)", "2004-09-06": "Labor Day", + "2004-10-11": "Columbus Day", "2004-10-31": "Halloween", "2004-11-02": "Election Day", "2004-11-11": "Veterans Day", @@ -762,6 +817,7 @@ "2005-05-30": "Memorial Day", "2005-07-04": "Independence Day", "2005-09-05": "Labor Day", + "2005-10-10": "Columbus Day", "2005-10-31": "Halloween", "2005-11-11": "Veterans Day", "2005-11-24": "Thanksgiving", @@ -777,6 +833,7 @@ "2006-05-29": "Memorial Day", "2006-07-04": "Independence Day", "2006-09-04": "Labor Day", + "2006-10-09": "Columbus Day", "2006-10-31": "Halloween", "2006-11-10": "Veterans Day (observed)", "2006-11-11": "Veterans Day", @@ -791,6 +848,7 @@ "2007-05-28": "Memorial Day", "2007-07-04": "Independence Day", "2007-09-03": "Labor Day", + "2007-10-08": "Columbus Day", "2007-10-31": "Halloween", "2007-11-11": "Veterans Day", "2007-11-12": "Veterans Day (observed)", @@ -805,6 +863,7 @@ "2008-05-26": "Memorial Day", "2008-07-04": "Independence Day", "2008-09-01": "Labor Day", + "2008-10-13": "Columbus Day", "2008-10-31": "Halloween", "2008-11-04": "Election Day", "2008-11-11": "Veterans Day", @@ -820,6 +879,7 @@ "2009-07-03": "Independence Day (observed)", "2009-07-04": "Independence Day", "2009-09-07": "Labor Day", + "2009-10-12": "Columbus Day", "2009-10-31": "Halloween", "2009-11-11": "Veterans Day", "2009-11-26": "Thanksgiving", @@ -834,6 +894,7 @@ "2010-07-04": "Independence Day", "2010-07-05": "Independence Day (observed)", "2010-09-06": "Labor Day", + "2010-10-11": "Columbus Day", "2010-10-31": "Halloween", "2010-11-11": "Veterans Day", "2010-11-25": "Thanksgiving", @@ -849,6 +910,7 @@ "2011-05-30": "Memorial Day", "2011-07-04": "Independence Day", "2011-09-05": "Labor Day", + "2011-10-10": "Columbus Day", "2011-10-31": "Halloween", "2011-11-11": "Veterans Day", "2011-11-24": "Thanksgiving", @@ -864,6 +926,7 @@ "2012-05-28": "Memorial Day", "2012-07-04": "Independence Day", "2012-09-03": "Labor Day", + "2012-10-08": "Columbus Day", "2012-10-31": "Halloween", "2012-11-06": "Election Day", "2012-11-11": "Veterans Day", @@ -879,6 +942,7 @@ "2013-05-27": "Memorial Day", "2013-07-04": "Independence Day", "2013-09-02": "Labor Day", + "2013-10-14": "Columbus Day", "2013-10-31": "Halloween", "2013-11-11": "Veterans Day", "2013-11-28": "Thanksgiving", @@ -892,6 +956,7 @@ "2014-05-26": "Memorial Day", "2014-07-04": "Independence Day", "2014-09-01": "Labor Day", + "2014-10-13": "Columbus Day", "2014-10-31": "Halloween", "2014-11-11": "Veterans Day", "2014-11-27": "Thanksgiving", @@ -906,6 +971,7 @@ "2015-07-03": "Independence Day (observed)", "2015-07-04": "Independence Day", "2015-09-07": "Labor Day", + "2015-10-12": "Columbus Day", "2015-10-31": "Halloween", "2015-11-11": "Veterans Day", "2015-11-26": "Thanksgiving", @@ -919,6 +985,7 @@ "2016-05-30": "Memorial Day", "2016-07-04": "Independence Day", "2016-09-05": "Labor Day", + "2016-10-10": "Columbus Day", "2016-10-31": "Halloween", "2016-11-08": "Election Day", "2016-11-11": "Veterans Day", @@ -935,6 +1002,7 @@ "2017-05-29": "Memorial Day", "2017-07-04": "Independence Day", "2017-09-04": "Labor Day", + "2017-10-09": "Columbus Day", "2017-10-31": "Halloween", "2017-11-10": "Veterans Day (observed)", "2017-11-11": "Veterans Day", @@ -949,6 +1017,7 @@ "2018-05-28": "Memorial Day", "2018-07-04": "Independence Day", "2018-09-03": "Labor Day", + "2018-10-08": "Columbus Day", "2018-10-31": "Halloween", "2018-11-11": "Veterans Day", "2018-11-12": "Veterans Day (observed)", @@ -963,6 +1032,7 @@ "2019-05-27": "Memorial Day", "2019-07-04": "Independence Day", "2019-09-02": "Labor Day", + "2019-10-14": "Columbus Day", "2019-10-31": "Halloween", "2019-11-11": "Veterans Day", "2019-11-28": "Thanksgiving", @@ -977,6 +1047,7 @@ "2020-07-03": "Independence Day (observed)", "2020-07-04": "Independence Day", "2020-09-07": "Labor Day", + "2020-10-12": "Columbus Day", "2020-10-31": "Halloween", "2020-11-03": "Election Day", "2020-11-11": "Veterans Day", @@ -994,6 +1065,7 @@ "2021-07-04": "Independence Day", "2021-07-05": "Independence Day (observed)", "2021-09-06": "Labor Day", + "2021-10-11": "Columbus Day", "2021-10-31": "Halloween", "2021-11-11": "Veterans Day", "2021-11-25": "Thanksgiving", @@ -1011,6 +1083,7 @@ "2022-06-20": "Juneteenth National Independence Day (observed)", "2022-07-04": "Independence Day", "2022-09-05": "Labor Day", + "2022-10-10": "Columbus Day", "2022-10-31": "Halloween", "2022-11-11": "Veterans Day", "2022-11-24": "Thanksgiving", @@ -1027,6 +1100,7 @@ "2023-06-19": "Juneteenth National Independence Day", "2023-07-04": "Independence Day", "2023-09-04": "Labor Day", + "2023-10-09": "Columbus Day", "2023-10-31": "Halloween", "2023-11-10": "Veterans Day (observed)", "2023-11-11": "Veterans Day", @@ -1042,6 +1116,7 @@ "2024-06-19": "Juneteenth National Independence Day", "2024-07-04": "Independence Day", "2024-09-02": "Labor Day", + "2024-10-14": "Columbus Day", "2024-10-31": "Halloween", "2024-11-05": "Election Day", "2024-11-11": "Veterans Day", @@ -1057,6 +1132,7 @@ "2025-06-19": "Juneteenth National Independence Day", "2025-07-04": "Independence Day", "2025-09-01": "Labor Day", + "2025-10-13": "Columbus Day", "2025-10-31": "Halloween", "2025-11-11": "Veterans Day", "2025-11-27": "Thanksgiving", @@ -1072,6 +1148,7 @@ "2026-07-03": "Independence Day (observed)", "2026-07-04": "Independence Day", "2026-09-07": "Labor Day", + "2026-10-12": "Columbus Day", "2026-10-31": "Halloween", "2026-11-11": "Veterans Day", "2026-11-26": "Thanksgiving", @@ -1088,6 +1165,7 @@ "2027-07-04": "Independence Day", "2027-07-05": "Independence Day (observed)", "2027-09-06": "Labor Day", + "2027-10-11": "Columbus Day", "2027-10-31": "Halloween", "2027-11-11": "Veterans Day", "2027-11-25": "Thanksgiving", @@ -1104,6 +1182,7 @@ "2028-06-19": "Juneteenth National Independence Day", "2028-07-04": "Independence Day", "2028-09-04": "Labor Day", + "2028-10-09": "Columbus Day", "2028-10-31": "Halloween", "2028-11-07": "Election Day", "2028-11-10": "Veterans Day (observed)", @@ -1120,6 +1199,7 @@ "2029-06-19": "Juneteenth National Independence Day", "2029-07-04": "Independence Day", "2029-09-03": "Labor Day", + "2029-10-08": "Columbus Day", "2029-10-31": "Halloween", "2029-11-11": "Veterans Day", "2029-11-12": "Veterans Day (observed)", @@ -1135,6 +1215,7 @@ "2030-06-19": "Juneteenth National Independence Day", "2030-07-04": "Independence Day", "2030-09-02": "Labor Day", + "2030-10-14": "Columbus Day", "2030-10-31": "Halloween", "2030-11-11": "Veterans Day", "2030-11-28": "Thanksgiving", @@ -1149,6 +1230,7 @@ "2031-06-19": "Juneteenth National Independence Day", "2031-07-04": "Independence Day", "2031-09-01": "Labor Day", + "2031-10-13": "Columbus Day", "2031-10-31": "Halloween", "2031-11-11": "Veterans Day", "2031-11-27": "Thanksgiving", @@ -1165,6 +1247,7 @@ "2032-07-04": "Independence Day", "2032-07-05": "Independence Day (observed)", "2032-09-06": "Labor Day", + "2032-10-11": "Columbus Day", "2032-10-31": "Halloween", "2032-11-02": "Election Day", "2032-11-11": "Veterans Day", @@ -1183,6 +1266,7 @@ "2033-06-20": "Juneteenth National Independence Day (observed)", "2033-07-04": "Independence Day", "2033-09-05": "Labor Day", + "2033-10-10": "Columbus Day", "2033-10-31": "Halloween", "2033-11-11": "Veterans Day", "2033-11-24": "Thanksgiving", @@ -1199,6 +1283,7 @@ "2034-06-19": "Juneteenth National Independence Day", "2034-07-04": "Independence Day", "2034-09-04": "Labor Day", + "2034-10-09": "Columbus Day", "2034-10-31": "Halloween", "2034-11-10": "Veterans Day (observed)", "2034-11-11": "Veterans Day", @@ -1214,6 +1299,7 @@ "2035-06-19": "Juneteenth National Independence Day", "2035-07-04": "Independence Day", "2035-09-03": "Labor Day", + "2035-10-08": "Columbus Day", "2035-10-31": "Halloween", "2035-11-11": "Veterans Day", "2035-11-12": "Veterans Day (observed)", @@ -1229,6 +1315,7 @@ "2036-06-19": "Juneteenth National Independence Day", "2036-07-04": "Independence Day", "2036-09-01": "Labor Day", + "2036-10-13": "Columbus Day", "2036-10-31": "Halloween", "2036-11-04": "Election Day", "2036-11-11": "Veterans Day", @@ -1245,6 +1332,7 @@ "2037-07-03": "Independence Day (observed)", "2037-07-04": "Independence Day", "2037-09-07": "Labor Day", + "2037-10-12": "Columbus Day", "2037-10-31": "Halloween", "2037-11-11": "Veterans Day", "2037-11-26": "Thanksgiving", @@ -1261,6 +1349,7 @@ "2038-07-04": "Independence Day", "2038-07-05": "Independence Day (observed)", "2038-09-06": "Labor Day", + "2038-10-11": "Columbus Day", "2038-10-31": "Halloween", "2038-11-11": "Veterans Day", "2038-11-25": "Thanksgiving", @@ -1278,6 +1367,7 @@ "2039-06-20": "Juneteenth National Independence Day (observed)", "2039-07-04": "Independence Day", "2039-09-05": "Labor Day", + "2039-10-10": "Columbus Day", "2039-10-31": "Halloween", "2039-11-11": "Veterans Day", "2039-11-24": "Thanksgiving", @@ -1294,6 +1384,7 @@ "2040-06-19": "Juneteenth National Independence Day", "2040-07-04": "Independence Day", "2040-09-03": "Labor Day", + "2040-10-08": "Columbus Day", "2040-10-31": "Halloween", "2040-11-06": "Election Day", "2040-11-11": "Veterans Day", @@ -1310,6 +1401,7 @@ "2041-06-19": "Juneteenth National Independence Day", "2041-07-04": "Independence Day", "2041-09-02": "Labor Day", + "2041-10-14": "Columbus Day", "2041-10-31": "Halloween", "2041-11-11": "Veterans Day", "2041-11-28": "Thanksgiving", @@ -1324,6 +1416,7 @@ "2042-06-19": "Juneteenth National Independence Day", "2042-07-04": "Independence Day", "2042-09-01": "Labor Day", + "2042-10-13": "Columbus Day", "2042-10-31": "Halloween", "2042-11-11": "Veterans Day", "2042-11-27": "Thanksgiving", @@ -1339,6 +1432,7 @@ "2043-07-03": "Independence Day (observed)", "2043-07-04": "Independence Day", "2043-09-07": "Labor Day", + "2043-10-12": "Columbus Day", "2043-10-31": "Halloween", "2043-11-11": "Veterans Day", "2043-11-26": "Thanksgiving", @@ -1354,6 +1448,7 @@ "2044-06-20": "Juneteenth National Independence Day (observed)", "2044-07-04": "Independence Day", "2044-09-05": "Labor Day", + "2044-10-10": "Columbus Day", "2044-10-31": "Halloween", "2044-11-08": "Election Day", "2044-11-11": "Veterans Day", @@ -1371,6 +1466,7 @@ "2045-06-19": "Juneteenth National Independence Day", "2045-07-04": "Independence Day", "2045-09-04": "Labor Day", + "2045-10-09": "Columbus Day", "2045-10-31": "Halloween", "2045-11-10": "Veterans Day (observed)", "2045-11-11": "Veterans Day", @@ -1386,6 +1482,7 @@ "2046-06-19": "Juneteenth National Independence Day", "2046-07-04": "Independence Day", "2046-09-03": "Labor Day", + "2046-10-08": "Columbus Day", "2046-10-31": "Halloween", "2046-11-11": "Veterans Day", "2046-11-12": "Veterans Day (observed)", @@ -1401,6 +1498,7 @@ "2047-06-19": "Juneteenth National Independence Day", "2047-07-04": "Independence Day", "2047-09-02": "Labor Day", + "2047-10-14": "Columbus Day", "2047-10-31": "Halloween", "2047-11-11": "Veterans Day", "2047-11-28": "Thanksgiving", @@ -1416,6 +1514,7 @@ "2048-07-03": "Independence Day (observed)", "2048-07-04": "Independence Day", "2048-09-07": "Labor Day", + "2048-10-12": "Columbus Day", "2048-10-31": "Halloween", "2048-11-03": "Election Day", "2048-11-11": "Veterans Day", @@ -1433,6 +1532,7 @@ "2049-07-04": "Independence Day", "2049-07-05": "Independence Day (observed)", "2049-09-06": "Labor Day", + "2049-10-11": "Columbus Day", "2049-10-31": "Halloween", "2049-11-11": "Veterans Day", "2049-11-25": "Thanksgiving", @@ -1450,6 +1550,7 @@ "2050-06-20": "Juneteenth National Independence Day (observed)", "2050-07-04": "Independence Day", "2050-09-05": "Labor Day", + "2050-10-10": "Columbus Day", "2050-10-31": "Halloween", "2050-11-11": "Veterans Day", "2050-11-24": "Thanksgiving", diff --git a/snapshots/financial/ECB.json b/snapshots/financial/XECB.json similarity index 65% rename from snapshots/financial/ECB.json rename to snapshots/financial/XECB.json index 905e15ef8..0fe37a3dd 100644 --- a/snapshots/financial/ECB.json +++ b/snapshots/financial/XECB.json @@ -2,308 +2,308 @@ "2000-01-01": "New Year's Day", "2000-04-21": "Good Friday", "2000-04-24": "Easter Monday", - "2000-05-01": "1 May (Labour Day)", + "2000-05-01": "Labour Day", "2000-12-25": "Christmas Day", - "2000-12-26": "26 December", + "2000-12-26": "Christmas Holiday", "2000-12-31": "Additional closing day", "2001-01-01": "New Year's Day", "2001-04-13": "Good Friday", "2001-04-16": "Easter Monday", - "2001-05-01": "1 May (Labour Day)", + "2001-05-01": "Labour Day", "2001-12-25": "Christmas Day", - "2001-12-26": "26 December", + "2001-12-26": "Christmas Holiday", "2002-01-01": "New Year's Day", "2002-03-29": "Good Friday", "2002-04-01": "Easter Monday", - "2002-05-01": "1 May (Labour Day)", + "2002-05-01": "Labour Day", "2002-12-25": "Christmas Day", - "2002-12-26": "26 December", + "2002-12-26": "Christmas Holiday", "2003-01-01": "New Year's Day", "2003-04-18": "Good Friday", "2003-04-21": "Easter Monday", - "2003-05-01": "1 May (Labour Day)", + "2003-05-01": "Labour Day", "2003-12-25": "Christmas Day", - "2003-12-26": "26 December", + "2003-12-26": "Christmas Holiday", "2004-01-01": "New Year's Day", "2004-04-09": "Good Friday", "2004-04-12": "Easter Monday", - "2004-05-01": "1 May (Labour Day)", + "2004-05-01": "Labour Day", "2004-12-25": "Christmas Day", - "2004-12-26": "26 December", + "2004-12-26": "Christmas Holiday", "2005-01-01": "New Year's Day", "2005-03-25": "Good Friday", "2005-03-28": "Easter Monday", - "2005-05-01": "1 May (Labour Day)", + "2005-05-01": "Labour Day", "2005-12-25": "Christmas Day", - "2005-12-26": "26 December", + "2005-12-26": "Christmas Holiday", "2006-01-01": "New Year's Day", "2006-04-14": "Good Friday", "2006-04-17": "Easter Monday", - "2006-05-01": "1 May (Labour Day)", + "2006-05-01": "Labour Day", "2006-12-25": "Christmas Day", - "2006-12-26": "26 December", + "2006-12-26": "Christmas Holiday", "2007-01-01": "New Year's Day", "2007-04-06": "Good Friday", "2007-04-09": "Easter Monday", - "2007-05-01": "1 May (Labour Day)", + "2007-05-01": "Labour Day", "2007-12-25": "Christmas Day", - "2007-12-26": "26 December", + "2007-12-26": "Christmas Holiday", "2008-01-01": "New Year's Day", "2008-03-21": "Good Friday", "2008-03-24": "Easter Monday", - "2008-05-01": "1 May (Labour Day)", + "2008-05-01": "Labour Day", "2008-12-25": "Christmas Day", - "2008-12-26": "26 December", + "2008-12-26": "Christmas Holiday", "2009-01-01": "New Year's Day", "2009-04-10": "Good Friday", "2009-04-13": "Easter Monday", - "2009-05-01": "1 May (Labour Day)", + "2009-05-01": "Labour Day", "2009-12-25": "Christmas Day", - "2009-12-26": "26 December", + "2009-12-26": "Christmas Holiday", "2010-01-01": "New Year's Day", "2010-04-02": "Good Friday", "2010-04-05": "Easter Monday", - "2010-05-01": "1 May (Labour Day)", + "2010-05-01": "Labour Day", "2010-12-25": "Christmas Day", - "2010-12-26": "26 December", + "2010-12-26": "Christmas Holiday", "2011-01-01": "New Year's Day", "2011-04-22": "Good Friday", "2011-04-25": "Easter Monday", - "2011-05-01": "1 May (Labour Day)", + "2011-05-01": "Labour Day", "2011-12-25": "Christmas Day", - "2011-12-26": "26 December", + "2011-12-26": "Christmas Holiday", "2012-01-01": "New Year's Day", "2012-04-06": "Good Friday", "2012-04-09": "Easter Monday", - "2012-05-01": "1 May (Labour Day)", + "2012-05-01": "Labour Day", "2012-12-25": "Christmas Day", - "2012-12-26": "26 December", + "2012-12-26": "Christmas Holiday", "2013-01-01": "New Year's Day", "2013-03-29": "Good Friday", "2013-04-01": "Easter Monday", - "2013-05-01": "1 May (Labour Day)", + "2013-05-01": "Labour Day", "2013-12-25": "Christmas Day", - "2013-12-26": "26 December", + "2013-12-26": "Christmas Holiday", "2014-01-01": "New Year's Day", "2014-04-18": "Good Friday", "2014-04-21": "Easter Monday", - "2014-05-01": "1 May (Labour Day)", + "2014-05-01": "Labour Day", "2014-12-25": "Christmas Day", - "2014-12-26": "26 December", + "2014-12-26": "Christmas Holiday", "2015-01-01": "New Year's Day", "2015-04-03": "Good Friday", "2015-04-06": "Easter Monday", - "2015-05-01": "1 May (Labour Day)", + "2015-05-01": "Labour Day", "2015-12-25": "Christmas Day", - "2015-12-26": "26 December", + "2015-12-26": "Christmas Holiday", "2016-01-01": "New Year's Day", "2016-03-25": "Good Friday", "2016-03-28": "Easter Monday", - "2016-05-01": "1 May (Labour Day)", + "2016-05-01": "Labour Day", "2016-12-25": "Christmas Day", - "2016-12-26": "26 December", + "2016-12-26": "Christmas Holiday", "2017-01-01": "New Year's Day", "2017-04-14": "Good Friday", "2017-04-17": "Easter Monday", - "2017-05-01": "1 May (Labour Day)", + "2017-05-01": "Labour Day", "2017-12-25": "Christmas Day", - "2017-12-26": "26 December", + "2017-12-26": "Christmas Holiday", "2018-01-01": "New Year's Day", "2018-03-30": "Good Friday", "2018-04-02": "Easter Monday", - "2018-05-01": "1 May (Labour Day)", + "2018-05-01": "Labour Day", "2018-12-25": "Christmas Day", - "2018-12-26": "26 December", + "2018-12-26": "Christmas Holiday", "2019-01-01": "New Year's Day", "2019-04-19": "Good Friday", "2019-04-22": "Easter Monday", - "2019-05-01": "1 May (Labour Day)", + "2019-05-01": "Labour Day", "2019-12-25": "Christmas Day", - "2019-12-26": "26 December", + "2019-12-26": "Christmas Holiday", "2020-01-01": "New Year's Day", "2020-04-10": "Good Friday", "2020-04-13": "Easter Monday", - "2020-05-01": "1 May (Labour Day)", + "2020-05-01": "Labour Day", "2020-12-25": "Christmas Day", - "2020-12-26": "26 December", + "2020-12-26": "Christmas Holiday", "2021-01-01": "New Year's Day", "2021-04-02": "Good Friday", "2021-04-05": "Easter Monday", - "2021-05-01": "1 May (Labour Day)", + "2021-05-01": "Labour Day", "2021-12-25": "Christmas Day", - "2021-12-26": "26 December", + "2021-12-26": "Christmas Holiday", "2022-01-01": "New Year's Day", "2022-04-15": "Good Friday", "2022-04-18": "Easter Monday", - "2022-05-01": "1 May (Labour Day)", + "2022-05-01": "Labour Day", "2022-12-25": "Christmas Day", - "2022-12-26": "26 December", + "2022-12-26": "Christmas Holiday", "2023-01-01": "New Year's Day", "2023-04-07": "Good Friday", "2023-04-10": "Easter Monday", - "2023-05-01": "1 May (Labour Day)", + "2023-05-01": "Labour Day", "2023-12-25": "Christmas Day", - "2023-12-26": "26 December", + "2023-12-26": "Christmas Holiday", "2024-01-01": "New Year's Day", "2024-03-29": "Good Friday", "2024-04-01": "Easter Monday", - "2024-05-01": "1 May (Labour Day)", + "2024-05-01": "Labour Day", "2024-12-25": "Christmas Day", - "2024-12-26": "26 December", + "2024-12-26": "Christmas Holiday", "2025-01-01": "New Year's Day", "2025-04-18": "Good Friday", "2025-04-21": "Easter Monday", - "2025-05-01": "1 May (Labour Day)", + "2025-05-01": "Labour Day", "2025-12-25": "Christmas Day", - "2025-12-26": "26 December", + "2025-12-26": "Christmas Holiday", "2026-01-01": "New Year's Day", "2026-04-03": "Good Friday", "2026-04-06": "Easter Monday", - "2026-05-01": "1 May (Labour Day)", + "2026-05-01": "Labour Day", "2026-12-25": "Christmas Day", - "2026-12-26": "26 December", + "2026-12-26": "Christmas Holiday", "2027-01-01": "New Year's Day", "2027-03-26": "Good Friday", "2027-03-29": "Easter Monday", - "2027-05-01": "1 May (Labour Day)", + "2027-05-01": "Labour Day", "2027-12-25": "Christmas Day", - "2027-12-26": "26 December", + "2027-12-26": "Christmas Holiday", "2028-01-01": "New Year's Day", "2028-04-14": "Good Friday", "2028-04-17": "Easter Monday", - "2028-05-01": "1 May (Labour Day)", + "2028-05-01": "Labour Day", "2028-12-25": "Christmas Day", - "2028-12-26": "26 December", + "2028-12-26": "Christmas Holiday", "2029-01-01": "New Year's Day", "2029-03-30": "Good Friday", "2029-04-02": "Easter Monday", - "2029-05-01": "1 May (Labour Day)", + "2029-05-01": "Labour Day", "2029-12-25": "Christmas Day", - "2029-12-26": "26 December", + "2029-12-26": "Christmas Holiday", "2030-01-01": "New Year's Day", "2030-04-19": "Good Friday", "2030-04-22": "Easter Monday", - "2030-05-01": "1 May (Labour Day)", + "2030-05-01": "Labour Day", "2030-12-25": "Christmas Day", - "2030-12-26": "26 December", + "2030-12-26": "Christmas Holiday", "2031-01-01": "New Year's Day", "2031-04-11": "Good Friday", "2031-04-14": "Easter Monday", - "2031-05-01": "1 May (Labour Day)", + "2031-05-01": "Labour Day", "2031-12-25": "Christmas Day", - "2031-12-26": "26 December", + "2031-12-26": "Christmas Holiday", "2032-01-01": "New Year's Day", "2032-03-26": "Good Friday", "2032-03-29": "Easter Monday", - "2032-05-01": "1 May (Labour Day)", + "2032-05-01": "Labour Day", "2032-12-25": "Christmas Day", - "2032-12-26": "26 December", + "2032-12-26": "Christmas Holiday", "2033-01-01": "New Year's Day", "2033-04-15": "Good Friday", "2033-04-18": "Easter Monday", - "2033-05-01": "1 May (Labour Day)", + "2033-05-01": "Labour Day", "2033-12-25": "Christmas Day", - "2033-12-26": "26 December", + "2033-12-26": "Christmas Holiday", "2034-01-01": "New Year's Day", "2034-04-07": "Good Friday", "2034-04-10": "Easter Monday", - "2034-05-01": "1 May (Labour Day)", + "2034-05-01": "Labour Day", "2034-12-25": "Christmas Day", - "2034-12-26": "26 December", + "2034-12-26": "Christmas Holiday", "2035-01-01": "New Year's Day", "2035-03-23": "Good Friday", "2035-03-26": "Easter Monday", - "2035-05-01": "1 May (Labour Day)", + "2035-05-01": "Labour Day", "2035-12-25": "Christmas Day", - "2035-12-26": "26 December", + "2035-12-26": "Christmas Holiday", "2036-01-01": "New Year's Day", "2036-04-11": "Good Friday", "2036-04-14": "Easter Monday", - "2036-05-01": "1 May (Labour Day)", + "2036-05-01": "Labour Day", "2036-12-25": "Christmas Day", - "2036-12-26": "26 December", + "2036-12-26": "Christmas Holiday", "2037-01-01": "New Year's Day", "2037-04-03": "Good Friday", "2037-04-06": "Easter Monday", - "2037-05-01": "1 May (Labour Day)", + "2037-05-01": "Labour Day", "2037-12-25": "Christmas Day", - "2037-12-26": "26 December", + "2037-12-26": "Christmas Holiday", "2038-01-01": "New Year's Day", "2038-04-23": "Good Friday", "2038-04-26": "Easter Monday", - "2038-05-01": "1 May (Labour Day)", + "2038-05-01": "Labour Day", "2038-12-25": "Christmas Day", - "2038-12-26": "26 December", + "2038-12-26": "Christmas Holiday", "2039-01-01": "New Year's Day", "2039-04-08": "Good Friday", "2039-04-11": "Easter Monday", - "2039-05-01": "1 May (Labour Day)", + "2039-05-01": "Labour Day", "2039-12-25": "Christmas Day", - "2039-12-26": "26 December", + "2039-12-26": "Christmas Holiday", "2040-01-01": "New Year's Day", "2040-03-30": "Good Friday", "2040-04-02": "Easter Monday", - "2040-05-01": "1 May (Labour Day)", + "2040-05-01": "Labour Day", "2040-12-25": "Christmas Day", - "2040-12-26": "26 December", + "2040-12-26": "Christmas Holiday", "2041-01-01": "New Year's Day", "2041-04-19": "Good Friday", "2041-04-22": "Easter Monday", - "2041-05-01": "1 May (Labour Day)", + "2041-05-01": "Labour Day", "2041-12-25": "Christmas Day", - "2041-12-26": "26 December", + "2041-12-26": "Christmas Holiday", "2042-01-01": "New Year's Day", "2042-04-04": "Good Friday", "2042-04-07": "Easter Monday", - "2042-05-01": "1 May (Labour Day)", + "2042-05-01": "Labour Day", "2042-12-25": "Christmas Day", - "2042-12-26": "26 December", + "2042-12-26": "Christmas Holiday", "2043-01-01": "New Year's Day", "2043-03-27": "Good Friday", "2043-03-30": "Easter Monday", - "2043-05-01": "1 May (Labour Day)", + "2043-05-01": "Labour Day", "2043-12-25": "Christmas Day", - "2043-12-26": "26 December", + "2043-12-26": "Christmas Holiday", "2044-01-01": "New Year's Day", "2044-04-15": "Good Friday", "2044-04-18": "Easter Monday", - "2044-05-01": "1 May (Labour Day)", + "2044-05-01": "Labour Day", "2044-12-25": "Christmas Day", - "2044-12-26": "26 December", + "2044-12-26": "Christmas Holiday", "2045-01-01": "New Year's Day", "2045-04-07": "Good Friday", "2045-04-10": "Easter Monday", - "2045-05-01": "1 May (Labour Day)", + "2045-05-01": "Labour Day", "2045-12-25": "Christmas Day", - "2045-12-26": "26 December", + "2045-12-26": "Christmas Holiday", "2046-01-01": "New Year's Day", "2046-03-23": "Good Friday", "2046-03-26": "Easter Monday", - "2046-05-01": "1 May (Labour Day)", + "2046-05-01": "Labour Day", "2046-12-25": "Christmas Day", - "2046-12-26": "26 December", + "2046-12-26": "Christmas Holiday", "2047-01-01": "New Year's Day", "2047-04-12": "Good Friday", "2047-04-15": "Easter Monday", - "2047-05-01": "1 May (Labour Day)", + "2047-05-01": "Labour Day", "2047-12-25": "Christmas Day", - "2047-12-26": "26 December", + "2047-12-26": "Christmas Holiday", "2048-01-01": "New Year's Day", "2048-04-03": "Good Friday", "2048-04-06": "Easter Monday", - "2048-05-01": "1 May (Labour Day)", + "2048-05-01": "Labour Day", "2048-12-25": "Christmas Day", - "2048-12-26": "26 December", + "2048-12-26": "Christmas Holiday", "2049-01-01": "New Year's Day", "2049-04-16": "Good Friday", "2049-04-19": "Easter Monday", - "2049-05-01": "1 May (Labour Day)", + "2049-05-01": "Labour Day", "2049-12-25": "Christmas Day", - "2049-12-26": "26 December", + "2049-12-26": "Christmas Holiday", "2050-01-01": "New Year's Day", "2050-04-08": "Good Friday", "2050-04-11": "Easter Monday", - "2050-05-01": "1 May (Labour Day)", + "2050-05-01": "Labour Day", "2050-12-25": "Christmas Day", - "2050-12-26": "26 December" + "2050-12-26": "Christmas Holiday" } diff --git a/snapshots/financial/NYSE.json b/snapshots/financial/XNYS.json similarity index 100% rename from snapshots/financial/NYSE.json rename to snapshots/financial/XNYS.json diff --git a/tests/calendars/test_thai.py b/tests/calendars/test_thai.py index 6bf6531dd..ddf6f5207 100644 --- a/tests/calendars/test_thai.py +++ b/tests/calendars/test_thai.py @@ -66,10 +66,7 @@ def test_asarnha_bucha_date(self): 2150: date(2150, JUL, 9), } for year in asarnha_bucha_year_date: - self.assertEqual( - asarnha_bucha_year_date[year], - self.calendar.asarnha_bucha_date(year), - ) + self.assertEqual(asarnha_bucha_year_date[year], self.calendar.asarnha_bucha_date(year)) def test_atthami_bucha_date(self): # THAI_CALENDAR @@ -95,10 +92,7 @@ def test_atthami_bucha_date(self): 2150: date(2150, MAY, 19), } for year in atthami_bucha_year_date: - self.assertEqual( - atthami_bucha_year_date[year], - self.calendar.atthami_bucha_date(year), - ) + self.assertEqual(atthami_bucha_year_date[year], self.calendar.atthami_bucha_date(year)) # KHMER_CALENDAR athami_bochea_year_date = { self.calendar.START_YEAR - 1: None, @@ -140,8 +134,7 @@ def test_boun_haw_khao_salark(self): } for year in boun_haw_khao_salark_year_date: self.assertEqual( - boun_haw_khao_salark_year_date[year], - self.calendar.boun_haw_khao_salark_date(year), + boun_haw_khao_salark_year_date[year], self.calendar.boun_haw_khao_salark_date(year) ) def test_boun_suang_heua_date(self): @@ -155,8 +148,7 @@ def test_boun_suang_heua_date(self): } for year in boun_suang_heua_year_date: self.assertEqual( - boun_suang_heua_year_date[year], - self.calendar.boun_suang_heua_date(year), + boun_suang_heua_year_date[year], self.calendar.boun_suang_heua_date(year) ) def test_khao_phansa_date(self): @@ -199,10 +191,7 @@ def test_khao_phansa_date(self): 2150: date(2150, JUL, 10), } for year in khao_phansa_year_date: - self.assertEqual( - khao_phansa_year_date[year], - self.calendar.khao_phansa_date(year), - ) + self.assertEqual(khao_phansa_year_date[year], self.calendar.khao_phansa_date(year)) def test_loy_krathong_date(self): loy_krathong_year_date = { @@ -234,10 +223,7 @@ def test_loy_krathong_date(self): 2150: date(2150, NOV, 4), } for year in loy_krathong_year_date: - self.assertEqual( - loy_krathong_year_date[year], - self.calendar.loy_krathong_date(year), - ) + self.assertEqual(loy_krathong_year_date[year], self.calendar.loy_krathong_date(year)) def test_makha_bucha_date(self): # THAI_CALENDAR @@ -296,8 +282,7 @@ def test_makha_bucha_date(self): } for year in meak_bochea_year_date: self.assertEqual( - meak_bochea_year_date[year], - self.calendar.makha_bucha_date(year, KHMER_CALENDAR), + meak_bochea_year_date[year], self.calendar.makha_bucha_date(year, KHMER_CALENDAR) ) def test_ok_phansa_date(self): @@ -323,10 +308,7 @@ def test_ok_phansa_date(self): 2150: date(2150, OCT, 6), } for year in ok_phansa_year_date: - self.assertEqual( - ok_phansa_year_date[year], - self.calendar.ok_phansa_date(year), - ) + self.assertEqual(ok_phansa_year_date[year], self.calendar.ok_phansa_date(year)) def test_pchum_ben_date(self): pchum_ben_year_date = { @@ -345,10 +327,7 @@ def test_pchum_ben_date(self): 2025: date(2025, SEP, 22), } for year in pchum_ben_year_date: - self.assertEqual( - pchum_ben_year_date[year], - self.calendar.pchum_ben_date(year), - ) + self.assertEqual(pchum_ben_year_date[year], self.calendar.pchum_ben_date(year)) def test_preah_neangkoal_date(self): preah_neangkoal_year_date = { @@ -368,8 +347,7 @@ def test_preah_neangkoal_date(self): } for year in preah_neangkoal_year_date: self.assertEqual( - preah_neangkoal_year_date[year], - self.calendar.preah_neangkoal_date(year), + preah_neangkoal_year_date[year], self.calendar.preah_neangkoal_date(year) ) def test_visakha_bucha_date(self): @@ -412,10 +390,7 @@ def test_visakha_bucha_date(self): 2150: date(2150, MAY, 11), } for year in visakha_bucha_year_date: - self.assertEqual( - visakha_bucha_year_date[year], - self.calendar.visakha_bucha_date(year), - ) + self.assertEqual(visakha_bucha_year_date[year], self.calendar.visakha_bucha_date(year)) # KHMER_CALENDAR visaka_bochea_year_date = { self.calendar.START_YEAR - 1: None, diff --git a/tests/common.py b/tests/common.py index f70e4f8d5..2be822627 100644 --- a/tests/common.py +++ b/tests/common.py @@ -122,8 +122,7 @@ def _verify_type(self, holidays): def assertAliases(self, cls, *aliases): # noqa: N802 """Assert aliases match.""" self.assertTrue( - issubclass(cls, HolidayBase), - "The entity object must be a subclass of `HolidayBase`", + issubclass(cls, HolidayBase), "The entity object must be a subclass of `HolidayBase`" ) type_error_message = "The entity alias object must be a subclass of the entity class." @@ -389,17 +388,11 @@ class SundayHolidays(TestCase): def assertSundays(self, cls): # noqa: N802 holidays = cls(years=1989, include_sundays=True) - self.assertHoliday( - holidays, - "1989-12-31", - ) + self.assertHoliday(holidays, "1989-12-31") self.assertEqual(53, len([s for s in holidays if s.weekday() == SUN])) holidays = cls(years=2032, include_sundays=True) - self.assertHoliday( - holidays, - "2032-01-04", - ) + self.assertHoliday(holidays, "2032-01-04") self.assertEqual(52, len([s for s in holidays if s.weekday() == SUN])) self.assertNoHolidays(cls(include_sundays=True)) diff --git a/tests/countries/test_cambodia.py b/tests/countries/test_cambodia.py index a2796661a..d9f987645 100644 --- a/tests/countries/test_cambodia.py +++ b/tests/countries/test_cambodia.py @@ -52,16 +52,10 @@ def test_2022(self): ("2022-04-15", "ពិធីបុណ្យចូលឆ្នាំថ្មីប្រពៃណីជាតិ"), ("2022-04-16", "ពិធីបុណ្យចូលឆ្នាំថ្មីប្រពៃណីជាតិ"), ("2022-05-01", "ទិវាពលកម្មអន្តរជាតិ"), - ( - "2022-05-14", - "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី", - ), + ("2022-05-14", "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី"), ("2022-05-15", "ពិធីបុណ្យវិសាខបូជា"), ("2022-05-19", "ព្រះរាជពិធីច្រត់ព្រះនង្គ័ល"), - ( - "2022-06-18", - "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ", - ), + ("2022-06-18", "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ"), ("2022-09-24", "ទិវាប្រកាសរដ្ឋធម្មនុញ្ញ; ពិធីបុណ្យភ្ផុំបិណ្ឌ"), ("2022-09-25", "ពិធីបុណ្យភ្ផុំបិណ្ឌ"), ("2022-09-26", "ពិធីបុណ្យភ្ផុំបិណ្ឌ"), @@ -83,10 +77,7 @@ def test_2022(self): ), ("2022-11-07", "ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក"), ("2022-11-08", "ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក"), - ( - "2022-11-09", - "ពិធីបុណ្យឯករាជ្យជាតិ; ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក", - ), + ("2022-11-09", "ពិធីបុណ្យឯករាជ្យជាតិ; ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក"), ) def test_2023(self): @@ -101,14 +92,8 @@ def test_2023(self): ("2023-05-01", "ទិវាពលកម្មអន្តរជាតិ"), ("2023-05-04", "ពិធីបុណ្យវិសាខបូជា"), ("2023-05-08", "ព្រះរាជពិធីច្រត់ព្រះនង្គ័ល"), - ( - "2023-05-14", - "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី", - ), - ( - "2023-06-18", - "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ", - ), + ("2023-05-14", "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី"), + ("2023-06-18", "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ"), ("2023-09-24", "ទិវាប្រកាសរដ្ឋធម្មនុញ្ញ"), ("2023-10-13", "ពិធីបុណ្យភ្ផុំបិណ្ឌ"), ("2023-10-14", "ពិធីបុណ្យភ្ផុំបិណ្ឌ"), @@ -300,14 +285,8 @@ def test_l10n_default(self): ("2023-05-01", "ទិវាពលកម្មអន្តរជាតិ"), ("2023-05-04", "ពិធីបុណ្យវិសាខបូជា"), ("2023-05-08", "ព្រះរាជពិធីច្រត់ព្រះនង្គ័ល"), - ( - "2023-05-14", - "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី", - ), - ( - "2023-06-18", - "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ", - ), + ("2023-05-14", "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី"), + ("2023-06-18", "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ"), ("2023-09-24", "ទិវាប្រកាសរដ្ឋធម្មនុញ្ញ"), ("2023-10-13", "ពិធីបុណ្យភ្ផុំបិណ្ឌ"), ("2023-10-14", "ពិធីបុណ្យភ្ផុំបិណ្ឌ"), @@ -346,17 +325,11 @@ def test_l10n_en_us(self): ("2023-05-04", "Visaka Bochea Day"), ("2023-05-08", "Royal Ploughing Ceremony"), ("2023-05-14", "HM King Norodom Sihamoni's Birthday"), - ( - "2023-06-18", - "HM Queen Norodom Monineath Sihanouk the Queen-Mother's Birthday", - ), + ("2023-06-18", "HM Queen Norodom Monineath Sihanouk the Queen-Mother's Birthday"), ("2023-09-24", "Constitution Day"), ("2023-10-13", "Pchum Ben Day"), ("2023-10-14", "Pchum Ben Day"), - ( - "2023-10-15", - "HM King Norodom Sihanouk Mourning Day; Pchum Ben Day", - ), + ("2023-10-15", "HM King Norodom Sihanouk Mourning Day; Pchum Ben Day"), ("2023-10-29", "HM King Norodom Sihamoni's Coronation Day"), ("2023-11-09", "National Independence Day"), ("2023-11-26", "Water Festival"), diff --git a/tests/countries/test_germany.py b/tests/countries/test_germany.py index c38acd409..7fdcb6fad 100644 --- a/tests/countries/test_germany.py +++ b/tests/countries/test_germany.py @@ -49,7 +49,7 @@ def test_no_public_holidays_before_1990(self): self.assertNoHolidays(DE(years=1989, subdiv=p)) def test_no_by_catholic_holidays_before_1991(self): - self.assertNoHolidays(DE(subdiv="BY", years=1990, categories=(CATHOLIC))) + self.assertNoHolidays(DE(subdiv="BY", years=1990, categories=CATHOLIC)) def test_1990_present(self): y_1990 = set() @@ -337,7 +337,7 @@ def test_mariae_himmelfahrt(self): ) # Bayern (Catholic municipalities). self.assertHoliday( - DE(subdiv="BY", years=range(1991, 2050), categories=(CATHOLIC)), + DE(subdiv="BY", years=range(1991, 2050), categories=CATHOLIC), (f"{year}-08-15" for year in range(1991, 2050)), ) diff --git a/tests/countries/test_hongkong.py b/tests/countries/test_hongkong.py index 95fc29ab5..d303fa921 100644 --- a/tests/countries/test_hongkong.py +++ b/tests/countries/test_hongkong.py @@ -21,14 +21,14 @@ class TestHongKong(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): super().setUpClass(HongKong, years=range(1963, 2050), years_non_observed=range(1963, 2050)) - cls.opt_holidays = HongKong(categories=(OPTIONAL,), years=range(1946, 2050)) + cls.opt_holidays = HongKong(categories=OPTIONAL, years=range(1946, 2050)) def test_country_aliases(self): self.assertAliases(HongKong, HK, HKG) def test_no_holidays(self): self.assertNoHolidays(HongKong(years=1962)) - self.assertNoHolidays(HongKong(categories=(OPTIONAL,), years=1945)) + self.assertNoHolidays(HongKong(categories=OPTIONAL, years=1945)) def test_special_holidays(self): self.assertHoliday( diff --git a/tests/countries/test_indonesia.py b/tests/countries/test_indonesia.py index 8f3123ddb..295354c78 100644 --- a/tests/countries/test_indonesia.py +++ b/tests/countries/test_indonesia.py @@ -188,8 +188,7 @@ def test_special_government(self): dt_observed = ("2020-12-31",) self.assertHoliday(Indonesia(categories=GOVERNMENT), dt, dt_observed) self.assertNoNonObservedHoliday( - Indonesia(categories=GOVERNMENT, observed=False), - dt_observed, + Indonesia(categories=GOVERNMENT, observed=False), dt_observed ) def test_new_years_day(self): diff --git a/tests/countries/test_israel.py b/tests/countries/test_israel.py index adba83ef1..59504a6b5 100644 --- a/tests/countries/test_israel.py +++ b/tests/countries/test_israel.py @@ -21,9 +21,9 @@ class TestIsrael(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): super().setUpClass(Israel, years=range(1948, 2050)) - cls.opt_holidays = Israel(categories=(OPTIONAL,), years=range(2000, 2024)) + cls.opt_holidays = Israel(categories=OPTIONAL, years=range(2000, 2024)) cls.opt_holidays_non_observed = Israel( - observed=False, categories=(OPTIONAL,), years=range(2000, 2024) + observed=False, categories=OPTIONAL, years=range(2000, 2024) ) def test_country_aliases(self): @@ -143,7 +143,7 @@ def test_memorial_day(self): name, self.opt_holidays_non_observed, common_dt, non_obs_dt ) self.assertNoNonObservedHoliday(self.opt_holidays_non_observed, obs_dt) - self.assertNoHolidayName(name, Israel(categories=(OPTIONAL,), years=range(1948, 1963))) + self.assertNoHolidayName(name, Israel(categories=OPTIONAL, years=range(1948, 1963))) self.assertNoHolidayName(name) def test_optional_holidays(self): @@ -257,9 +257,9 @@ def test_taanit_ester(self): "2014-03-15", "2017-03-11", ) - school_holidays = Israel(categories=(SCHOOL,), years=range(2000, 2024)) + school_holidays = Israel(categories=SCHOOL, years=range(2000, 2024)) school_holidays_non_observed = Israel( - observed=False, categories=(SCHOOL,), years=range(2000, 2024) + observed=False, categories=SCHOOL, years=range(2000, 2024) ) self.assertHolidayName(name, school_holidays, common_dt) self.assertHolidayName(name_observed, school_holidays, obs_dt) @@ -313,7 +313,7 @@ def test_2023(self): def test_2021_optional(self): self.assertHolidays( - Israel(categories=(OPTIONAL,), years=2021), + Israel(categories=OPTIONAL, years=2021), ("2021-02-26", "פורים"), ("2021-03-29", "חול המועד פסח"), ("2021-03-30", "חול המועד פסח"), @@ -333,7 +333,7 @@ def test_2021_optional(self): def test_2022_optional(self): self.assertHolidays( - Israel(categories=(OPTIONAL,), years=2022), + Israel(categories=OPTIONAL, years=2022), ("2022-03-17", "פורים"), ("2022-04-17", "חול המועד פסח"), ("2022-04-18", "חול המועד פסח"), @@ -353,7 +353,7 @@ def test_2022_optional(self): def test_2023_optional(self): self.assertHolidays( - Israel(categories=(OPTIONAL,), years=2023), + Israel(categories=OPTIONAL, years=2023), ("2023-03-07", "פורים"), ("2023-04-07", "חול המועד פסח"), ("2023-04-08", "חול המועד פסח"), @@ -373,7 +373,7 @@ def test_2023_optional(self): def test_2021_school(self): self.assertHolidays( - Israel(categories=(SCHOOL,), years=2021), + Israel(categories=SCHOOL, years=2021), ("2021-02-25", "תענית אסתר"), ("2021-02-26", "פורים"), ("2021-03-29", "חול המועד פסח"), @@ -399,7 +399,7 @@ def test_2021_school(self): def test_2022_school(self): self.assertHolidays( - Israel(categories=(SCHOOL,), years=2022), + Israel(categories=SCHOOL, years=2022), ("2022-03-16", "תענית אסתר"), ("2022-03-17", "פורים"), ("2022-04-17", "חול המועד פסח"), @@ -425,7 +425,7 @@ def test_2022_school(self): def test_2023_school(self): self.assertHolidays( - Israel(categories=(SCHOOL,), years=2023), + Israel(categories=SCHOOL, years=2023), ("2023-03-06", "תענית אסתר"), ("2023-03-07", "פורים"), ("2023-04-07", "חול המועד פסח"), diff --git a/tests/countries/test_kazakhstan.py b/tests/countries/test_kazakhstan.py index ce0d4720f..1567cc1a6 100644 --- a/tests/countries/test_kazakhstan.py +++ b/tests/countries/test_kazakhstan.py @@ -50,9 +50,7 @@ def test_nauryz(self): self.assertNoHolidayName(name, range(1991, 2002)) for year in set(range(2002, 2010)) - {2005, 2007}: self.assertNoNonObservedHoliday( - Kazakhstan(observed=False, years=year), - f"{year}-03-21", - f"{year}-03-23", + Kazakhstan(observed=False, years=year), f"{year}-03-21", f"{year}-03-23" ) def test_solidarity_day(self): @@ -129,6 +127,7 @@ def test_kurban_ait(self): "2022-07-09", "2023-06-28", "2024-06-16", + "2025-06-06", ) def test_observed(self): @@ -177,6 +176,12 @@ def test_observed(self): "2023-12-18", "2024-03-25", "2024-07-08", + "2025-03-10", + "2025-03-24", + "2025-03-25", + "2025-07-07", + "2025-09-01", + "2025-10-27", ) self.assertHoliday(observed_holidays) self.assertNoNonObservedHoliday(observed_holidays) @@ -234,6 +239,7 @@ def test_substituted_holidays(self): "2022-10-24", "2023-07-07", "2024-05-08", + "2025-01-03", ) def test2022(self): diff --git a/tests/countries/test_laos.py b/tests/countries/test_laos.py index 1c931bb33..a9aaf45c1 100644 --- a/tests/countries/test_laos.py +++ b/tests/countries/test_laos.py @@ -335,10 +335,7 @@ def test_2017_workdays(self): ("2017-03-22", "ວັນສ້າງຕັ້ງພັກປະຊາຊົນປະຕິວັດລາວ"), ("2017-04-14", "ວັນສ້າງຕັ້ງສູນກາງຊາວໜຸ່ມປະຊາຊົນປະຕິວັດລາວ"), ("2017-06-01", "ວັນປູກຕົ້ນໄມ້ແຫ່ງຊາດ"), - ( - "2017-07-13", - "ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ສຸພານຸວົງ; ວັນປ່ອຍປາ ແລະ ວັນອະນຸລັກສັດນ້ຳ-ສັດປ່າແຫ່ງຊາດ", - ), + ("2017-07-13", "ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ສຸພານຸວົງ; ວັນປ່ອຍປາ ແລະ ວັນອະນຸລັກສັດນ້ຳ-ສັດປ່າແຫ່ງຊາດ"), ("2017-07-20", "ວັນສ້າງຕັ້ງສະຫະພັນແມ່ຍິງລາວ"), ("2017-08-13", "ວັນສື່ມວນຊົນແຫ່ງຊາດ ແລະ ວັນພິມຈໍາໜ່າຍ"), ("2017-08-15", "ວັນລັດຖະທໍາມະນູນແຫ່ງຊາດ"), @@ -355,10 +352,7 @@ def test_2022_workdays(self): ("2022-03-22", "ວັນສ້າງຕັ້ງພັກປະຊາຊົນປະຕິວັດລາວ"), ("2022-04-14", "ວັນສ້າງຕັ້ງສູນກາງຊາວໜຸ່ມປະຊາຊົນປະຕິວັດລາວ"), ("2022-06-01", "ວັນປູກຕົ້ນໄມ້ແຫ່ງຊາດ; ວັນເດັກສາກົນ"), - ( - "2022-07-13", - "ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ສຸພານຸວົງ; ວັນປ່ອຍປາ ແລະ ວັນອະນຸລັກສັດນ້ຳ-ສັດປ່າແຫ່ງຊາດ", - ), + ("2022-07-13", "ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ສຸພານຸວົງ; ວັນປ່ອຍປາ ແລະ ວັນອະນຸລັກສັດນ້ຳ-ສັດປ່າແຫ່ງຊາດ"), ("2022-07-20", "ວັນສ້າງຕັ້ງສະຫະພັນແມ່ຍິງລາວ"), ("2022-08-13", "ວັນສື່ມວນຊົນແຫ່ງຊາດ ແລະ ວັນພິມຈໍາໜ່າຍ"), ("2022-08-15", "ວັນລັດຖະທໍາມະນູນແຫ່ງຊາດ"), diff --git a/tests/countries/test_saint_kitts_and_nevis.py b/tests/countries/test_saint_kitts_and_nevis.py index 9dd4abbd2..b33916cfc 100644 --- a/tests/countries/test_saint_kitts_and_nevis.py +++ b/tests/countries/test_saint_kitts_and_nevis.py @@ -145,8 +145,7 @@ def test_national_heroes_day(self): def test_kim_collins_day(self): self.assertNoHoliday(SaintKittsAndNevis(categories=WORKDAY), "2002-08-25") self.assertHoliday( - SaintKittsAndNevis(categories=WORKDAY), - (f"{year}-08-25" for year in range(2003, 2051)), + SaintKittsAndNevis(categories=WORKDAY), (f"{year}-08-25" for year in range(2003, 2051)) ) def test_2015_holidays(self): # ? diff --git a/tests/countries/test_south_korea.py b/tests/countries/test_south_korea.py index 3ed9adf32..5c161462b 100644 --- a/tests/countries/test_south_korea.py +++ b/tests/countries/test_south_korea.py @@ -302,10 +302,7 @@ def test_tree_planting_day(self): self.assertNoHoliday( "1948-04-05", "1960-04-05", (f"{year}-04-05" for year in range(2006, 2050)) ) - self.assertHolidayName( - f"{name} 대체 휴일", - "1959-04-06", - ) + self.assertHolidayName(f"{name} 대체 휴일", "1959-04-06") def test_childrens_day(self): name = "어린이날" @@ -381,10 +378,7 @@ def test_constitution_day(self): self.assertNoHoliday(f"{year}-07-17" for year in range(2008, 2050)) self.assertNoHolidayName(name, range(2008, 2050)) - self.assertHolidayName( - f"{name} 대체 휴일", - "1960-07-18", - ) + self.assertHolidayName(f"{name} 대체 휴일", "1960-07-18") def test_liberation_day(self): name = "광복절" @@ -476,10 +470,7 @@ def test_armed_forces_day(self): name = "국군의 날" self.assertHolidayName(name, (f"{year}-10-01" for year in range(1976, 1991))) - self.assertHolidayName( - f"{name} 대체 휴일", - "1989-10-02", - ) + self.assertHolidayName(f"{name} 대체 휴일", "1989-10-02") self.assertNoHolidayName(f"{name} 대체 휴일", range(1976, 1989), range(1990, 1992)) def test_national_foundation_day(self): diff --git a/tests/countries/test_thailand.py b/tests/countries/test_thailand.py index d8f0121d0..f109072c8 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, 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(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)) 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", "วันสงกรานต์"), diff --git a/tests/countries/test_united_states.py b/tests/countries/test_united_states.py index 6f32cf2c4..4cd8e3610 100644 --- a/tests/countries/test_united_states.py +++ b/tests/countries/test_united_states.py @@ -432,7 +432,9 @@ def test_washingtons_birthday_states(self): def test_columbus_day(self): name = "Columbus Day" - self.assertNoHolidayName(name) + self.assertNoHolidayName(name, range(1865, 1937)) + self.assertHolidayName(name, (f"{year}-10-12" for year in range(1937, 1971))) + self.assertHolidayName(name, range(1971, 2050)) dt = ( "2010-10-11", "2011-10-10", @@ -448,8 +450,9 @@ def test_columbus_day(self): "2021-10-11", "2022-10-10", "2023-10-09", - "2024-10-14", ) + self.assertHolidayName(name, dt) + subdivs_have_columbus_day = { "AS", "AZ", @@ -485,13 +488,7 @@ def test_columbus_day(self): } for subdiv in subdivs_have_columbus_day: - state_holidays = self.state_hols[subdiv] - self.assertNoHolidayName(name, state_holidays, range(1865, 1937)) - self.assertHolidayName( - name, state_holidays, (f"{year}-10-12" for year in range(1937, 1971)) - ) - self.assertHolidayName(name, state_holidays, range(1971, 2050)) - self.assertHolidayName(name, state_holidays, dt) + self.assertHolidayName(name, self.state_hols[subdiv], dt) for subdiv in ( set(UnitedStates.subdivisions) diff --git a/tests/financial/test_european_central_bank.py b/tests/financial/test_european_central_bank.py index 3959e77a1..eacba3c22 100644 --- a/tests/financial/test_european_central_bank.py +++ b/tests/financial/test_european_central_bank.py @@ -12,7 +12,7 @@ from unittest import TestCase -from holidays.financial.european_central_bank import EuropeanCentralBank, ECB, TAR +from holidays.financial.european_central_bank import EuropeanCentralBank, XECB, ECB, TAR from tests.common import CommonFinancialTests @@ -22,7 +22,7 @@ def setUpClass(cls): super().setUpClass(EuropeanCentralBank, years=range(2000, 2100)) def test_market_aliases(self): - self.assertAliases(EuropeanCentralBank, ECB, TAR) + self.assertAliases(EuropeanCentralBank, XECB, ECB, TAR) def test_no_holidays(self): self.assertNoHolidays(EuropeanCentralBank(years=1999)) @@ -34,6 +34,7 @@ def test_new_years(self): self.assertHolidayName("New Year's Day", (f"{year}-01-01" for year in range(2000, 2100))) def test_good_friday(self): + name = "Good Friday" dt = ( "2000-04-21", "2010-04-02", @@ -45,9 +46,11 @@ def test_good_friday(self): "2023-04-07", "2024-03-29", ) - self.assertHolidayName("Good Friday", dt) + self.assertHolidayName(name, dt) + self.assertHolidayName(name, range(2000, 2100)) def test_easter_monday(self): + name = "Easter Monday" dt = ( "2000-04-24", "2010-04-05", @@ -59,18 +62,18 @@ def test_easter_monday(self): "2023-04-10", "2024-04-01", ) - self.assertHolidayName("Easter Monday", dt) + self.assertHolidayName(name, dt) def test_labour_day(self): - self.assertHolidayName( - "1 May (Labour Day)", (f"{year}-05-01" for year in range(2000, 2100)) - ) + self.assertHolidayName("Labour Day", (f"{year}-05-01" for year in range(2000, 2100))) def test_christmas_day(self): self.assertHolidayName("Christmas Day", (f"{year}-12-25" for year in range(2000, 2100))) def test_26_december_day(self): - self.assertHolidayName("26 December", (f"{year}-12-26" for year in range(2000, 2100))) + self.assertHolidayName( + "Christmas Holiday", (f"{year}-12-26" for year in range(2000, 2100)) + ) def test_2015(self): self.assertHolidays( @@ -78,7 +81,7 @@ def test_2015(self): ("2015-01-01", "New Year's Day"), ("2015-04-03", "Good Friday"), ("2015-04-06", "Easter Monday"), - ("2015-05-01", "1 May (Labour Day)"), + ("2015-05-01", "Labour Day"), ("2015-12-25", "Christmas Day"), - ("2015-12-26", "26 December"), + ("2015-12-26", "Christmas Holiday"), ) diff --git a/tests/financial/test_ny_stock_exchange.py b/tests/financial/test_ny_stock_exchange.py index e9a16ce73..31789982d 100644 --- a/tests/financial/test_ny_stock_exchange.py +++ b/tests/financial/test_ny_stock_exchange.py @@ -31,7 +31,7 @@ SAT, SUN, ) -from holidays.financial.ny_stock_exchange import NewYorkStockExchange, NYSE, XNYS +from holidays.financial.ny_stock_exchange import NewYorkStockExchange, XNYS, NYSE from tests.common import CommonFinancialTests @@ -41,7 +41,7 @@ def setUpClass(cls): super().setUpClass(NewYorkStockExchange) def test_market_aliases(self): - self.assertAliases(NewYorkStockExchange, NYSE, XNYS) + self.assertAliases(NewYorkStockExchange, XNYS, NYSE) def test_no_holidays(self): self.assertNoHolidays(NewYorkStockExchange(years=1862)) @@ -444,13 +444,12 @@ def test_special_holidays(self): ] def _make_special_holiday_list(begin, end, days=None, weekends=False): - _list = [ + return [ d for d in (begin + td(days=n) for n in range((end - begin).days + 1)) if (weekends or d.weekday() not in {SAT, SUN}) and (days is None or d.weekday() in days) ] - return _list wwi_holidays = _make_special_holiday_list(date(1914, JUL, 31), date(1914, NOV, 27)) oneoff_bank_holidays = _make_special_holiday_list(date(1933, MAR, 6), date(1933, MAR, 14)) diff --git a/tests/test_docs.py b/tests/test_docs.py index ce86fb1c6..d3b16df85 100644 --- a/tests/test_docs.py +++ b/tests/test_docs.py @@ -14,7 +14,14 @@ from pathlib import Path from unittest import TestCase -from holidays import country_holidays, list_supported_countries, list_localized_countries +from holidays import ( + country_holidays, + financial_holidays, + list_localized_countries, + list_localized_financial, + list_supported_countries, + list_supported_financial, +) from holidays.constants import PUBLIC @@ -174,8 +181,7 @@ def test_supported_countries_table(self): ( f"{c} != {s}" for c, s in zip( - supported_countries[country_code], - country_subdivisions[country_code], + supported_countries[country_code], country_subdivisions[country_code] ) if c != s ) @@ -223,3 +229,107 @@ def test_supported_countries_table(self): "all supported categories: " f"{', '.join(instance.supported_categories)}", ) + + def test_supported_markets_table(self): + # Parse table data. + columns_number = 4 + market_mic_codes = set() + market_default_languages = {} + market_names = [] + market_supported_languages = {} + + table_content = [ + line.strip() + for line in re.findall( + r"Info\s+- Supported Languages(.*)Contributions", self.readme_content, re.DOTALL + )[0].split("\n") + if line + ] + + for idx in range(0, len(table_content), columns_number): + # Market: 1st column. + name = ( + table_content[idx] + .strip(" *-") + .translate( + str.maketrans( + { + " ": "", + ",": "", + "ã": "a", + } + ) + ) + .lower() + ) + market_names.append(name) + + # Code: 2nd column. + market_code = table_content[idx + 1].strip(" -") + if market_code: + market_mic_codes.add(market_code) + + # Supported Languages: 4th column. + supported_languages = table_content[idx + 3].strip(" -") + if supported_languages: + languages = [] + for supported_language in supported_languages.split(","): + supported_language = supported_language.strip() + + if "*" in supported_language: + supported_language = supported_language.strip("*") + market_default_languages[market_code] = supported_language + languages.append(supported_language) + + market_supported_languages[market_code] = languages + + # Check the data. + self.assertEqual( + market_names, + sorted(market_names), + "The supported markets table must be sorted alphabetically by market name.\n" + + "\n".join( + (f"{c} != {s}" for c, s in zip(market_names, sorted(market_names)) if c != s) + ), + ) + + supported_markets = list_supported_financial(include_aliases=False) + localized_markets = list_localized_financial(include_aliases=False) + for market_code in supported_markets: + instance = financial_holidays(market_code) + market_name = instance.__class__.__base__.__name__ + + # Make sure market name is shown correctly. + self.assertIn( + market_name.lower(), + market_names, + f"Market '{market_name}' name is not shown correctly in the table.", + ) + + # Make sure market MIC code is shown correctly. + self.assertIn( + instance.market, + market_mic_codes, + f"Market '{market_name}' MIC code is not shown correctly in the table.", + ) + + # Make sure supported languages are shown correctly. + if market_code in localized_markets: + supported_languages = localized_markets[market_code] + self.assertEqual( + supported_languages, + market_supported_languages.get(market_code), + f"Market {market_name} supported languages are not " + "shown correctly in the table. The column must contain " + "all supported languages: " + f"{', '.join(instance.supported_languages)}", + ) + + self.assertEqual( + market_default_languages.get(market_code), + instance.default_language, + f"Market {market_name} default language is not shown " + "correctly in the table. Use **language** format " + "to specify the market default language: " + f"**{instance.default_language}**.", + ) diff --git a/tests/test_holiday_base.py b/tests/test_holiday_base.py index 4291dad84..c5563c6b1 100644 --- a/tests/test_holiday_base.py +++ b/tests/test_holiday_base.py @@ -991,8 +991,7 @@ def test_getitem(self): ) self.assertListEqual(self.hb["2014-01-01":"2013-12-24":3], [date(2014, 1, 1)]) self.assertListEqual( - self.hb["2014-01-01":"2013-12-24":7], - [date(2014, 1, 1), date(2013, 12, 25)], + self.hb["2014-01-01":"2013-12-24":7], [date(2014, 1, 1), date(2013, 12, 25)] ) self.assertListEqual(self.hb["2013-12-31":"2014-01-02":-3], []) self.assertListEqual(self.hb["2014-01-01" : "2013-12-24" : td(days=3)], [date(2014, 1, 1)]) diff --git a/tests/test_holiday_groups.py b/tests/test_holiday_groups.py index d96d89224..d30e27b7b 100644 --- a/tests/test_holiday_groups.py +++ b/tests/test_holiday_groups.py @@ -24,10 +24,7 @@ class TestChristianHolidays(TestCase): def test_check_calendar(self): - self.assertRaises( - ValueError, - lambda: ChristianHolidays("INVALID_CALENDAR"), - ) + self.assertRaises(ValueError, lambda: ChristianHolidays("INVALID_CALENDAR")) def test_add_christmas_day_three(self): class TestHolidays(HolidayBase, ChristianHolidays): @@ -60,8 +57,7 @@ def __init__(self, *args, **kwargs): self.assertIn("2022-11-20", test_holidays) self.assertEqual(1, len(test_holidays)) self.assertRaises( - ValueError, - lambda: test_holidays._add_childrens_day("Invalid", "INVALID_TYPE"), + ValueError, lambda: test_holidays._add_childrens_day("Invalid", "INVALID_TYPE") ) diff --git a/tests/test_utils.py b/tests/test_utils.py index 2e3aa50f5..51d3d431d 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -70,22 +70,22 @@ def test_country_holiday_class_deprecation(self): class TestFinancialHolidays(unittest.TestCase): def setUp(self): - self.holidays = financial_holidays("NYSE") + self.holidays = financial_holidays("XNYS") def test_market(self): - self.assertEqual(self.holidays.market, "NYSE") + self.assertEqual(self.holidays.market, "XNYS") def test_market_single_year(self): - h = financial_holidays("NYSE", years=2021) + h = financial_holidays("XNYS", years=2021) self.assertEqual(h.years, {2021}) def test_market_years(self): - h = financial_holidays("NYSE", years=(2015, 2016)) + h = financial_holidays("XNYS", years=(2015, 2016)) self.assertEqual(h.years, {2015, 2016}) def test_exceptions(self): self.assertRaises(NotImplementedError, lambda: financial_holidays("XXXX")) - self.assertRaises(NotImplementedError, lambda: financial_holidays("NYSE", subdiv="XXXX")) + self.assertRaises(NotImplementedError, lambda: financial_holidays("XNYS", subdiv="XXXX")) class TestAllInSameYear(unittest.TestCase): @@ -188,14 +188,12 @@ def assertLocalizedEntities(self, localized_entities, supported_entities): # no def test_localized_countries(self): self.assertLocalizedEntities( - list_localized_countries(), - list_supported_countries(include_aliases=False), + list_localized_countries(), list_supported_countries(include_aliases=False) ) def test_localized_financial(self): self.assertLocalizedEntities( - list_localized_financial(), - list_supported_financial(include_aliases=False), + list_localized_financial(), list_supported_financial(include_aliases=False) ) @@ -215,26 +213,18 @@ def test_list_supported_countries(self): countries_files = [ path for path in Path("holidays/countries").glob("*.py") if path.stem != "__init__" ] - self.assertEqual( - len(countries_files), - len(supported_countries), - ) + self.assertEqual(len(countries_files), len(supported_countries)) def test_list_supported_financial(self): supported_financial = list_supported_financial(include_aliases=False) - self.assertIn("ECB", supported_financial) - self.assertIn("IFEU", supported_financial) - self.assertIn("NYSE", supported_financial) - self.assertIn("BVMF", supported_financial) + for code in ("BVMF", "IFEU", "XECB", "XNYS"): + self.assertIn(code, supported_financial) - nyse = supported_financial["NYSE"] - self.assertIsInstance(nyse, list) + xnys = supported_financial["XNYS"] + self.assertIsInstance(xnys, list) financial_files = [ path for path in Path("holidays/financial").glob("*.py") if path.stem != "__init__" ] - self.assertEqual( - len(financial_files), - len(supported_financial), - ) + self.assertEqual(len(financial_files), len(supported_financial))