From aae4caf39d5dc0ebd7474e7fd702a1ee970d986c Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Mon, 21 Oct 2024 20:57:04 +0300 Subject: [PATCH 01/32] Initialize v0.60 --- holidays/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/holidays/__init__.py b/holidays/__init__.py index 21f68aa4b..61aa8d6e3 100644 --- a/holidays/__init__.py +++ b/holidays/__init__.py @@ -23,7 +23,7 @@ from holidays.registry import EntityLoader from holidays.utils import * -__version__ = "0.59" +__version__ = "0.60" EntityLoader.load("countries", globals()) From df5c0bc6baf08677d145fefd9041d11990455d75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:28:35 -0700 Subject: [PATCH 02/32] Update pre-commit hooks (#2071) Co-authored-by: arkid15r <2201626+arkid15r@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 299f35d81..341e90999 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - rst - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.19.0 hooks: - id: pyupgrade args: From 2f08553043b850c6d9f49fb806bc3ef8b9dd0716 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:46:23 -0700 Subject: [PATCH 03/32] Bump ruff from 0.6.9 to 0.7.0 (#2073) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 2f2e669f2..17956a03a 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.4.0 -ruff==0.6.9 +ruff==0.7.0 tox==4.22.0 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 From 33251caa553341605c551459028322954b08ec67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 01:47:42 +0000 Subject: [PATCH 04/32] Bump coverage from 7.6.3 to 7.6.4 (#2076) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/tests.txt b/requirements/tests.txt index 1502315db..d1c591b28 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,6 +1,6 @@ # Test requirements. -coverage==7.6.3 +coverage==7.6.4 importlib-metadata==8.5.0 numpy<2.1.0; python_version < '3.10' numpy==2.1.2; python_version >= '3.10' From daa0a77e5ecbc59c86e2d79f3ed2ede941134597 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 01:56:48 +0000 Subject: [PATCH 05/32] Bump cyclonedx-bom from 5.0.0 to 5.1.0 (#2075) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/build.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/build.txt b/requirements/build.txt index bf1d99444..5cc8c1c8c 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,3 +1,3 @@ build==1.2.2.post1 -cyclonedx-bom==5.0.0 +cyclonedx-bom==5.1.0 polib==1.2.0 From 684999eb1dd2aa45835c0ebb7d5d9ce3afc331e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:44:44 -0700 Subject: [PATCH 06/32] Update pre-commit hooks (#2077) Co-authored-by: arkid15r <2201626+arkid15r@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 341e90999..c52466de9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: exclude: ^(docs) - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.12.1 + rev: v1.13.0 hooks: - id: mypy additional_dependencies: From 564eb212fa6b737607483e96ebdc51a2450137b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 02:41:50 +0000 Subject: [PATCH 07/32] Bump tox from 4.22.0 to 4.23.2 (#2074) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 17956a03a..8ea5656fa 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,6 +8,6 @@ lingva==5.0.4 pre-commit==4.0.1 pygithub==2.4.0 ruff==0.7.0 -tox==4.22.0 +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 From 70274b669f990faa07e47df4e1b3ae34b1e5ab29 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:58:37 -0700 Subject: [PATCH 08/32] Update pre-commit hooks (#2079) Co-authored-by: arkid15r <2201626+arkid15r@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c52466de9..542bc4434 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.7.0 + rev: v0.7.1 hooks: - id: ruff - id: ruff-format From 76a0facb4be670df3f2bd1dfa62e1fece84fef2c Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Fri, 25 Oct 2024 19:12:54 +0300 Subject: [PATCH 09/32] Update Timor-Leste holidays (#2078) --- holidays/countries/timor_leste.py | 41 +++++++++++++++++++++ holidays/locale/en_US/LC_MESSAGES/TL.po | 18 +++++++-- holidays/locale/pt_TL/LC_MESSAGES/TL.po | 20 ++++++++-- holidays/locale/tet/LC_MESSAGES/TL.po | 24 +++++++++--- snapshots/countries/TL_COMMON.json | 21 ++++++++++- tests/countries/test_timor_leste.py | 49 +++++++++++++++++++++++-- 6 files changed, 155 insertions(+), 18 deletions(-) diff --git a/holidays/countries/timor_leste.py b/holidays/countries/timor_leste.py index 351c53433..38b27999f 100644 --- a/holidays/countries/timor_leste.py +++ b/holidays/countries/timor_leste.py @@ -235,6 +235,9 @@ class TimorLesteStaticHolidays: # Parliamentary Election Day. parliamentary_election = tr("Dia de Eleições Parlamentares") + # Local Election Day. + local_election = tr("Dia de eleições locais") + # Centenary of the Revolt of Dom Boaventura. dom_boaventura_centenary = tr("Centenário da Revolta de Dom Boaventura") @@ -244,6 +247,12 @@ class TimorLesteStaticHolidays: # 20th Anniversary Celebrations of the Popular Consultation. popular_consultation_20th = tr("Celebrações do 20.º Aniversário da Consulta Popular") + # 25th Anniversary Celebrations of the Popular Consultation. + popular_consultation_25th = tr("Celebrações do 25.º Aniversário da Consulta Popular") + + # Visit of His Holiness Pope Francis to Timor-Leste. + pope_francis_visit = tr("Visita de Sua Santidade o Papa Francisco a Timor-Leste") + special_government_holidays = { 2010: ( # http://timor-leste.gov.tl/?p=4183&lang=en @@ -427,6 +436,10 @@ class TimorLesteStaticHolidays: (APR, 18, presidential_election), (APR, 19, presidential_election), (APR, 20, presidential_election), + # https://timor-leste.gov.tl/?p=31107&lang=en + (AUG, 29, special_national_holidays), + # https://timor-leste.gov.tl/?p=31152&lang=en + (SEP, 6, special_national_holidays), # http://timor-leste.gov.tl/?p=31404&lang=en (OCT, 31, special_national_holidays), # http://timor-leste.gov.tl/?p=31574&lang=en @@ -441,9 +454,37 @@ class TimorLesteStaticHolidays: (JAN, 23, special_national_holidays), # http://timor-leste.gov.tl/?p=32191&lang=en (FEB, 22, special_national_holidays), + # https://timor-leste.gov.tl/?p=32561&lang=en + (APR, 6, special_national_holidays), + (APR, 10, special_national_holidays), + # https://timor-leste.gov.tl/?p=32590&lang=en + (APR, 20, special_national_holidays), + (APR, 21, special_national_holidays), + # https://timor-leste.gov.tl/?p=32617&lang=en + (MAY, 19, parliamentary_election), + (MAY, 22, parliamentary_election), + # https://timor-leste.gov.tl/?p=34792&lang=en + (OCT, 27, local_election), + # https://timor-leste.gov.tl/?p=35060&lang=en + (NOV, 13, local_election), + # https://timor-leste.gov.tl/?p=35627&lang=en& + (DEC, 26, special_national_holidays), ), 2024: ( + # https://timor-leste.gov.tl/?p=35627&lang=en + (JAN, 2, special_national_holidays), # http://timor-leste.gov.tl/?p=36002&lang=en (FEB, 14, special_national_holidays), + # https://timor-leste.gov.tl/?p=36859&lang=en + (MAR, 28, special_national_holidays), + # https://timor-leste.gov.tl/?p=39062&lang=en + (AUG, 28, popular_consultation_25th), + (AUG, 29, popular_consultation_25th), + # https://timor-leste.gov.tl/?p=39068&lang=en + (SEP, 9, pope_francis_visit), + (SEP, 10, pope_francis_visit), + (SEP, 11, pope_francis_visit), + # https://timor-leste.gov.tl/?p=40592&lang=en + (OCT, 31, special_national_holidays), ), } diff --git a/holidays/locale/en_US/LC_MESSAGES/TL.po b/holidays/locale/en_US/LC_MESSAGES/TL.po index ad62744d0..4af7f5d3f 100644 --- a/holidays/locale/en_US/LC_MESSAGES/TL.po +++ b/holidays/locale/en_US/LC_MESSAGES/TL.po @@ -14,9 +14,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.57\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-10-14 08:23+0700\n" -"PO-Revision-Date: 2024-09-07 17:45+0300\n" +"PO-Revision-Date: 2024-10-24 23:11+0300\n" "Last-Translator: ~Jhellico \n" "Language-Team: Holidays localization team\n" "Language: en_US\n" @@ -25,7 +25,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" #. %s (estimated). #, c-format @@ -155,3 +155,15 @@ msgstr "Funeral Ceremonies of Fernando 'La Sama' de Araújo" #. 20th Anniversary Celebrations of the Popular Consultation. msgid "Celebrações do 20.º Aniversário da Consulta Popular" msgstr "20th Anniversary Celebrations of the Popular Consultation" + +#. 25th Anniversary Celebrations of the Popular Consultation. +msgid "Celebrações do 25.º Aniversário da Consulta Popular" +msgstr "25th Anniversary Celebrations of the Popular Consultation" + +#. Local Election Day. +msgid "Dia de eleições locais" +msgstr "Local Election Day" + +#. Visit of His Holiness Pope Francis to Timor-Leste. +msgid "Visita de Sua Santidade o Papa Francisco a Timor-Leste" +msgstr "Visit of His Holiness Pope Francis to Timor-Leste" diff --git a/holidays/locale/pt_TL/LC_MESSAGES/TL.po b/holidays/locale/pt_TL/LC_MESSAGES/TL.po index 206db9829..63d5cfb4e 100644 --- a/holidays/locale/pt_TL/LC_MESSAGES/TL.po +++ b/holidays/locale/pt_TL/LC_MESSAGES/TL.po @@ -14,10 +14,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.36\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-10-14 08:23+0700\n" -"PO-Revision-Date: 2023-10-14 08:26+0700\n" -"Last-Translator: PPsyrius \n" +"PO-Revision-Date: 2024-10-24 23:10+0300\n" +"Last-Translator: ~Jhellico \n" "Language-Team: Holidays localization team\n" "Language: pt_TL\n" "MIME-Version: 1.0\n" @@ -25,7 +25,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.5\n" #. %s (estimated). #, c-format @@ -153,3 +153,15 @@ msgstr "" #. 20th Anniversary Celebrations of the Popular Consultation. msgid "Celebrações do 20.º Aniversário da Consulta Popular" msgstr "" + +#. 25th Anniversary Celebrations of the Popular Consultation. +msgid "Celebrações do 25.º Aniversário da Consulta Popular" +msgstr "" + +#. Local Election Day. +msgid "Dia de eleições locais" +msgstr "" + +#. Visit of His Holiness Pope Francis to Timor-Leste. +msgid "Visita de Sua Santidade o Papa Francisco a Timor-Leste" +msgstr "" diff --git a/holidays/locale/tet/LC_MESSAGES/TL.po b/holidays/locale/tet/LC_MESSAGES/TL.po index 9e3b5d650..595a577c2 100644 --- a/holidays/locale/tet/LC_MESSAGES/TL.po +++ b/holidays/locale/tet/LC_MESSAGES/TL.po @@ -14,18 +14,18 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.36\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-10-14 08:23+0700\n" -"PO-Revision-Date: 2023-10-14 08:29+0700\n" -"Last-Translator: PPsyrius \n" +"PO-Revision-Date: 2024-10-24 23:09+0300\n" +"Last-Translator: ~Jhellico \n" "Language-Team: Holidays localization team\n" "Language: tet\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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.4\n" +"X-Generator: Poedit 3.5\n" #. %s (estimated). #, c-format @@ -152,4 +152,16 @@ msgstr "Serimónia Fúnebre Fernando 'La Sama' de Araújo nian" #. 20th Anniversary Celebrations of the Popular Consultation. msgid "Celebrações do 20.º Aniversário da Consulta Popular" -msgstr "Komemorasaun Aniversáriu Konsulta Popular ba dala 20" +msgstr "Komemorasaun Aniversáriu Konsulta Populár ba dala 20" + +#. 25th Anniversary Celebrations of the Popular Consultation. +msgid "Celebrações do 25.º Aniversário da Consulta Popular" +msgstr "Komemorasaun Aniversáriu Konsulta Populár ba dala 25" + +#. Local Election Day. +msgid "Dia de eleições locais" +msgstr "Loron eleisaun lokál nian" + +#. Visit of His Holiness Pope Francis to Timor-Leste. +msgid "Visita de Sua Santidade o Papa Francisco a Timor-Leste" +msgstr "Vizita Sua Santidade Papa Francisco mai Timor-Leste" diff --git a/snapshots/countries/TL_COMMON.json b/snapshots/countries/TL_COMMON.json index 923b93165..45724837a 100644 --- a/snapshots/countries/TL_COMMON.json +++ b/snapshots/countries/TL_COMMON.json @@ -432,7 +432,9 @@ "2022-06-16": "Corpus Christi", "2022-07-09": "Eid al-Adha", "2022-08-20": "Day of the Armed Forces for the National Liberation of Timor-Leste (FALINTIL)", + "2022-08-29": "National Holidays (Special)", "2022-08-30": "Popular Consultation Day", + "2022-09-06": "National Holidays (Special)", "2022-10-31": "National Holidays (Special)", "2022-11-01": "All Saints' Day", "2022-11-02": "All Souls' Day", @@ -451,31 +453,40 @@ "2023-01-23": "National Holidays (Special)", "2023-02-22": "Ash Wednesday; National Holidays (Special)", "2023-03-03": "Veteran's Day", - "2023-04-06": "Holy Thursday", + "2023-04-06": "Holy Thursday; National Holidays (Special)", "2023-04-07": "Holy Friday", + "2023-04-10": "National Holidays (Special)", + "2023-04-20": "National Holidays (Special)", + "2023-04-21": "National Holidays (Special)", "2023-04-22": "Eid al-Fitr", "2023-05-01": "World Labor Day", "2023-05-18": "The Day of Ascension of Jesus Christ into Heaven", + "2023-05-19": "Parliamentary Election Day", "2023-05-20": "Restoration of Independence Day", + "2023-05-22": "Parliamentary Election Day", "2023-06-01": "World Children's Day", "2023-06-08": "Corpus Christi", "2023-06-29": "Eid al-Adha", "2023-08-20": "Day of the Armed Forces for the National Liberation of Timor-Leste (FALINTIL)", "2023-08-30": "Popular Consultation Day", + "2023-10-27": "Local Election Day", "2023-11-01": "All Saints' Day", "2023-11-02": "All Souls' Day", "2023-11-03": "National Women's Day", "2023-11-12": "National Youth Day", + "2023-11-13": "Local Election Day", "2023-11-28": "Proclamation of Independence Day", "2023-12-07": "Memorial Day", "2023-12-08": "Day of Our Lady of Immaculate Conception and Timor-Leste Patroness", "2023-12-10": "World Human Rights Day", "2023-12-25": "Christmas Day", + "2023-12-26": "National Holidays (Special)", "2023-12-31": "National Heroes Day", "2024-01-01": "New Year's Day", + "2024-01-02": "National Holidays (Special)", "2024-02-14": "Ash Wednesday; National Holidays (Special)", "2024-03-03": "Veteran's Day", - "2024-03-28": "Holy Thursday", + "2024-03-28": "Holy Thursday; National Holidays (Special)", "2024-03-29": "Holy Friday", "2024-04-10": "Eid al-Fitr", "2024-05-01": "World Labor Day", @@ -485,7 +496,13 @@ "2024-06-01": "World Children's Day", "2024-06-17": "Eid al-Adha", "2024-08-20": "Day of the Armed Forces for the National Liberation of Timor-Leste (FALINTIL)", + "2024-08-28": "25th Anniversary Celebrations of the Popular Consultation", + "2024-08-29": "25th Anniversary Celebrations of the Popular Consultation", "2024-08-30": "Popular Consultation Day", + "2024-09-09": "Visit of His Holiness Pope Francis to Timor-Leste", + "2024-09-10": "Visit of His Holiness Pope Francis to Timor-Leste", + "2024-09-11": "Visit of His Holiness Pope Francis to Timor-Leste", + "2024-10-31": "National Holidays (Special)", "2024-11-01": "All Saints' Day", "2024-11-02": "All Souls' Day", "2024-11-03": "National Women's Day", diff --git a/tests/countries/test_timor_leste.py b/tests/countries/test_timor_leste.py index 0d45208c3..48c3d311d 100644 --- a/tests/countries/test_timor_leste.py +++ b/tests/countries/test_timor_leste.py @@ -121,13 +121,32 @@ def test_special_government_holidays(self): "2022-04-18", "2022-04-19", "2022-04-20", + "2022-08-29", + "2022-09-06", "2022-10-31", "2022-12-09", "2022-12-26", "2023-01-02", "2023-01-23", "2023-02-22", + "2023-04-06", + "2023-04-10", + "2023-04-20", + "2023-04-21", + "2023-05-19", + "2023-05-22", + "2023-10-27", + "2023-11-13", + "2023-12-26", + "2024-01-02", "2024-02-14", + "2024-03-28", + "2024-08-28", + "2024-08-29", + "2024-09-09", + "2024-09-10", + "2024-09-11", + "2024-10-31", ) def test_2011_public(self): @@ -454,12 +473,17 @@ def test_l10n_default(self): ("2023-01-23", "Feriados Nacionais (Especiais)"), ("2023-02-22", "Feriados Nacionais (Especiais); Quarta-Feira de Cinzas"), ("2023-03-03", "Dia dos Veteranos"), - ("2023-04-06", "Quinta-Feira Santa"), + ("2023-04-06", "Feriados Nacionais (Especiais); Quinta-Feira Santa"), ("2023-04-07", "Sexta-Feira Santa"), + ("2023-04-10", "Feriados Nacionais (Especiais)"), + ("2023-04-20", "Feriados Nacionais (Especiais)"), + ("2023-04-21", "Feriados Nacionais (Especiais)"), ("2023-04-22", "Idul Fitri"), ("2023-05-01", "Dia Mundial do Trabalhador"), ("2023-05-18", "Dia da Ascensão de Jesus Cristo ao Céu"), + ("2023-05-19", "Dia de Eleições Parlamentares"), ("2023-05-20", "Dia da Restauração da Independência"), + ("2023-05-22", "Dia de Eleições Parlamentares"), ("2023-06-01", "Dia Mundial da Criança"), ("2023-06-08", "Festa do Corpo de Deus"), ("2023-06-29", "Idul Adha"), @@ -468,10 +492,12 @@ def test_l10n_default(self): "Dia das Forças Armadas de Libertação Nacional de Timor-Leste (FALINTIL)", ), ("2023-08-30", "Dia da Consulta Popular"), + ("2023-10-27", "Dia de eleições locais"), ("2023-11-01", "Dia de Todos os Santos"), ("2023-11-02", "Dia de Todos os Fiéis Defuntos"), ("2023-11-03", "Dia Nacional da Mulher"), ("2023-11-12", "Dia Nacional da Juventude"), + ("2023-11-13", "Dia de eleições locais"), ("2023-11-28", "Dia da Proclamação da Independência"), ("2023-12-07", "Dia da Memória"), ( @@ -480,6 +506,7 @@ def test_l10n_default(self): ), ("2023-12-10", "Dia Mundial dos Direitos Humanos"), ("2023-12-25", "Dia de Natal"), + ("2023-12-26", "Feriados Nacionais (Especiais)"), ("2023-12-31", "Dia dos Heróis Nacionais"), ) @@ -491,12 +518,17 @@ def test_l10n_en_us(self): ("2023-01-23", "National Holidays (Special)"), ("2023-02-22", "Ash Wednesday; National Holidays (Special)"), ("2023-03-03", "Veteran's Day"), - ("2023-04-06", "Holy Thursday"), + ("2023-04-06", "Holy Thursday; National Holidays (Special)"), ("2023-04-07", "Holy Friday"), + ("2023-04-10", "National Holidays (Special)"), + ("2023-04-20", "National Holidays (Special)"), + ("2023-04-21", "National Holidays (Special)"), ("2023-04-22", "Eid al-Fitr"), ("2023-05-01", "World Labor Day"), ("2023-05-18", "The Day of Ascension of Jesus Christ into Heaven"), + ("2023-05-19", "Parliamentary Election Day"), ("2023-05-20", "Restoration of Independence Day"), + ("2023-05-22", "Parliamentary Election Day"), ("2023-06-01", "World Children's Day"), ("2023-06-08", "Corpus Christi"), ("2023-06-29", "Eid al-Adha"), @@ -505,15 +537,18 @@ def test_l10n_en_us(self): "Day of the Armed Forces for the National Liberation of Timor-Leste (FALINTIL)", ), ("2023-08-30", "Popular Consultation Day"), + ("2023-10-27", "Local Election Day"), ("2023-11-01", "All Saints' Day"), ("2023-11-02", "All Souls' Day"), ("2023-11-03", "National Women's Day"), ("2023-11-12", "National Youth Day"), + ("2023-11-13", "Local Election Day"), ("2023-11-28", "Proclamation of Independence Day"), ("2023-12-07", "Memorial Day"), ("2023-12-08", "Day of Our Lady of Immaculate Conception and Timor-Leste Patroness"), ("2023-12-10", "World Human Rights Day"), ("2023-12-25", "Christmas Day"), + ("2023-12-26", "National Holidays (Special)"), ("2023-12-31", "National Heroes Day"), ) @@ -525,25 +560,33 @@ def test_l10n_tet(self): ("2023-01-23", "Feriadu Nasional (Espesial)"), ("2023-02-22", "Feriadu Nasional (Espesial); Kuarta-Feira Sinzas"), ("2023-03-03", "Loron Veteranu sira nian"), - ("2023-04-06", "Quinta-Feira Santa"), + ("2023-04-06", "Feriadu Nasional (Espesial); Quinta-Feira Santa"), ("2023-04-07", "Sesta-Feira Santa"), + ("2023-04-10", "Feriadu Nasional (Espesial)"), + ("2023-04-20", "Feriadu Nasional (Espesial)"), + ("2023-04-21", "Feriadu Nasional (Espesial)"), ("2023-04-22", "Idul-Fitri"), ("2023-05-01", "Loron Mundiál Serbisu-na'in sira nian"), ("2023-05-18", "Loron Ascensão do Senhor Jesus Cristo hi'it An ba Lalehan nian"), + ("2023-05-19", "Loron Eleisaun Parlamentár nian"), ("2023-05-20", "Loron Restaurasaun Independénsia nian"), + ("2023-05-22", "Loron Eleisaun Parlamentár nian"), ("2023-06-01", "Loron Mundial ba Labarik"), ("2023-06-08", "Festa Korpu de Deus"), ("2023-06-29", "Idul Adha"), ("2023-08-20", "Loron Forsa Armada Libertasaun Nasionál Timor-Leste (FALINTIL) nian"), ("2023-08-30", "Loron Konsulta Populár nian"), + ("2023-10-27", "Loron eleisaun lokál nian"), ("2023-11-01", "Loron Santu sira Hotu nian"), ("2023-11-02", "Loron Matebian sira nian"), ("2023-11-03", "Loron Nasionál Feto"), ("2023-11-12", "Loron Nasionál Foin-Sa'e sira nian"), + ("2023-11-13", "Loron eleisaun lokál nian"), ("2023-11-28", "Loron Proklamasaun Independénsia nian"), ("2023-12-07", "Loron Memória nian"), ("2023-12-08", "Loron Nossa Senhora da Imaculada Conceição, mahein Timor-Leste nian"), ("2023-12-10", "Loron Mundiál Direitu Umanu"), ("2023-12-25", "Loron Natál"), + ("2023-12-26", "Feriadu Nasional (Espesial)"), ("2023-12-31", "Loron Eroi Nasionál sira nian"), ) From 0adc4beb89bed5e08e94fb845cae9da41b3ebd23 Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Fri, 25 Oct 2024 20:00:44 +0300 Subject: [PATCH 10/32] Update Spain holidays in 2025 (#2080) --- holidays/countries/spain.py | 31 ++++++++------- snapshots/countries/ES_AN.json | 2 +- snapshots/countries/ES_AR.json | 2 +- snapshots/countries/ES_AS.json | 2 +- snapshots/countries/ES_CB.json | 1 - snapshots/countries/ES_CE.json | 4 +- snapshots/countries/ES_CL.json | 2 +- snapshots/countries/ES_CM.json | 1 - snapshots/countries/ES_CN.json | 1 - snapshots/countries/ES_COMMON.json | 1 - snapshots/countries/ES_CT.json | 1 - snapshots/countries/ES_EX.json | 2 +- snapshots/countries/ES_GA.json | 1 - snapshots/countries/ES_IB.json | 3 +- snapshots/countries/ES_MC.json | 2 +- snapshots/countries/ES_MD.json | 2 +- snapshots/countries/ES_ML.json | 4 +- snapshots/countries/ES_NC.json | 1 - snapshots/countries/ES_PV.json | 1 - snapshots/countries/ES_RI.json | 1 - snapshots/countries/ES_VC.json | 2 +- tests/countries/test_spain.py | 60 ++++++++++++++++++++++++++++++ 22 files changed, 89 insertions(+), 38 deletions(-) diff --git a/holidays/countries/spain.py b/holidays/countries/spain.py index 06bd29d15..435d83643 100644 --- a/holidays/countries/spain.py +++ b/holidays/countries/spain.py @@ -46,8 +46,9 @@ class Spain( 2020: https://www.boe.es/buscar/doc.php?id=BOE-A-2019-14552 2021: https://www.boe.es/buscar/doc.php?id=BOE-A-2020-13343 2022: https://www.boe.es/buscar/doc.php?id=BOE-A-2021-17113 - 2023: https://www.boe.es/diario_boe/txt.php?id=BOE-A-2022-16755 + 2023: https://www.boe.es/buscar/doc.php?id=BOE-A-2022-16755 2024: https://www.boe.es/buscar/doc.php?id=BOE-A-2023-22014 + 2025: https://www.boe.es/buscar/doc.php?id=BOE-A-2024-21316 """ country = "ES" @@ -105,7 +106,7 @@ def _populate_public_holidays(self): # Assumption Day. self._add_assumption_of_mary_day(tr("Asunción de la Virgen")) - if self._year != 2014: + if self._year not in {2014, 2025}: # National Day. self._add_holiday_oct_12(tr("Fiesta Nacional de España")) @@ -143,7 +144,7 @@ def _populate_subdiv_an_public_holidays(self): if self._year in {2010, 2021}: self._move_holiday(self._add_assumption_of_mary_day(tr("Asunción de la Virgen"))) - if self._year == 2014: + if self._year in {2014, 2025}: self._move_holiday(self._add_holiday_oct_12(tr("Fiesta Nacional de España"))) if self._year in {2015, 2020}: @@ -176,7 +177,7 @@ def _populate_subdiv_ar_public_holidays(self): if self._year in {2010, 2021}: self._move_holiday(self._add_assumption_of_mary_day(tr("Asunción de la Virgen"))) - if self._year == 2014: + if self._year in {2014, 2025}: self._move_holiday(self._add_holiday_oct_12(tr("Fiesta Nacional de España"))) if self._year in {2015, 2020}: @@ -209,7 +210,7 @@ def _populate_subdiv_as_public_holidays(self): # Asturia Day. self._move_holiday(self._add_holiday_sep_8(tr("Día de Asturias"))) - if self._year == 2014: + if self._year in {2014, 2025}: self._move_holiday(self._add_holiday_oct_12(tr("Fiesta Nacional de España"))) if self._year in {2015, 2020}: @@ -275,7 +276,7 @@ def _populate_subdiv_ce_public_holidays(self): # Santa Maria of Africa. self._add_holiday_aug_5(tr("Nuestra Señora de África")) - if self._year not in {2011, 2012, 2015, 2018}: + if self._year not in {2011, 2012, 2015, 2018, 2025}: # Ceuta Day. self._add_holiday_sep_2(tr("Día de Ceuta")) @@ -328,7 +329,7 @@ def _populate_subdiv_cl_public_holidays(self): if self._year == 2021: self._move_holiday(self._add_assumption_of_mary_day(tr("Asunción de la Virgen"))) - if self._year == 2014: + if self._year in {2014, 2025}: self._move_holiday(self._add_holiday_oct_12(tr("Fiesta Nacional de España"))) if self._year in {2015, 2020}: @@ -438,7 +439,7 @@ def _populate_subdiv_ex_public_holidays(self): # Extremadura Day. self._move_holiday(self._add_holiday_sep_8(tr("Día de Extremadura"))) - if self._year == 2014: + if self._year in {2014, 2025}: self._move_holiday(self._add_holiday_oct_12(tr("Fiesta Nacional de España"))) if self._year in {2015, 2020}: @@ -480,7 +481,7 @@ def _populate_subdiv_ib_public_holidays(self): self._add_holy_thursday(tr("Jueves Santo")) - if self._year != 2014: + if self._year not in {2014, 2025}: self._add_easter_monday(tr("Lunes de Pascua")) if self._year == 2015: @@ -492,7 +493,7 @@ def _populate_subdiv_ib_public_holidays(self): if self._year in {2011, 2016, 2022}: self._move_holiday(self._add_christmas_day(tr("Natividad del Señor"))) - if self._year in {2013, 2014, 2019, 2020}: + if self._year in {2013, 2014, 2019, 2020, 2025}: self._add_christmas_day_two(tr("San Esteban")) def _populate_subdiv_mc_public_holidays(self): @@ -502,7 +503,7 @@ def _populate_subdiv_mc_public_holidays(self): if self._year in {2013, 2019}: self._move_holiday(self._add_epiphany_day(tr("Epifanía del Señor"))) - if (self._year <= 2021 and self._year != 2017) or self._year == 2024: + if (self._year <= 2021 and self._year != 2017) or self._year in {2024, 2025}: self._move_holiday(self._add_saint_josephs_day(tr("San José"))) self._add_holy_thursday(tr("Jueves Santo")) @@ -539,7 +540,7 @@ def _populate_subdiv_md_public_holidays(self): if self._year in {2010, 2011, 2014}: self._add_corpus_christi_day(tr("Corpus Christi")) - if self._year in {2011, 2016, 2022, 2024}: + if self._year in {2011, 2016, 2022, 2024, 2025}: self._add_saint_james_day(tr("Santiago Apóstol")) if self._year == 2020: @@ -579,7 +580,7 @@ def _populate_subdiv_ml_public_holidays(self): if self._year in {2011, 2016, 2022}: self._move_holiday(self._add_christmas_day(tr("Natividad del Señor"))) - if self._year in {2022, 2023}: + if self._year in {2022, 2023, 2025}: # Eid al-Fitr. self._add_eid_al_fitr_day(tr("Fiesta del Eid Fitr")) @@ -652,7 +653,7 @@ def _populate_subdiv_ri_public_holidays(self): self._move_holiday(self._add_christmas_day(tr("Natividad del Señor"))) def _populate_subdiv_vc_public_holidays(self): - if (self._year <= 2022 and self._year != 2017) or self._year == 2024: + if (self._year <= 2022 and self._year != 2017) or self._year in {2024, 2025}: self._add_saint_josephs_day(tr("San José")) if self._year in {2011, 2016, 2017, 2022}: @@ -702,11 +703,13 @@ class SpainIslamicHolidays(_CustomIslamicHolidays): 2022: (JUL, 9), 2023: (JUN, 29), 2024: (JUN, 17), + 2025: (JUN, 6), } EID_AL_FITR_DATES = { 2022: (MAY, 3), 2023: (APR, 21), + 2025: (MAR, 31), } diff --git a/snapshots/countries/ES_AN.json b/snapshots/countries/ES_AN.json index 886b39e40..4a962b1fe 100644 --- a/snapshots/countries/ES_AN.json +++ b/snapshots/countries/ES_AN.json @@ -906,7 +906,7 @@ "2025-04-18": "Good Friday", "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", + "2025-10-13": "Monday following National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_AR.json b/snapshots/countries/ES_AR.json index 90e405a19..9c7777837 100644 --- a/snapshots/countries/ES_AR.json +++ b/snapshots/countries/ES_AR.json @@ -906,7 +906,7 @@ "2025-04-23": "Saint George's Day", "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", + "2025-10-13": "Monday following National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_AS.json b/snapshots/countries/ES_AS.json index ad7be9c5d..9e7185644 100644 --- a/snapshots/countries/ES_AS.json +++ b/snapshots/countries/ES_AS.json @@ -906,7 +906,7 @@ "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", "2025-09-08": "Asturia Day", - "2025-10-12": "National Day", + "2025-10-13": "Monday following National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_CB.json b/snapshots/countries/ES_CB.json index 108fd3898..b2232d956 100644 --- a/snapshots/countries/ES_CB.json +++ b/snapshots/countries/ES_CB.json @@ -969,7 +969,6 @@ "2025-07-28": "Cantabria Institutions Day", "2025-08-15": "Assumption Day", "2025-09-15": "Our Lady of the Bien Aparecida", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_CE.json b/snapshots/countries/ES_CE.json index c584355d6..be2553afe 100644 --- a/snapshots/countries/ES_CE.json +++ b/snapshots/countries/ES_CE.json @@ -908,11 +908,9 @@ "2025-04-17": "Maundy Thursday", "2025-04-18": "Good Friday", "2025-05-01": "Labor Day", - "2025-06-06": "Eid al-Adha (estimated)", + "2025-06-06": "Eid al-Adha", "2025-08-05": "Santa Maria of Africa", "2025-08-15": "Assumption Day", - "2025-09-02": "Ceuta Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_CL.json b/snapshots/countries/ES_CL.json index b75e9c988..e8e663c39 100644 --- a/snapshots/countries/ES_CL.json +++ b/snapshots/countries/ES_CL.json @@ -906,7 +906,7 @@ "2025-04-23": "Castile and Le\u00f3n Day", "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", + "2025-10-13": "Monday following National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_CM.json b/snapshots/countries/ES_CM.json index e17b44d03..55a6f2d96 100644 --- a/snapshots/countries/ES_CM.json +++ b/snapshots/countries/ES_CM.json @@ -967,7 +967,6 @@ "2025-05-31": "Castilla-La Mancha Day", "2025-06-19": "Corpus Christi", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_CN.json b/snapshots/countries/ES_CN.json index 8c34dc4d9..03e7601fb 100644 --- a/snapshots/countries/ES_CN.json +++ b/snapshots/countries/ES_CN.json @@ -892,7 +892,6 @@ "2025-05-01": "Labor Day", "2025-05-30": "Day of the Canary Islands", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_COMMON.json b/snapshots/countries/ES_COMMON.json index 4df7fa080..f6dc5beba 100644 --- a/snapshots/countries/ES_COMMON.json +++ b/snapshots/countries/ES_COMMON.json @@ -733,7 +733,6 @@ "2025-04-18": "Good Friday", "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_CT.json b/snapshots/countries/ES_CT.json index 1eba92c7b..ef154a7b1 100644 --- a/snapshots/countries/ES_CT.json +++ b/snapshots/countries/ES_CT.json @@ -1033,7 +1033,6 @@ "2025-06-24": "Saint John the Baptist", "2025-08-15": "Assumption Day", "2025-09-11": "National Day of Catalonia", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_EX.json b/snapshots/countries/ES_EX.json index 0776b83f6..e28079178 100644 --- a/snapshots/countries/ES_EX.json +++ b/snapshots/countries/ES_EX.json @@ -906,7 +906,7 @@ "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", "2025-09-08": "Extremadura Day", - "2025-10-12": "National Day", + "2025-10-13": "Monday following National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_GA.json b/snapshots/countries/ES_GA.json index 4b4f3c44c..f57952ea2 100644 --- a/snapshots/countries/ES_GA.json +++ b/snapshots/countries/ES_GA.json @@ -969,7 +969,6 @@ "2025-05-17": "Galician Literature Day", "2025-07-25": "Galician National Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_IB.json b/snapshots/countries/ES_IB.json index b1e7f9593..bb9c85a7b 100644 --- a/snapshots/countries/ES_IB.json +++ b/snapshots/countries/ES_IB.json @@ -965,14 +965,13 @@ "2025-03-01": "Day of the Balearic Islands", "2025-04-17": "Maundy Thursday", "2025-04-18": "Good Friday", - "2025-04-21": "Easter Monday", "2025-05-01": "Labor Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", "2025-12-25": "Christmas Day", + "2025-12-26": "Saint Stephen's Day", "2026-01-01": "New Year's Day", "2026-01-06": "Epiphany", "2026-03-01": "Day of the Balearic Islands", diff --git a/snapshots/countries/ES_MC.json b/snapshots/countries/ES_MC.json index 30465aa15..0f2785aa5 100644 --- a/snapshots/countries/ES_MC.json +++ b/snapshots/countries/ES_MC.json @@ -962,12 +962,12 @@ "2024-12-25": "Christmas Day", "2025-01-01": "New Year's Day", "2025-01-06": "Epiphany", + "2025-03-19": "Saint Joseph's Day", "2025-04-17": "Maundy Thursday", "2025-04-18": "Good Friday", "2025-05-01": "Labor Day", "2025-06-09": "Murcia Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_MD.json b/snapshots/countries/ES_MD.json index 13a8833a6..65f5b9ec2 100644 --- a/snapshots/countries/ES_MD.json +++ b/snapshots/countries/ES_MD.json @@ -904,8 +904,8 @@ "2025-04-18": "Good Friday", "2025-05-01": "Labor Day", "2025-05-02": "Madrid Day", + "2025-07-25": "Saint James' Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_ML.json b/snapshots/countries/ES_ML.json index f6046718e..87c23bc26 100644 --- a/snapshots/countries/ES_ML.json +++ b/snapshots/countries/ES_ML.json @@ -901,12 +901,12 @@ "2024-12-25": "Christmas Day", "2025-01-01": "New Year's Day", "2025-01-06": "Epiphany", + "2025-03-31": "Eid al-Fitr", "2025-04-17": "Maundy Thursday", "2025-04-18": "Good Friday", "2025-05-01": "Labor Day", - "2025-06-06": "Eid al-Adha (estimated)", + "2025-06-06": "Eid al-Adha", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_NC.json b/snapshots/countries/ES_NC.json index f79329e60..a7db47630 100644 --- a/snapshots/countries/ES_NC.json +++ b/snapshots/countries/ES_NC.json @@ -907,7 +907,6 @@ "2025-05-01": "Labor Day", "2025-07-25": "Saint James' Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_PV.json b/snapshots/countries/ES_PV.json index baa2486bb..1e6063c99 100644 --- a/snapshots/countries/ES_PV.json +++ b/snapshots/countries/ES_PV.json @@ -967,7 +967,6 @@ "2025-05-01": "Labor Day", "2025-07-25": "Saint James' Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_RI.json b/snapshots/countries/ES_RI.json index cea96798f..3ea8e0859 100644 --- a/snapshots/countries/ES_RI.json +++ b/snapshots/countries/ES_RI.json @@ -967,7 +967,6 @@ "2025-05-01": "Labor Day", "2025-06-09": "La Rioja Day", "2025-08-15": "Assumption Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/snapshots/countries/ES_VC.json b/snapshots/countries/ES_VC.json index aa757b080..5ca966efd 100644 --- a/snapshots/countries/ES_VC.json +++ b/snapshots/countries/ES_VC.json @@ -964,13 +964,13 @@ "2024-12-25": "Christmas Day", "2025-01-01": "New Year's Day", "2025-01-06": "Epiphany", + "2025-03-19": "Saint Joseph's Day", "2025-04-18": "Good Friday", "2025-04-21": "Easter Monday", "2025-05-01": "Labor Day", "2025-06-24": "Saint John the Baptist", "2025-08-15": "Assumption Day", "2025-10-09": "Valencian Community Day", - "2025-10-12": "National Day", "2025-11-01": "All Saints' Day", "2025-12-06": "Constitution Day", "2025-12-08": "Immaculate Conception", diff --git a/tests/countries/test_spain.py b/tests/countries/test_spain.py index f94e00d38..ea9b0aab1 100644 --- a/tests/countries/test_spain.py +++ b/tests/countries/test_spain.py @@ -229,6 +229,19 @@ def test_fixed_holidays_2024(self): "2024-12-25", ) + def test_fixed_holidays_2025(self): + self.assertNonObservedHoliday( + "2025-01-01", + "2025-01-06", + "2025-04-18", + "2025-05-01", + "2025-08-15", + "2025-11-01", + "2025-12-06", + "2025-12-08", + "2025-12-25", + ) + def test_islamic(self): self.assertNoHolidayName( "Fiesta del Sacrificio-Eidul Adha", Spain(subdiv="CE", years=2009) @@ -970,6 +983,53 @@ def test_variable_holidays_2024(self): } self._assertVariableDays(2024, province_days) + def test_variable_holidays_2025(self): + province_days = { + (FEB, 28): {"AN"}, + (MAR, 1): {"IB"}, + (MAR, 19): {"MC", "VC"}, + (MAR, 31): {"ML"}, + (APR, 17): { + "AN", + "AR", + "AS", + "CB", + "CE", + "CL", + "CM", + "CN", + "EX", + "GA", + "IB", + "MC", + "MD", + "ML", + "NC", + "PV", + "RI", + }, + (APR, 21): {"CT", "NC", "PV", "RI", "VC"}, + (APR, 23): {"AR", "CL"}, + (MAY, 2): {"MD"}, + (MAY, 17): {"GA"}, + (MAY, 30): {"CN"}, + (MAY, 31): {"CM"}, + (JUN, 6): {"CE", "ML"}, + (JUN, 9): {"MC", "RI"}, + (JUN, 19): {"CM"}, + (JUN, 24): {"CT", "VC"}, + (JUL, 25): {"GA", "MD", "NC", "PV"}, + (JUL, 28): {"CB"}, + (AUG, 5): {"CE"}, + (SEP, 8): {"AS", "EX"}, + (SEP, 11): {"CT"}, + (SEP, 15): {"CB"}, + (OCT, 9): {"VC"}, + (OCT, 13): {"AN", "AR", "AS", "CL", "EX"}, + (DEC, 26): {"CT", "IB"}, + } + self._assertVariableDays(2025, province_days) + def test_l10n_default(self): self.assertLocalizedHolidays( ("2023-01-06", "Epifanía del Señor"), From 0e05fb9e01296b92c5017b9de5e6130ef2ad0ff2 Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Sat, 26 Oct 2024 19:55:07 +0300 Subject: [PATCH 11/32] Refactor Canada tests (#2084) --- tests/countries/test_canada.py | 88 +++++++++++++++------------------- 1 file changed, 39 insertions(+), 49 deletions(-) diff --git a/tests/countries/test_canada.py b/tests/countries/test_canada.py index 7ead2a6aa..b49eccb34 100644 --- a/tests/countries/test_canada.py +++ b/tests/countries/test_canada.py @@ -12,7 +12,7 @@ from unittest import TestCase -from holidays.constants import GOVERNMENT, OPTIONAL +from holidays.constants import GOVERNMENT, OPTIONAL, PUBLIC from holidays.countries.canada import Canada, CA, CAN from tests.common import CommonCountryTests @@ -21,9 +21,15 @@ class TestCanada(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): years = range(1867, 2050) - super().setUpClass(Canada, years=years, years_non_observed=(range(2000, 2024))) + years_non_observed = range(2000, 2024) + super().setUpClass(Canada, years=years, years_non_observed=years_non_observed) cls.prov_hols = {prov: CA(subdiv=prov, years=years) for prov in CA.subdivisions} + cls.prov_hols_nonobs = { + prov: CA(subdiv=prov, years=years_non_observed, observed=False) + for prov in CA.subdivisions + } cls.gov_hols = CA(years=years, categories=GOVERNMENT) + cls.opt_hols = CA(years=years, categories=OPTIONAL) cls.prov_opt_hols = { prov: CA(subdiv=prov, years=years, categories=OPTIONAL) for prov in CA.subdivisions } @@ -32,9 +38,7 @@ def test_country_aliases(self): self.assertAliases(Canada, CA, CAN) def test_no_holidays(self): - self.assertNoHolidays(Canada(years=1866)) - self.assertNoHolidays(Canada(years=1866, categories=GOVERNMENT)) - self.assertNoHolidays(Canada(years=1866, categories=OPTIONAL)) + self.assertNoHolidays(Canada(categories=(GOVERNMENT, OPTIONAL, PUBLIC), years=1866)) def test_new_years_day(self): name = "New Year's Day" @@ -57,7 +61,7 @@ def test_new_years_day(self): self.assertHolidayName(name_observed, self.gov_hols, dts) for prov, holidays in self.prov_hols.items(): self.assertHolidayName(name_observed, holidays, dts) - self.assertNoNonObservedHoliday(CA(subdiv=prov, observed=False), dts) + self.assertNoNonObservedHoliday(self.prov_hols_nonobs[prov], dts) self.assertNoNonObservedHoliday(dts) def test_good_friday(self): @@ -119,7 +123,7 @@ def test_canada_day(self): self.assertHoliday(self.prov_hols[prov], dts_sat, dts_sun) else: self.assertNoHoliday(self.prov_hols[prov], dts_sat, dts_sun) - self.assertNoNonObservedHoliday(CA(subdiv=prov, observed=False), dts_sat, dts_sun) + self.assertNoNonObservedHoliday(self.prov_hols_nonobs[prov], dts_sat, dts_sun) def test_labour_day(self): name = "Labour Day" @@ -178,25 +182,17 @@ def test_christmas_day(self): self.assertNoNonObservedHoliday(dts_sat, dts_sun_with_boxing, dts_sun_without_boxing) self.assertHolidayName(name_observed, self.gov_hols, dts_sat, dts_sun_with_boxing) self.assertNoNonObservedHoliday( - CA(observed=False, categories=GOVERNMENT), - dts_sat, - dts_sun_with_boxing, - ) - self.assertHolidayName( - name_observed, CA(categories=OPTIONAL), dts_sat, dts_sun_with_boxing + CA(observed=False, categories=GOVERNMENT), dts_sat, dts_sun_with_boxing ) + self.assertHolidayName(name_observed, self.opt_hols, dts_sat, dts_sun_with_boxing) self.assertNoNonObservedHoliday( - CA(observed=False, categories=OPTIONAL), - dts_sat, - dts_sun_with_boxing, + CA(observed=False, categories=OPTIONAL), dts_sat, dts_sun_with_boxing ) for prov, holidays in self.prov_hols.items(): self.assertHolidayName(name_observed, holidays, dts_sat, dts_sun_without_boxing) self.assertNoHoliday(holidays, dts_sun_with_boxing) self.assertNoNonObservedHoliday( - CA(subdiv=prov, observed=False), - dts_sat, - dts_sun_with_boxing, + self.prov_hols_nonobs[prov], dts_sat, dts_sun_with_boxing ) def test_victoria_day(self): @@ -258,12 +254,10 @@ def test_national_day_for_truth_and_reconciliation(self): self.assertNoHolidayName(name, holidays, range(1867, start_years[prov])) else: self.assertNoHolidayName(name, holidays) - self.assertNoNonObservedHoliday(CA(subdiv=prov, observed=False), dts) + self.assertNoNonObservedHoliday(self.prov_hols_nonobs[prov], dts) self.assertHolidayName( - name, - CA(subdiv="AB", categories=OPTIONAL), - (f"{year}-09-30" for year in range(2021, 2050)), + name, self.prov_opt_hols["AB"], (f"{year}-09-30" for year in range(2021, 2050)) ) def test_thanksgiving_day(self): @@ -296,7 +290,7 @@ def test_thanksgiving_day(self): self.assertNoHolidayName(name, holidays, dts) for prov in ("NB", "NL"): - self.assertHolidayName(name, CA(subdiv=prov, categories=OPTIONAL), dts) + self.assertHolidayName(name, self.prov_opt_hols[prov], dts) def test_remembrance_day(self): name = "Remembrance Day" @@ -333,15 +327,13 @@ def test_remembrance_day(self): self.assertNoHolidayName(name, holidays) if prov in {"AB", "NL", "NS", "PE", "SK", "YT"}: - self.assertHolidayName(name_observed, self.prov_hols[prov], dts) - self.assertNoNonObservedHoliday(CA(subdiv=prov, observed=False), dts) + self.assertHolidayName(name_observed, holidays, dts) + self.assertNoNonObservedHoliday(self.prov_hols_nonobs[prov], dts) else: self.assertNoHoliday(holidays, dts) self.assertHolidayName( - name, - CA(subdiv="MB", categories=OPTIONAL), - (f"{year}-11-11" for year in range(1931, 2050)), + name, self.prov_opt_hols["MB"], (f"{year}-11-11" for year in range(1931, 2050)) ) def test_boxing_day(self): @@ -352,8 +344,9 @@ def test_boxing_day(self): name, self.gov_hols, (f"{year}-12-26" for year in range(1867, 2050)) ) - opt_holidays = CA(years=range(1867, 2050), categories=OPTIONAL) - self.assertHolidayName(name, opt_holidays, (f"{year}-12-26" for year in range(1867, 2050))) + self.assertHolidayName( + name, self.opt_hols, (f"{year}-12-26" for year in range(1867, 2050)) + ) dts = ( "2004-12-28", @@ -363,7 +356,7 @@ def test_boxing_day(self): "2020-12-28", "2021-12-28", ) - self.assertHolidayName(name_observed, opt_holidays, dts) + self.assertHolidayName(name_observed, self.opt_hols, dts) self.assertNoNonObservedHoliday(CA(observed=False, categories=OPTIONAL), dts) dts = ( @@ -372,13 +365,11 @@ def test_boxing_day(self): "2021-12-28", ) self.assertHolidayName(name_observed, self.prov_hols["ON"], dts) - self.assertNoNonObservedHoliday(CA(subdiv="ON", observed=False), dts) + self.assertNoNonObservedHoliday(self.prov_hols_nonobs["ON"], dts) for prov in ("AB", "NB", "NL"): self.assertHolidayName( - name, - CA(subdiv=prov, categories=OPTIONAL), - (f"{year}-12-26" for year in range(1867, 2050)), + name, self.prov_opt_hols[prov], (f"{year}-12-26" for year in range(1867, 2050)) ) def test_family_day(self): @@ -479,12 +470,12 @@ def test_easter_monday(self): self.assertNoHolidayName(name, holidays) if prov in {"AB", "QC"}: - self.assertHolidayName(name, CA(subdiv=prov, categories=OPTIONAL), dts) + self.assertHolidayName(name, self.prov_opt_hols[prov], dts) def test_civic_holiday_ab(self): name = "Heritage Day" self.assertNoHolidayName(name, self.prov_hols["AB"]) - ab_opt_holidays = CA(subdiv="AB", categories=OPTIONAL) + ab_opt_holidays = self.prov_opt_hols["AB"] dts = ( "1974-08-05", "1999-08-02", @@ -520,7 +511,7 @@ def test_civic_holiday_mb(self): self.assertNoHolidayName(old_name, self.prov_hols["MB"]) self.assertNoHolidayName(new_name, self.prov_hols["MB"]) - mb_opt_holidays = CA(subdiv="MB", categories=OPTIONAL) + mb_opt_holidays = self.prov_opt_hols["MB"] dts = ( "1900-08-06", "1999-08-02", @@ -559,7 +550,7 @@ def test_civic_holiday_nb(self): def test_civic_holiday_ns(self): name = "Natal Day" self.assertNoHolidayName(name, self.prov_hols["NS"]) - ns_opt_holidays = CA(subdiv="NS", categories=OPTIONAL) + ns_opt_holidays = self.prov_opt_hols["NS"] dts = ( "1996-08-05", "1999-08-02", @@ -577,7 +568,7 @@ def test_civic_holiday_nt_nu_on_sk(self): name = "Civic Holiday" nt_holidays = self.prov_hols["NT"] nu_holidays = self.prov_hols["NU"] - on_opt_holidays = CA(subdiv="ON", categories=OPTIONAL) + on_opt_holidays = self.prov_opt_hols["ON"] sk_holidays = self.prov_hols["SK"] dts = ( "1900-08-06", @@ -608,7 +599,7 @@ def test_memorial_day(self): def test_st_patricks_day(self): name = "Saint Patrick's Day" self.assertNoHolidayName(name, self.prov_hols["NL"]) - nl_opt_holidays = CA(subdiv="NL", categories=OPTIONAL) + nl_opt_holidays = self.prov_opt_hols["NL"] dts = ( "1900-03-19", "1999-03-15", @@ -628,7 +619,7 @@ def test_st_patricks_day(self): def test_st_georges_day(self): name = "Saint George's Day" self.assertNoHolidayName(name, self.prov_hols["NL"]) - nl_opt_holidays = CA(subdiv="NL", categories=OPTIONAL) + nl_opt_holidays = self.prov_opt_hols["NL"] dts = ( "1990-04-23", "1999-04-26", @@ -644,7 +635,7 @@ def test_st_georges_day(self): def test_discovery_day_nl(self): name = "Discovery Day" self.assertNoHolidayName(name, self.prov_hols["NL"]) - nl_opt_holidays = CA(subdiv="NL", categories=OPTIONAL) + nl_opt_holidays = self.prov_opt_hols["NL"] dts = ( "1997-06-23", "1999-06-21", @@ -661,7 +652,7 @@ def test_discovery_day_nl(self): def test_orangemans_day(self): name = "Orangemen's Day" self.assertNoHolidayName(name, self.prov_hols["NL"]) - nl_opt_holidays = CA(subdiv="NL", categories=OPTIONAL) + nl_opt_holidays = self.prov_opt_hols["NL"] dts = ( "1900-07-09", "1999-07-12", @@ -707,7 +698,7 @@ def test_nunavut_day(self): self.assertNoHolidayName(name) self.assertNoHoliday(f"{year}-07-09" for year in range(2001, 2050)) self.assertNoHolidayName(name, self.prov_hols["NU"]) - nu_opt_holidays = CA(subdiv="NU", categories=OPTIONAL) + nu_opt_holidays = self.prov_opt_hols["NU"] self.assertNoHoliday(nu_opt_holidays, "1999-07-09", "2000-07-09") self.assertHoliday(nu_opt_holidays, "2000-04-01") self.assertHoliday(nu_opt_holidays, (f"{year}-07-09" for year in range(2001, 2050))) @@ -735,13 +726,12 @@ def test_st_jean_baptiste_day(self): self.assertNoHoliday(qc_holidays, (f"{year}-06-24" for year in range(1867, 1925))) self.assertNoHoliday(f"{year}-06-24" for year in range(1925, 2050)) self.assertHoliday(qc_holidays, "2001-06-25") - self.assertNoNonObservedHoliday(Canada(subdiv="QC", observed=False), "2001-06-25") + self.assertNoNonObservedHoliday(self.prov_hols_nonobs["QC"], "2001-06-25") def test_yukon_heritage_day(self): name = "Heritage Day" self.assertNoHolidayName(name) self.assertNoHolidayName(name, self.prov_hols["YT"]) - yt_opt_holidays = CA(subdiv="YT", categories=OPTIONAL) dts = ( "2017-02-24", "2018-02-23", @@ -750,7 +740,7 @@ def test_yukon_heritage_day(self): "2021-02-26", "2022-02-25", ) - self.assertHolidayName(name, yt_opt_holidays, dts) + self.assertHolidayName(name, self.prov_opt_hols["YT"], dts) def test_queens_funeral(self): for prov, holidays in self.prov_hols.items(): From 4ff5d2993a040bf9f8a46baef65dc657fdacdcba Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com> Date: Sat, 26 Oct 2024 10:18:05 -0700 Subject: [PATCH 12/32] Update CONTRIBUTING.rst (#2085) --- CONTRIBUTING.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 879a0c636..afa8b0095 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -11,9 +11,10 @@ Basics When contributing with fixes and new features, please start forking/branching from the `dev branch`_ to work on the latest code and reduce merging issues. -If you add/change holiday official dates or names you must include references to +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. Contributed PRs_ are required to include valid test +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 coverage in order to be merged. Please don't hesitate to ask for help if you need one with the tests. From 69c11a5cce04735257607bdf652e49ad5b1e5db3 Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:34:32 +0700 Subject: [PATCH 13/32] Update Australia holidays: remove `Adelaide Cup Day` holiday pre-1973 for South Australia (#2082) --- holidays/countries/australia.py | 3 ++- snapshots/countries/AU_SA.json | 23 ----------------------- tests/countries/test_australia.py | 3 ++- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/holidays/countries/australia.py b/holidays/countries/australia.py index a5f121264..2de0cf21c 100644 --- a/holidays/countries/australia.py +++ b/holidays/countries/australia.py @@ -601,6 +601,7 @@ def _populate_subdiv_sa_public_holidays(self): self._add_holiday_jan_26(name) # Adelaide Cup Day. + # First observed as Public Holidays in 1973: https://racingsa.com.au/blog/2020/03/06/2380/a-little-adelaide-cup-history # 2006-2023: changed each year by SA Government Proclamation from the 3rd Monday in May # to the 2nd Monday in March. # from 2024: changed to the 2nd Monday in March officially. @@ -609,7 +610,7 @@ def _populate_subdiv_sa_public_holidays(self): name = tr("Adelaide Cup Day") if self._year >= 2006: self._add_holiday_2nd_mon_of_mar(name) - else: + elif self._year >= 1973: self._add_holiday_3rd_mon_of_may(name) # Easter Saturday. diff --git a/snapshots/countries/AU_SA.json b/snapshots/countries/AU_SA.json index f94b8a08d..2722e0807 100644 --- a/snapshots/countries/AU_SA.json +++ b/snapshots/countries/AU_SA.json @@ -5,7 +5,6 @@ "1950-04-08": "Easter Saturday", "1950-04-10": "Easter Monday", "1950-04-25": "ANZAC Day", - "1950-05-15": "Adelaide Cup Day", "1950-06-12": "King's Birthday", "1950-10-02": "Labor Day", "1950-12-25": "Christmas Day", @@ -16,7 +15,6 @@ "1951-03-24": "Easter Saturday", "1951-03-26": "Easter Monday", "1951-04-25": "ANZAC Day", - "1951-05-21": "Adelaide Cup Day", "1951-06-11": "King's Birthday", "1951-10-01": "Labor Day", "1951-12-25": "Christmas Day", @@ -27,7 +25,6 @@ "1952-04-12": "Easter Saturday", "1952-04-14": "Easter Monday", "1952-04-25": "ANZAC Day", - "1952-05-19": "Adelaide Cup Day", "1952-06-09": "Queen's Birthday", "1952-10-06": "Labor Day", "1952-12-25": "Christmas Day", @@ -38,7 +35,6 @@ "1953-04-04": "Easter Saturday", "1953-04-06": "Easter Monday", "1953-04-25": "ANZAC Day", - "1953-05-18": "Adelaide Cup Day", "1953-06-08": "Queen's Birthday", "1953-10-05": "Labor Day", "1953-12-25": "Christmas Day", @@ -50,7 +46,6 @@ "1954-04-19": "Easter Monday", "1954-04-25": "ANZAC Day", "1954-04-26": "ANZAC Day (observed)", - "1954-05-17": "Adelaide Cup Day", "1954-06-14": "Queen's Birthday", "1954-10-04": "Labor Day", "1954-12-25": "Christmas Day", @@ -61,7 +56,6 @@ "1955-04-09": "Easter Saturday", "1955-04-11": "Easter Monday", "1955-04-25": "ANZAC Day", - "1955-05-16": "Adelaide Cup Day", "1955-06-13": "Queen's Birthday", "1955-10-03": "Labor Day", "1955-12-25": "Christmas Day", @@ -72,7 +66,6 @@ "1956-03-31": "Easter Saturday", "1956-04-02": "Easter Monday", "1956-04-25": "ANZAC Day", - "1956-05-21": "Adelaide Cup Day", "1956-06-11": "Queen's Birthday", "1956-10-01": "Labor Day", "1956-12-25": "Christmas Day", @@ -83,7 +76,6 @@ "1957-04-20": "Easter Saturday", "1957-04-22": "Easter Monday", "1957-04-25": "ANZAC Day", - "1957-05-20": "Adelaide Cup Day", "1957-06-10": "Queen's Birthday", "1957-10-07": "Labor Day", "1957-12-25": "Christmas Day", @@ -94,7 +86,6 @@ "1958-04-05": "Easter Saturday", "1958-04-07": "Easter Monday", "1958-04-25": "ANZAC Day", - "1958-05-19": "Adelaide Cup Day", "1958-06-09": "Queen's Birthday", "1958-10-06": "Labor Day", "1958-12-25": "Christmas Day", @@ -105,7 +96,6 @@ "1959-03-28": "Easter Saturday", "1959-03-30": "Easter Monday", "1959-04-25": "ANZAC Day", - "1959-05-18": "Adelaide Cup Day", "1959-06-08": "Queen's Birthday", "1959-10-05": "Labor Day", "1959-12-25": "Christmas Day", @@ -116,7 +106,6 @@ "1960-04-16": "Easter Saturday", "1960-04-18": "Easter Monday", "1960-04-25": "ANZAC Day", - "1960-05-16": "Adelaide Cup Day", "1960-06-13": "Queen's Birthday", "1960-10-03": "Labor Day", "1960-12-25": "Christmas Day", @@ -127,7 +116,6 @@ "1961-04-01": "Easter Saturday", "1961-04-03": "Easter Monday", "1961-04-25": "ANZAC Day", - "1961-05-15": "Adelaide Cup Day", "1961-06-12": "Queen's Birthday", "1961-10-02": "Labor Day", "1961-12-25": "Christmas Day", @@ -138,7 +126,6 @@ "1962-04-21": "Easter Saturday", "1962-04-23": "Easter Monday", "1962-04-25": "ANZAC Day", - "1962-05-21": "Adelaide Cup Day", "1962-06-11": "Queen's Birthday", "1962-10-01": "Labor Day", "1962-12-25": "Christmas Day", @@ -149,7 +136,6 @@ "1963-04-13": "Easter Saturday", "1963-04-15": "Easter Monday", "1963-04-25": "ANZAC Day", - "1963-05-20": "Adelaide Cup Day", "1963-06-10": "Queen's Birthday", "1963-10-07": "Labor Day", "1963-12-25": "Christmas Day", @@ -160,7 +146,6 @@ "1964-03-28": "Easter Saturday", "1964-03-30": "Easter Monday", "1964-04-25": "ANZAC Day", - "1964-05-18": "Adelaide Cup Day", "1964-06-08": "Queen's Birthday", "1964-10-05": "Labor Day", "1964-12-25": "Christmas Day", @@ -172,7 +157,6 @@ "1965-04-19": "Easter Monday", "1965-04-25": "ANZAC Day", "1965-04-26": "ANZAC Day (observed)", - "1965-05-17": "Adelaide Cup Day", "1965-06-14": "Queen's Birthday", "1965-10-04": "Labor Day", "1965-12-25": "Christmas Day", @@ -183,7 +167,6 @@ "1966-04-09": "Easter Saturday", "1966-04-11": "Easter Monday", "1966-04-25": "ANZAC Day", - "1966-05-16": "Adelaide Cup Day", "1966-06-13": "Queen's Birthday", "1966-10-03": "Labor Day", "1966-12-25": "Christmas Day", @@ -194,7 +177,6 @@ "1967-03-25": "Easter Saturday", "1967-03-27": "Easter Monday", "1967-04-25": "ANZAC Day", - "1967-05-15": "Adelaide Cup Day", "1967-06-12": "Queen's Birthday", "1967-10-02": "Labor Day", "1967-12-25": "Christmas Day", @@ -205,7 +187,6 @@ "1968-04-13": "Easter Saturday", "1968-04-15": "Easter Monday", "1968-04-25": "ANZAC Day", - "1968-05-20": "Adelaide Cup Day", "1968-06-10": "Queen's Birthday", "1968-10-07": "Labor Day", "1968-12-25": "Christmas Day", @@ -216,7 +197,6 @@ "1969-04-05": "Easter Saturday", "1969-04-07": "Easter Monday", "1969-04-25": "ANZAC Day", - "1969-05-19": "Adelaide Cup Day", "1969-06-09": "Queen's Birthday", "1969-10-06": "Labor Day", "1969-12-25": "Christmas Day", @@ -227,7 +207,6 @@ "1970-03-28": "Easter Saturday", "1970-03-30": "Easter Monday", "1970-04-25": "ANZAC Day", - "1970-05-18": "Adelaide Cup Day", "1970-06-08": "Queen's Birthday", "1970-10-05": "Labor Day", "1970-12-25": "Christmas Day", @@ -239,7 +218,6 @@ "1971-04-12": "Easter Monday", "1971-04-25": "ANZAC Day", "1971-04-26": "ANZAC Day (observed)", - "1971-05-17": "Adelaide Cup Day", "1971-06-14": "Queen's Birthday", "1971-10-04": "Labor Day", "1971-12-25": "Christmas Day", @@ -250,7 +228,6 @@ "1972-04-01": "Easter Saturday", "1972-04-03": "Easter Monday", "1972-04-25": "ANZAC Day", - "1972-05-15": "Adelaide Cup Day", "1972-06-12": "Queen's Birthday", "1972-10-02": "Labor Day", "1972-12-25": "Christmas Day", diff --git a/tests/countries/test_australia.py b/tests/countries/test_australia.py index 545fd3efe..f7a3455f7 100644 --- a/tests/countries/test_australia.py +++ b/tests/countries/test_australia.py @@ -369,7 +369,8 @@ def test_adelaide_cup_day(self): "2024-03-11", ) self.assertHolidayName(name, sa_holidays, dt) - self.assertHolidayName(name, sa_holidays, range(1900, 2050)) + self.assertHolidayName(name, sa_holidays, range(1973, 2050)) + self.assertNoHolidayName(name, sa_holidays, range(1900, 1973)) for subdiv in set(Australia.subdivisions) - {"SA"}: self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) From b2e68379e42c36b2dfbb8bb8f95b47ada12c2051 Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:54:17 +0700 Subject: [PATCH 14/32] Update United States holidays: Alaska state holidays correction (#2083) Co-authored-by: ~Jhellico --- holidays/countries/united_states.py | 6 ++++-- tests/countries/test_united_states.py | 11 +++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/holidays/countries/united_states.py b/holidays/countries/united_states.py index afdfee5db..51bde89ad 100644 --- a/holidays/countries/united_states.py +++ b/holidays/countries/united_states.py @@ -246,7 +246,8 @@ def _populate_subdiv_holidays(self): def _populate_subdiv_ak_public_holidays(self): # Seward's Day - if self._year >= 1918: + # No observance in 1921: https://chroniclingamerica.loc.gov/lccn/sn86072239/1922-03-29/ed-1/seq-8/ + if self._year >= 1918 and self._year != 1921: name = "Seward's Day" if self._year >= 1955: self._add_holiday_last_mon_of_mar(name) @@ -260,7 +261,8 @@ def _populate_subdiv_ak_public_holidays(self): ) # Alaska Day - if self._year >= 1867: + # https://web.archive.org/web/20120502232826/http://www.alaskadispatch.com/article/happy-alaska-day-great-land + if self._year >= 1917: self._add_observed(self._add_holiday_oct_18("Alaska Day")) def _populate_subdiv_al_public_holidays(self): diff --git a/tests/countries/test_united_states.py b/tests/countries/test_united_states.py index 19a20c552..045bd9d70 100644 --- a/tests/countries/test_united_states.py +++ b/tests/countries/test_united_states.py @@ -916,9 +916,12 @@ def test_sewards_day(self): name = "Seward's Day" self.assertNoHolidayName(name) self.assertHolidayName( - name, self.state_hols["AK"], (f"{year}-03-30" for year in range(1918, 1955)) + name, + self.state_hols["AK"], + (f"{year}-03-30" for year in range(1918, 1921)), + (f"{year}-03-30" for year in range(1922, 1955)), ) - self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1918)) + self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1918), 1921) dt = ( "1955-03-28", "2010-03-29", @@ -1541,9 +1544,9 @@ def test_alaska_day(self): name = "Alaska Day" self.assertNoHolidayName(name) self.assertHolidayName( - name, self.state_hols["AK"], (f"{year}-10-18" for year in range(1867, 2050)) + name, self.state_hols["AK"], (f"{year}-10-18" for year in range(1917, 2050)) ) - self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1867)) + self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1917)) obs_dt = ( "2009-10-19", "2014-10-17", From 684d7b75d110a80eb62d07cf8f33daf9e3e017c5 Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Wed, 30 Oct 2024 00:33:06 +0700 Subject: [PATCH 15/32] Update Thailand holidays in 2025 (#2081) Co-authored-by: ~Jhellico --- holidays/countries/thailand.py | 41 +-- snapshots/countries/TH_COMMON.json | 8 + tests/calendars/test_thai.py | 64 ++++ tests/countries/test_thailand.py | 538 ++++++++++------------------- 4 files changed, 264 insertions(+), 387 deletions(-) diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index 9ccd2e07c..37c99f642 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -19,11 +19,11 @@ from holidays.observed_holiday_base import ( ObservedHolidayBase, SAT_TO_NEXT_MON, - SAT_TO_NEXT_TUE, - THU_FRI_TO_NEXT_MON, + THU_FRI_TO_NEXT_WORKDAY, SAT_SUN_TO_NEXT_MON, SAT_SUN_TO_NEXT_TUE, SAT_SUN_TO_NEXT_MON_TUE, + SAT_SUN_TO_NEXT_WORKDAY, ) @@ -39,6 +39,7 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC - https://resolution.soc.go.th/?prep_id=99159317 - https://resolution.soc.go.th/?prep_id=196007 - https://github.com/vacanza/holidays/pull/929 + - https://www.thairath.co.th/lifestyle/life/2812118 - [New Year's Day] `wikisource.org `_ - [National Children's Day] @@ -95,6 +96,7 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC https://dl.parliament.go.th/handle/20.500.13072/92816 https://e-manage.mju.ac.th/timeline_detail.aspx?key=MTk4 https://resolution.soc.go.th/PDF_UPLOAD/2510/932141.pdf + https://www.myhora.com/ปฏิทิน/วันพืชมงคล.aspx - [Royal Thai Armed Forces Day] ``_ - [Teacher's Day] @@ -115,7 +117,7 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC Applied Automatically for Workday if on Weekends: 2001-Present Limitations: - - This is only 100% accurate for 1997-2024; any future dates are up to the + - 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 @@ -129,8 +131,6 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC - Royal Ploughing Ceremony Day is date is announced on an annual basis by the Court Astrologers, thus need an annual update to the library here - - This doesn't cover Thai regional public holidays yet, only stubs added - Country created by: `arkid15r `__ Country maintained by: `PPsyrius `__ @@ -221,15 +221,16 @@ def _populate_public_holidays(self): # วันหยุดชดเชยวันสงกรานต์ # If Songkran happened to be held on the weekends, only one in-lieu - # public holiday is added, No in lieus for SUN-MON-TUE case. + # public holiday is added. # - CASE 1: THU-FRI-SAT -> 1 in-lieu on MON # - CASE 2: FRI-SAT-SUN -> 1 in-lieu on MON # - CASE 3: SAT-SUN-MON -> 1 in-lieu on TUE + # - CASE 4: SUN-MON-TUE -> 1 in-lieu on WED # See in lieu logic in `_add_observed(dt: date)`. # Status: In Use. if self._year >= 1995: - self._add_observed(dt, rule=THU_FRI_TO_NEXT_MON + SAT_TO_NEXT_TUE) + self._add_observed(dt, rule=THU_FRI_TO_NEXT_WORKDAY + SAT_SUN_TO_NEXT_WORKDAY) # วันแรงงานแห่งชาติ # Status: In-Use. @@ -433,17 +434,13 @@ def _populate_public_holidays(self): # Status: In-Use. # Makha Bucha. - makha_bucha_date = self._add_makha_bucha(tr("วันมาฆบูชา")) - if makha_bucha_date: - self._add_observed(makha_bucha_date) + self._add_observed(self._add_makha_bucha(tr("วันมาฆบูชา"))) # วันวิสาขบูชา # Status: In-Use. # Visakha Bucha. - visakha_bucha_date = self._add_visakha_bucha(tr("วันวิสาขบูชา")) - if visakha_bucha_date: - self._add_observed(visakha_bucha_date) + self._add_observed(self._add_visakha_bucha(tr("วันวิสาขบูชา"))) # วันอาสาฬหบูชา # Status: In-Use. @@ -452,9 +449,9 @@ def _populate_public_holidays(self): # - CASE 3: SUN-MON -> 1 in-lieu on TUE # Asarnha Bucha. - asarnha_bucha_date = self._add_asarnha_bucha(tr("วันอาสาฬหบูชา")) - if asarnha_bucha_date: - self._add_observed(asarnha_bucha_date, rule=SAT_SUN_TO_NEXT_MON_TUE) + self._add_observed( + self._add_asarnha_bucha(tr("วันอาสาฬหบูชา")), rule=SAT_SUN_TO_NEXT_MON_TUE + ) # วันเข้าพรรษา # Status: In-Use. @@ -463,9 +460,7 @@ def _populate_public_holidays(self): # - CASE 3: SUN-MON -> 1 in-lieu on TUE # Buddhist Lent Day. - khao_phansa_date = self._add_khao_phansa(tr("วันเข้าพรรษา")) - if khao_phansa_date: - self._add_observed(khao_phansa_date, rule=SAT_TO_NEXT_MON) + self._add_observed(self._add_khao_phansa(tr("วันเข้าพรรษา")), rule=SAT_TO_NEXT_MON) def _populate_armed_forces_holidays(self): # วันกองทัพไทย @@ -525,8 +520,9 @@ def _populate_government_holidays(self): # Is dated on an annual basis by the Royal Palace, always on weekdays. # For historic research, วันเกษตรแห่งชาติ (National Agricultural Day) also concides with # this from 1966 onwards. For earlier records the date was refered as วันแรกนาขวัญ. - # This isn't even fixed even by the Thai Lunar Calendar, but instead - # by Court Astrologers; All chosen dates are all in the first three weeks of May. + # 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. # *** NOTE: only observed by government sectors. # TODO: Update this annually around Dec of each year. @@ -597,8 +593,9 @@ def _populate_government_holidays(self): 2022: (MAY, 13), 2023: (MAY, 17), 2024: (MAY, 10), + 2025: (MAY, 9), } - if 1960 <= self._year <= 2024 and self._year != 1999: + if 1960 <= self._year <= 2025 and self._year != 1999: self._add_observed( # Royal Ploughing Ceremony. self._add_holiday(tr("วันพืชมงคล"), raeknakhwan_dates.get(self._year, (MAY, 13))) diff --git a/snapshots/countries/TH_COMMON.json b/snapshots/countries/TH_COMMON.json index 429cdc346..debc0c285 100644 --- a/snapshots/countries/TH_COMMON.json +++ b/snapshots/countries/TH_COMMON.json @@ -1287,6 +1287,7 @@ "2003-04-13": "Songkran Festival", "2003-04-14": "Songkran Festival", "2003-04-15": "Songkran Festival", + "2003-04-16": "Songkran Festival (in lieu)", "2003-05-01": "National Labor Day", "2003-05-05": "Coronation Day", "2003-05-08": "Royal Ploughing Ceremony", @@ -1463,6 +1464,7 @@ "2008-04-13": "Songkran Festival", "2008-04-14": "Songkran Festival", "2008-04-15": "Songkran Festival", + "2008-04-16": "Songkran Festival (in lieu)", "2008-05-01": "National Labor Day", "2008-05-05": "Coronation Day", "2008-05-09": "Royal Ploughing Ceremony", @@ -1677,6 +1679,7 @@ "2014-04-13": "Songkran Festival", "2014-04-14": "Songkran Festival", "2014-04-15": "Songkran Festival", + "2014-04-16": "Songkran Festival (in lieu)", "2014-05-01": "National Labor Day", "2014-05-05": "Coronation Day", "2014-05-09": "Royal Ploughing Ceremony", @@ -2087,9 +2090,11 @@ "2025-04-13": "Songkran Festival", "2025-04-14": "Songkran Festival", "2025-04-15": "Songkran Festival", + "2025-04-16": "Songkran Festival (in lieu)", "2025-05-01": "National Labor Day", "2025-05-04": "Coronation Day", "2025-05-05": "Coronation Day (in lieu)", + "2025-05-09": "Royal Ploughing Ceremony", "2025-05-11": "Visakha Bucha", "2025-05-12": "Visakha Bucha (in lieu)", "2025-06-03": "HM Queen Suthida's Birthday", @@ -2301,6 +2306,7 @@ "2031-04-13": "Songkran Festival", "2031-04-14": "Songkran Festival", "2031-04-15": "Songkran Festival", + "2031-04-16": "Songkran Festival (in lieu)", "2031-05-01": "National Labor Day", "2031-05-04": "Coronation Day", "2031-05-05": "Coronation Day (in lieu)", @@ -2480,6 +2486,7 @@ "2036-04-13": "Songkran Festival", "2036-04-14": "Songkran Festival", "2036-04-15": "Songkran Festival", + "2036-04-16": "Songkran Festival (in lieu)", "2036-05-01": "National Labor Day", "2036-05-04": "Coronation Day", "2036-05-05": "Coronation Day (in lieu)", @@ -2691,6 +2698,7 @@ "2042-04-13": "Songkran Festival", "2042-04-14": "Songkran Festival", "2042-04-15": "Songkran Festival", + "2042-04-16": "Songkran Festival (in lieu)", "2042-05-01": "National Labor Day", "2042-05-04": "Coronation Day", "2042-05-05": "Coronation Day (in lieu)", diff --git a/tests/calendars/test_thai.py b/tests/calendars/test_thai.py index c2a2a380b..af114fffa 100644 --- a/tests/calendars/test_thai.py +++ b/tests/calendars/test_thai.py @@ -31,10 +31,26 @@ def test_asarnha_bucha_date(self): asarnha_bucha_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2010: date(2010, JUL, 26), + 2011: date(2011, JUL, 15), + 2012: date(2012, AUG, 2), + 2013: date(2013, JUL, 22), + 2014: date(2014, JUL, 11), + 2015: date(2015, JUL, 30), + 2016: date(2016, JUL, 19), + 2017: date(2017, JUL, 8), + 2018: date(2018, JUL, 27), + 2019: date(2019, JUL, 16), + 2020: date(2020, JUL, 5), + 2021: date(2021, JUL, 24), 2022: date(2022, JUL, 13), 2023: date(2023, AUG, 1), 2024: date(2024, JUL, 20), 2025: date(2025, JUL, 10), + 2026: date(2026, JUL, 29), + 2027: date(2027, JUL, 18), + 2028: date(2028, JUL, 6), + 2029: date(2029, JUL, 25), 2030: date(2030, JUL, 14), 2040: date(2040, JUL, 23), 2050: date(2050, AUG, 2), @@ -148,10 +164,26 @@ def test_khao_phansa_date(self): khao_phansa_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2010: date(2010, JUL, 27), + 2011: date(2011, JUL, 16), + 2012: date(2012, AUG, 3), + 2013: date(2013, JUL, 23), + 2014: date(2014, JUL, 12), + 2015: date(2015, JUL, 31), + 2016: date(2016, JUL, 20), + 2017: date(2017, JUL, 9), + 2018: date(2018, JUL, 28), + 2019: date(2019, JUL, 17), + 2020: date(2020, JUL, 6), + 2021: date(2021, JUL, 25), 2022: date(2022, JUL, 14), 2023: date(2023, AUG, 2), 2024: date(2024, JUL, 21), 2025: date(2025, JUL, 11), + 2026: date(2026, JUL, 30), + 2027: date(2027, JUL, 19), + 2028: date(2028, JUL, 7), + 2029: date(2029, JUL, 26), 2030: date(2030, JUL, 15), 2040: date(2040, JUL, 24), 2050: date(2050, AUG, 3), @@ -205,10 +237,26 @@ def test_makha_bucha_date(self): makha_bucha_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2010: date(2010, FEB, 28), + 2011: date(2011, FEB, 18), + 2012: date(2012, MAR, 7), + 2013: date(2013, FEB, 25), + 2014: date(2014, FEB, 14), + 2015: date(2015, MAR, 4), + 2016: date(2016, FEB, 22), + 2017: date(2017, FEB, 11), + 2018: date(2018, MAR, 1), + 2019: date(2019, FEB, 19), + 2020: date(2020, FEB, 8), + 2021: date(2021, FEB, 26), 2022: date(2022, FEB, 16), 2023: date(2023, MAR, 6), 2024: date(2024, FEB, 24), 2025: date(2025, FEB, 12), + 2026: date(2026, MAR, 3), + 2027: date(2027, FEB, 21), + 2028: date(2028, FEB, 10), + 2029: date(2029, FEB, 27), 2030: date(2030, FEB, 17), 2040: date(2040, FEB, 26), 2050: date(2050, MAR, 7), @@ -303,10 +351,26 @@ def test_visakha_bucha_date(self): visakha_bucha_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2010: date(2010, MAY, 28), + 2011: date(2011, MAY, 17), + 2012: date(2012, JUN, 4), + 2013: date(2013, MAY, 24), + 2014: date(2014, MAY, 13), + 2015: date(2015, JUN, 1), + 2016: date(2016, MAY, 20), + 2017: date(2017, MAY, 10), + 2018: date(2018, MAY, 29), + 2019: date(2019, MAY, 18), + 2020: date(2020, MAY, 6), + 2021: date(2021, MAY, 26), 2022: date(2022, MAY, 15), 2023: date(2023, JUN, 3), 2024: date(2024, MAY, 22), 2025: date(2025, MAY, 11), + 2026: date(2026, MAY, 31), + 2027: date(2027, MAY, 20), + 2028: date(2028, MAY, 8), + 2029: date(2029, MAY, 27), 2030: date(2030, MAY, 16), 2040: date(2040, MAY, 25), 2050: date(2050, JUN, 4), diff --git a/tests/countries/test_thailand.py b/tests/countries/test_thailand.py index 1ed5df759..6a4ab287d 100644 --- a/tests/countries/test_thailand.py +++ b/tests/countries/test_thailand.py @@ -20,19 +20,17 @@ class TestThailand(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - support_range = list(range(1941, 2059)) + [2158] + support_range = range(1941, 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)) - self.assertNoHolidays(Thailand(years=1958, categories=ARMED_FORCES)) + self.assertNoHolidays(Thailand(years=1940, categories=(PUBLIC, WORKDAY))) self.assertNoHolidays(Thailand(years=1942, categories=BANK)) - self.assertNoHolidays(Thailand(years=1956, categories=GOVERNMENT)) - self.assertNoHolidays(Thailand(years=1956, categories=SCHOOL)) - self.assertNoHolidays(Thailand(years=1940, categories=WORKDAY)) + self.assertNoHolidays(Thailand(years=1956, categories=(GOVERNMENT, SCHOOL))) + self.assertNoHolidays(Thailand(years=1958, categories=ARMED_FORCES)) def test_special_holidays(self): dt = ( @@ -117,72 +115,9 @@ def test_special_holidays(self): self.assertHoliday(dt, dt_observed) self.assertNoNonObservedHoliday(dt_observed) - def test_2022_all(self): - self.assertHolidays( - Thailand(categories=(ARMED_FORCES, GOVERNMENT, PUBLIC, SCHOOL, WORKDAY), years=2022), - ("2022-01-01", "วันขึ้นปีใหม่"), - ("2022-01-03", "ชดเชยวันขึ้นปีใหม่"), - ("2022-01-08", "วันเด็กแห่งชาติ"), - ("2022-01-13", "วันการบินแห่งชาติ"), - ("2022-01-14", "วันอนุรักษ์ทรัพยากรป่าไม้ของชาติ"), - ("2022-01-16", "วันครู"), - ("2022-01-17", "วันพ่อขุนรามคำแหงมหาราช"), - ("2022-01-18", "วันกองทัพไทย"), - ("2022-02-03", "วันทหารผ่านศึก"), - ("2022-02-16", "วันมาฆบูชา"), - ("2022-02-26", "วันศิลปินแห่งชาติ"), - ("2022-03-08", "วันสตรีสากล"), - ("2022-04-06", "วันจักรี"), - ("2022-04-13", "วันสงกรานต์"), - ("2022-04-14", "วันสงกรานต์"), - ("2022-04-15", "วันสงกรานต์"), - ("2022-05-01", "วันแรงงานแห่งชาติ"), - ("2022-05-02", "ชดเชยวันแรงงานแห่งชาติ"), - ("2022-05-04", "วันฉัตรมงคล"), - ("2022-05-13", "วันพืชมงคล"), - ("2022-05-15", "วันวิสาขบูชา"), - ("2022-05-16", "ชดเชยวันวิสาขบูชา"), - ( - "2022-06-03", - "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสุทิดา พัชรสุธาพิมลลักษณ พระบรมราชินี", - ), - ("2022-07-13", "วันอาสาฬหบูชา"), - ("2022-07-14", "วันเข้าพรรษา"), - ("2022-07-15", "วันหยุดพิเศษ (เพิ่มเติม)"), - ( - "2022-07-28", - ( - "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรเมนทรรามาธิบดี" - "ศรีสินทรมหาวชิราลงกรณ พระวชิรเกล้าเจ้าอยู่หัว" - ), - ), - ("2022-07-29", "วันหยุดพิเศษ (เพิ่มเติม)"), - ("2022-08-12", "วันเฉลิมพระชนมพรรษาสมเด็จพระบรมราชชนนีพันปีหลวง; วันแม่แห่งชาติ"), - ("2022-08-18", "วันวิทยาศาสตร์แห่งชาติ"), - ("2022-09-28", "วันพระราชทานธงชาติไทย"), - ( - "2022-10-13", - "วันคล้ายวันสวรรคตพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร", - ), - ("2022-10-14", "วันหยุดพิเศษ (เพิ่มเติม)"), - ("2022-10-23", "วันปิยมหาราช"), - ("2022-10-24", "ชดเชยวันปิยมหาราช"), - ("2022-11-08", "วันลอยกระทง"), - ( - "2022-12-05", - ( - "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร " - "มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร; วันชาติ; วันพ่อแห่งชาติ" - ), - ), - ("2022-12-10", "วันรัฐธรรมนูญ"), - ("2022-12-12", "ชดเชยวันรัฐธรรมนูญ"), - ("2022-12-30", "วันหยุดพิเศษ (เพิ่มเติม)"), - ("2022-12-31", "วันสิ้นปี"), - ) - def test_new_years_day(self): - self.assertHoliday(f"{year}-01-01" for year in range(1941, 2058)) + name = "วันขึ้นปีใหม่" + self.assertHolidayName(name, (f"{year}-01-01" for year in range(1941, 2050))) self.assertNoNonObservedHoliday( "2011-01-03", @@ -195,7 +130,6 @@ def test_new_years_day(self): def test_national_childrens_day(self): name = "วันเด็กแห่งชาติ" - dt = ( # First Iteration "1955-10-03", @@ -218,10 +152,11 @@ def test_national_childrens_day(self): "2025-01-11", ) self.assertHolidayName(name, dt) - self.assertNoHolidayName(name, 1954, 1964) + self.assertNoHolidayName(name, range(1941, 1955), 1964) def test_chakri_memorial_day(self): - self.assertHoliday(f"{year}-04-06" for year in range(1941, 2058)) + name = "วันจักรี" + self.assertHolidayName(name, (f"{year}-04-06" for year in range(1941, 2050))) self.assertNoNonObservedHoliday( "2013-04-08", @@ -234,29 +169,29 @@ def test_chakri_memorial_day(self): def test_songkran_festival(self): name = "วันสงกรานต์" - - self.assertNoHolidayName(name, 1947) - for year in range(1948, 1954): - self.assertHoliday(f"{year}-04-13", f"{year}-04-14", f"{year}-04-15") - self.assertNoHolidayName(name, range(1954, 1957)) - self.assertHolidayName(name, (f"{year}-04-13" for year in range(1957, 1989))) + # 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")) + # APR 12-13-14 for year in range(1989, 1998): - self.assertHoliday(f"{year}-04-12", f"{year}-04-13", f"{year}-04-14") - for year in range(1998, 2020): - self.assertHoliday(f"{year}-04-13", f"{year}-04-14", f"{year}-04-15") - self.assertNoHoliday("2020-04-13", "2020-04-14", "2020-04-15") - for year in range(2021, 2058): - self.assertHoliday(f"{year}-04-13", f"{year}-04-14", f"{year}-04-15") + self.assertHolidayName(name, (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))) + # 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.assertNoNonObservedHoliday( "2012-04-16", "2013-04-16", + "2014-04-16", "2017-04-17", "2018-04-16", "2019-04-16", # 2020 Songkran Festival special in lieus doesn't counts "2023-04-17", "2024-04-16", + "2025-04-16", "2028-04-17", "2029-04-16", "2030-04-16", @@ -264,10 +199,8 @@ def test_songkran_festival(self): def test_national_labour_day(self): name = "วันแรงงานแห่งชาติ" - - self.assertNoHoliday("1973-05-01") - self.assertNoHolidayName(name, 1973) - self.assertHoliday(f"{year}-05-01" for year in range(1974, 2058)) + self.assertHolidayName(name, (f"{year}-05-01" for year in range(1974, 2050))) + self.assertNoHolidayName(name, range(1941, 1974)) self.assertNoNonObservedHoliday( "2010-05-03", @@ -280,12 +213,9 @@ def test_national_labour_day(self): def test_coronation_day(self): name = "วันฉัตรมงคล" - - self.assertNoHoliday("1957-05-05") - self.assertNoHolidayName(name, 1957) - self.assertHoliday(f"{year}-05-05" for year in range(1958, 2017)) - self.assertNoHolidayName(name, range(2017, 2020)) - self.assertHoliday(f"{year}-05-04" for year in range(2020, 2058)) + 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)) self.assertNoNonObservedHoliday( "2012-05-07", @@ -297,10 +227,8 @@ def test_coronation_day(self): def test_queen_suthida_birthday(self): name = "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสุทิดา พัชรสุธาพิมลลักษณ พระบรมราชินี" - - self.assertNoHoliday("2018-06-03") - self.assertNoHolidayName(name, 2018) - self.assertHoliday(f"{year}-06-03" for year in range(2019, 2058)) + self.assertHolidayName(name, (f"{year}-06-03" for year in range(2019, 2050))) + self.assertNoHolidayName(name, range(1941, 2019)) self.assertNoNonObservedHoliday( "2023-06-05", @@ -309,18 +237,17 @@ def test_queen_suthida_birthday(self): ) def test_national_day(self): - self.assertHoliday(f"{year}-06-24" for year in range(1941, 1960)) - self.assertHoliday(f"{year}-12-05" for year in range(1960, 2058)) + 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))) # No in lieus during its existense on June 24th # 1960+ In lieus are same as HM King Bhumibol Adulyadej's Birthday def test_rama_x_birthday(self): - name = "วันเฉลิมพระชนมพรรษา พระบาทสมเด็จพระเจ้าอยู่หัว" - - self.assertNoHoliday("2016-07-28") - self.assertNoHolidayName(name, 2016) - self.assertHoliday(f"{year}-07-28" for year in range(2017, 2058)) + name = "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรเมนทรรามาธิบดีศรีสินทรมหาวชิราลงกรณ พระวชิรเกล้าเจ้าอยู่หัว" + self.assertHolidayName(name, (f"{year}-07-28" for year in range(2017, 2050))) + self.assertNoHolidayName(name, range(1941, 2017)) self.assertNoNonObservedHoliday( "2018-07-30", @@ -333,13 +260,14 @@ def test_rama_x_birthday(self): def test_queen_sirikit_birthday(self): name_ix = "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถ" name_x = "วันเฉลิมพระชนมพรรษาสมเด็จพระบรมราชชนนีพันปีหลวง" + years_pre = range(1941, 1976) + years_ix = range(1976, 2017) + years_x = range(2017, 2050) - self.assertNoHoliday("1975-08-12") - self.assertNoHolidayName(name_ix, 1975) - self.assertHolidayName(name_ix, (f"{year}-08-12" for year in range(1976, 2017))) - self.assertNoHolidayName(name_x, range(1941, 2017)) - self.assertHolidayName(name_x, (f"{year}-08-12" for year in range(2017, 2058))) - self.assertNoHolidayName(name_ix, range(2017, 2058)) + self.assertHolidayName(name_ix, (f"{year}-08-12" for year in years_ix)) + self.assertHolidayName(name_x, (f"{year}-08-12" for year in years_x)) + self.assertNoHolidayName(name_ix, years_pre, years_x) + self.assertNoHolidayName(name_x, years_pre, years_ix) self.assertNoNonObservedHoliday( "2012-08-13", @@ -353,10 +281,9 @@ def test_queen_sirikit_birthday(self): def test_national_mothers_day(self): name = "วันแม่แห่งชาติ" - self.assertNoHolidayName(name, 1949) self.assertHolidayName(name, (f"{year}-04-15" for year in range(1950, 1958))) - self.assertNoHolidayName(name, range(1958, 1976)) - self.assertHolidayName(name, (f"{year}-08-12" for year in range(1976, 2058))) + self.assertHolidayName(name, (f"{year}-08-12" for year in range(1976, 2050))) + self.assertNoHolidayName(name, range(1941, 1950), range(1958, 1976)) # April 15 (1950-1958) exists prior to in lieu laws # In lieus are same as HM Queen Sirikit's Birthday @@ -365,16 +292,17 @@ def test_rama_ix_memorial_day(self): name_ix = "วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" name_x = "วันคล้ายวันสวรรคตพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" name_x_memorial = "วันนวมินทรมหาราช" - - self.assertNoHoliday("2016-10-13") - self.assertNoHolidayName(name_ix, 2016) - self.assertNoHolidayName(name_x, range(1941, 2019)) - self.assertNoHolidayName(name_x_memorial, range(1941, 2023)) - self.assertHolidayName(name_ix, (f"{year}-10-13" for year in range(2017, 2019))) - self.assertHolidayName(name_x, (f"{year}-10-13" for year in range(2019, 2023))) - self.assertHolidayName(name_x_memorial, (f"{year}-10-13" for year in range(2023, 2058))) - self.assertNoHolidayName(name_ix, range(2019, 2058)) - self.assertNoHolidayName(name_x, range(2023, 2058)) + years_pre = range(1941, 2017) + years_ix = range(2017, 2019) + years_x = range(2019, 2023) + years_x_memorial = range(2023, 2050) + + self.assertHolidayName(name_ix, (f"{year}-10-13" for year in years_ix)) + self.assertHolidayName(name_x, (f"{year}-10-13" for year in years_x)) + self.assertHolidayName(name_x_memorial, (f"{year}-10-13" for year in years_x_memorial)) + self.assertNoHolidayName(name_ix, years_pre, years_x, years_x_memorial) + self.assertNoHolidayName(name_x, years_pre, years_ix, years_x_memorial) + self.assertNoHolidayName(name_x_memorial, years_pre, years_ix, years_x) self.assertNoNonObservedHoliday( "2018-10-15", @@ -386,9 +314,7 @@ def test_rama_ix_memorial_day(self): def test_rama_five_memorial_day(self): name = "วันปิยมหาราช" - self.assertHoliday(f"{year}-10-23" for year in range(1941, 2058)) - self.assertNoHoliday("1910-10-23", "1940-10-23") - self.assertNoHolidayName(name, Thailand(years=[1910, 1940])) + self.assertHolidayName(name, (f"{year}-10-23" for year in range(1941, 2050))) self.assertNoNonObservedHoliday( "2010-10-25", @@ -405,16 +331,17 @@ def test_rama_ix_birthday(self): name_great = ( "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร" ) + years_pre = range(1941, 1960) + years_reign = range(1960, 2016) + years_dead = range(2016, 2019) + years_great = range(2019, 2050) - self.assertNoHoliday("1959-12-05") - self.assertNoHolidayName(name_reign, range(1941, 1960)) - self.assertNoHolidayName(name_dead, range(1941, 2016)) - self.assertNoHolidayName(name_great, range(1941, 2019)) - self.assertHolidayName(name_reign, (f"{year}-12-05" for year in range(1976, 2016))) - self.assertHolidayName(name_dead, (f"{year}-12-05" for year in range(2016, 2019))) - self.assertHolidayName(name_great, (f"{year}-12-05" for year in range(2019, 2058))) - self.assertNoHolidayName(name_reign, range(2016, 2058)) - self.assertNoHolidayName(name_dead, range(2019, 2058)) + 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) self.assertNoNonObservedHoliday( "2010-12-06", @@ -429,13 +356,14 @@ def test_national_fathers_day(self): name = "วันพ่อแห่งชาติ" # This concides with HM King Bhumibol Adulyadej's Birthday - self.assertNoHolidayName(name, 1979) - self.assertHolidayName(name, (f"{year}-12-05" for year in range(1980, 2058))) + self.assertHolidayName(name, (f"{year}-12-05" for year in range(1980, 2050))) + self.assertNoHolidayName(name, range(1941, 1980)) # In lieus are same as HM King Bhumibol Adulyadej's Birthday def test_constitution_day(self): - self.assertHoliday(f"{year}-12-10" for year in range(1941, 2058)) + name = "วันรัฐธรรมนูญ" + self.assertHolidayName(name, (f"{year}-12-10" for year in range(1941, 2050))) self.assertNoNonObservedHoliday( "2011-12-12", @@ -447,7 +375,8 @@ def test_constitution_day(self): ) def test_new_years_eve(self): - self.assertHoliday(f"{year}-12-31" for year in range(1941, 2058)) + name = "วันสิ้นปี" + self.assertHolidayName(name, (f"{year}-12-31" for year in range(1941, 2050))) self.assertNoNonObservedHoliday( "2012-01-03", @@ -457,150 +386,30 @@ def test_new_years_eve(self): "2029-01-02", ) - def test_makha_bucha(self): - name = "วันมาฆบูชา" - - dt = ( - "2010-02-28", - "2011-02-18", - "2012-03-07", - "2013-02-25", - "2014-02-14", - "2015-03-04", - "2016-02-22", - "2017-02-11", - "2018-03-01", - "2019-02-19", - "2020-02-08", - "2021-02-26", - "2022-02-16", - "2023-03-06", - "2024-02-24", - "2025-02-12", - "2026-03-03", - "2027-02-21", - "2028-02-10", - "2029-02-27", - "2030-02-17", - ) - self.assertHolidayName(name, dt) - self.assertNoHolidayName(name, 2158) - + def test_buddhist_holidays_in_lieu(self): self.assertNoNonObservedHoliday( + # Makha Bucha "2010-03-01", "2017-02-13", "2020-02-10", "2024-02-26", "2024-02-22", "2030-02-18", - ) - - def test_visakha_bucha(self): - name = "วันวิสาขบูชา" - - dt = ( - "2010-05-28", - "2011-05-17", - "2012-06-04", - "2013-05-24", - "2014-05-13", - "2015-06-01", - "2016-05-20", - "2017-05-10", - "2018-05-29", - "2019-05-18", - "2020-05-06", - "2021-05-26", - "2022-05-15", - "2023-06-03", - "2024-05-22", - "2025-05-11", - "2026-05-31", - "2027-05-20", - "2028-05-08", - "2029-05-27", - "2030-05-16", - ) - self.assertHolidayName(name, dt) - self.assertNoHolidayName(name, 2158) - - self.assertNoNonObservedHoliday( + # Visakha Bucha "2019-05-20", "2022-05-16", "2023-06-05", "2025-05-12", "2026-06-01", "2029-05-28", - ) - - def test_asarnha_bucha(self): - name = "วันอาสาฬหบูชา" - - dt = ( - "2010-07-26", - "2011-07-15", - "2012-08-02", - "2013-07-22", - "2014-07-11", - "2015-07-30", - "2016-07-19", - "2017-07-08", - "2018-07-27", - "2019-07-16", - "2020-07-05", - "2021-07-24", - "2022-07-13", - "2023-08-01", - "2024-07-20", - "2025-07-10", - "2026-07-29", - "2027-07-18", - "2028-07-06", - "2029-07-25", - "2030-07-14", - ) - self.assertHolidayName(name, dt) - self.assertNoHolidayName(name, 2158) - - self.assertNoNonObservedHoliday( + # Asarnha Bucha "2017-07-10", "2020-07-07", "2021-07-26", "2024-07-22", "2027-07-20", "2030-07-16", - ) - - def test_khao_phansa(self): - name = "วันเข้าพรรษา" - - dt = ( - "2010-07-27", - "2011-07-16", - "2012-08-03", - "2013-07-23", - "2014-07-12", - "2015-07-31", - "2016-07-20", - "2017-07-09", - "2018-07-28", - "2019-07-17", - "2020-07-06", - "2021-07-25", - "2022-07-14", - "2023-08-02", - "2024-07-21", - "2025-07-11", - "2026-07-30", - "2027-07-19", - "2028-07-07", - "2029-07-26", - "2030-07-15", - ) - self.assertHolidayName(name, dt) - self.assertNoHolidayName(name, 2158) - - self.assertNoNonObservedHoliday( + # Khao Phansa "2011-07-18", "2014-07-14", "2018-07-30", @@ -608,118 +417,117 @@ def test_khao_phansa(self): def test_raeknakhwan(self): name = "วันพืชมงคล" - self.assertHolidays( - Thailand(categories=GOVERNMENT, years=range(1960, 2024)), - ("1960-05-02", name), - ("1961-05-11", name), - ("1962-05-07", name), - ("1963-05-10", name), - ("1964-05-08", name), - ("1965-05-13", name), - ("1966-05-13", name), - ("1967-05-11", name), - ("1968-05-10", name), - ("1969-05-09", name), - ("1970-05-08", name), - ("1971-05-07", name), - ("1972-05-08", name), - ("1973-05-07", name), - ("1974-05-08", name), - ("1975-05-07", name), - ("1976-05-10", name), - ("1977-05-12", name), - ("1978-05-11", name), - ("1979-05-07", name), - ("1980-05-14", name), - ("1981-05-07", name), - ("1982-05-19", name), - ("1983-05-11", name), - ("1984-05-10", name), - ("1985-05-09", name), - ("1986-05-09", name), - ("1987-05-08", name), - ("1988-05-11", name), - ("1989-05-11", name), - ("1990-05-11", name), - ("1991-05-10", name), - ("1992-05-14", name), - ("1993-05-17", name), - ("1994-05-11", name), - ("1995-05-10", name), - ("1996-05-16", name), - ("1997-05-09", name), - ("1998-05-08", name), + dt = ( + "1960-05-02", + "1961-05-11", + "1962-05-07", + "1963-05-10", + "1964-05-08", + "1965-05-13", + "1966-05-13", + "1967-05-11", + "1968-05-10", + "1969-05-09", + "1970-05-08", + "1971-05-07", + "1972-05-08", + "1973-05-07", + "1974-05-08", + "1975-05-07", + "1976-05-10", + "1977-05-12", + "1978-05-11", + "1979-05-07", + "1980-05-14", + "1981-05-07", + "1982-05-19", + "1983-05-11", + "1984-05-10", + "1985-05-09", + "1986-05-09", + "1987-05-08", + "1988-05-11", + "1989-05-11", + "1990-05-11", + "1991-05-10", + "1992-05-14", + "1993-05-17", + "1994-05-11", + "1995-05-10", + "1996-05-16", + "1997-05-09", + "1998-05-08", # Not a holiday in 1999 date, was held on MAY, 14. - ("2000-05-15", name), - ("2001-05-16", name), - ("2002-05-09", name), - ("2003-05-08", name), - ("2004-05-07", name), - ("2005-05-11", name), - ("2006-05-11", name), - ("2007-05-10", name), - ("2008-05-09", name), - ("2009-05-11", name), - ("2010-05-13", name), - ("2011-05-13", name), - ("2012-05-09", name), - ("2013-05-13", name), - ("2014-05-09", name), - ("2015-05-13", name), - ("2016-05-09", name), - ("2017-05-12", name), - ("2018-05-14", name), - ("2019-05-09", name), - ("2020-05-11", name), - ("2021-05-10", name), - ("2022-05-13", name), - ("2023-05-17", name), - ("2024-05-10", name), - ) + "2000-05-15", + "2001-05-16", + "2002-05-09", + "2003-05-08", + "2004-05-07", + "2005-05-11", + "2006-05-11", + "2007-05-10", + "2008-05-09", + "2009-05-11", + "2010-05-13", + "2011-05-13", + "2012-05-09", + "2013-05-13", + "2014-05-09", + "2015-05-13", + "2016-05-09", + "2017-05-12", + "2018-05-14", + "2019-05-09", + "2020-05-11", + "2021-05-10", + "2022-05-13", + "2023-05-17", + "2024-05-10", + "2025-05-09", + ) + gov_holidays = Thailand(categories=GOVERNMENT, years=range(1959, 2026)) + self.assertHolidayName(name, gov_holidays, dt) + self.assertNoHolidayName(name, gov_holidays, 1959, 1999) + self.assertNoHolidayName(name) def test_armed_forces_holiday(self): name = "วันกองทัพไทย" - self.assertHolidays( - Thailand(categories=ARMED_FORCES, years=range(1958, 1960)), ("1959-04-08", 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)) ) - self.assertHolidays( - Thailand(categories=ARMED_FORCES, years=range(1979, 1981)), - ("1979-04-08", name), - ("1980-01-25", name), + self.assertHolidayName( + name, armed_forces_holidays, (f"{year}-01-25" for year in range(1980, 2007)) ) - self.assertHolidays( - Thailand(categories=ARMED_FORCES, years=range(2006, 2008)), - ("2006-01-25", name), - ("2007-01-18", name), + self.assertHolidayName( + name, armed_forces_holidays, (f"{year}-01-18" for year in range(2007, 2050)) ) + self.assertNoHolidayName(name, armed_forces_holidays, 1958) + self.assertNoHolidayName(name) def test_bank_holiday(self): - a_name = "วันหยุดเพิ่มเติมสำหรับการปิดบัญชีประจำปีของธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร" - m_name = "วันหยุดภาคครึ่งปีของสถาบันการเงินและสถาบันการเงินเฉพาะกิจ" - - # Start - self.assertHolidays( - Thailand(categories=BANK, years=range(1942, 1944)), - ("1943-04-01", a_name), - ("1943-07-01", m_name), + 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)) ) - # End - self.assertHolidays( - Thailand(categories=BANK, years=range(2017, 2023)), - ("2017-04-01", a_name), - ("2017-07-01", m_name), - ("2018-04-01", a_name), - ("2018-07-01", m_name), - ("2019-04-01", a_name), - ("2020-04-01", a_name), - ("2021-04-01", a_name), + self.assertHolidayName( + name_mid, bank_holidays, (f"{year}-07-01" for year in range(1943, 2019)) ) + self.assertNoHolidayName(name_agri, bank_holidays, 1942, range(2022, 2050)) + self.assertNoHolidayName(name_mid, bank_holidays, 1942, range(2019, 2050)) + self.assertNoHolidayName(name_agri) + self.assertNoHolidayName(name_mid) def test_school_holiday(self): - self.assertHolidays( - Thailand(categories=SCHOOL, years=range(1956, 1958)), - ("1957-01-16", "วันครู"), + 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)) ) + self.assertNoHolidayName(name, school_holidays, 1956) + self.assertNoHolidayName(name) def test_workday_1947(self): self.assertHolidays( From abcffe37d5e7e77dec9ff8cfa2cf6b63600a4ae3 Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Wed, 30 Oct 2024 00:41:07 +0700 Subject: [PATCH 16/32] Refactor Cambodia and Laos test cases (#2086) --- holidays/countries/cambodia.py | 12 +++--- tests/calendars/test_thai.py | 35 ++++++++++++++++- tests/countries/test_cambodia.py | 67 ++++++-------------------------- tests/countries/test_laos.py | 12 +++--- 4 files changed, 56 insertions(+), 70 deletions(-) diff --git a/holidays/countries/cambodia.py b/holidays/countries/cambodia.py index 2a1155854..f4152c52e 100644 --- a/holidays/countries/cambodia.py +++ b/holidays/countries/cambodia.py @@ -264,10 +264,9 @@ def _populate_public_holidays(self): # Pchum Ben Day pchum_ben = tr("ពិធីបុណ្យភ្ផុំបិណ្ឌ") pchum_ben_date = self._add_pchum_ben(pchum_ben) - if pchum_ben_date: - self._add_holiday(pchum_ben, _timedelta(pchum_ben_date, -1)) - if self._year >= 2017: - self._add_holiday(pchum_ben, _timedelta(pchum_ben_date, +1)) + self._add_holiday(pchum_ben, _timedelta(pchum_ben_date, -1)) + if self._year >= 2017: + self._add_holiday(pchum_ben, _timedelta(pchum_ben_date, +1)) # ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក # Status: In-Use. @@ -276,9 +275,8 @@ def _populate_public_holidays(self): # Water Festival bon_om_touk = tr("ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក") bon_om_touk_date = self._add_loy_krathong(bon_om_touk) - if bon_om_touk_date: - self._add_holiday(bon_om_touk, _timedelta(bon_om_touk_date, -1)) - self._add_holiday(bon_om_touk, _timedelta(bon_om_touk_date, +1)) + self._add_holiday(bon_om_touk, _timedelta(bon_om_touk_date, -1)) + self._add_holiday(bon_om_touk, _timedelta(bon_om_touk_date, +1)) class KH(Cambodia): diff --git a/tests/calendars/test_thai.py b/tests/calendars/test_thai.py index af114fffa..6bf6531dd 100644 --- a/tests/calendars/test_thai.py +++ b/tests/calendars/test_thai.py @@ -14,7 +14,7 @@ from datetime import date from holidays import calendars -from holidays.calendars.gregorian import FEB, MAR, MAY, JUN, JUL, AUG, SEP, OCT, NOV +from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV from holidays.calendars.thai import KHMER_CALENDAR @@ -208,6 +208,13 @@ def test_loy_krathong_date(self): loy_krathong_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2015: date(2015, NOV, 25), + 2016: date(2016, NOV, 14), + 2017: date(2017, NOV, 3), + 2018: date(2018, NOV, 22), + 2019: date(2019, NOV, 11), + 2020: date(2020, OCT, 31), + 2021: date(2021, NOV, 19), 2022: date(2022, NOV, 8), 2023: date(2023, NOV, 27), 2024: date(2024, NOV, 15), @@ -277,6 +284,11 @@ def test_makha_bucha_date(self): meak_bochea_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2015: date(2015, FEB, 3), + 2016: date(2016, FEB, 22), + 2017: date(2017, FEB, 11), + 2018: date(2018, JAN, 31), + 2019: date(2019, FEB, 19), 2022: date(2022, FEB, 16), 2023: date(2023, FEB, 5), 2024: date(2024, FEB, 24), @@ -320,6 +332,13 @@ def test_pchum_ben_date(self): pchum_ben_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2015: date(2015, OCT, 12), + 2016: date(2016, OCT, 1), + 2017: date(2017, SEP, 20), + 2018: date(2018, OCT, 9), + 2019: date(2019, SEP, 28), + 2020: date(2020, SEP, 17), + 2021: date(2021, OCT, 6), 2022: date(2022, SEP, 25), 2023: date(2023, OCT, 14), 2024: date(2024, OCT, 2), @@ -335,6 +354,13 @@ def test_preah_neangkoal_date(self): preah_neangkoal_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2015: date(2015, MAY, 6), + 2016: date(2016, MAY, 24), + 2017: date(2017, MAY, 14), + 2018: date(2018, MAY, 3), + 2019: date(2019, MAY, 22), + 2020: date(2020, MAY, 10), + 2021: date(2021, APR, 30), 2022: date(2022, MAY, 19), 2023: date(2023, MAY, 8), 2024: date(2024, MAY, 26), @@ -394,6 +420,13 @@ def test_visakha_bucha_date(self): visaka_bochea_year_date = { self.calendar.START_YEAR - 1: None, self.calendar.END_YEAR + 1: None, + 2015: date(2015, MAY, 2), + 2016: date(2016, MAY, 20), + 2017: date(2017, MAY, 10), + 2018: date(2018, APR, 29), + 2019: date(2019, MAY, 18), + 2020: date(2020, MAY, 6), + 2021: date(2021, APR, 26), 2022: date(2022, MAY, 15), 2023: date(2023, MAY, 4), 2024: date(2024, MAY, 22), diff --git a/tests/countries/test_cambodia.py b/tests/countries/test_cambodia.py index deee1ee7f..9160fecc8 100644 --- a/tests/countries/test_cambodia.py +++ b/tests/countries/test_cambodia.py @@ -19,7 +19,7 @@ class TestCambodia(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - super().setUpClass(Cambodia, years=list(range(1993, 2059)) + [2158]) + super().setUpClass(Cambodia, years=range(1993, 2050)) def test_country_aliases(self): self.assertAliases(Cambodia, KH, KHM) @@ -136,11 +136,11 @@ def test_2023(self): def test_day_of_victory_over_genocidal_regime(self): self.assertHolidayName( - "ទិវាជ័យជម្នះលើរបបប្រល័យពូជសាសន៍", (f"{year}-01-07" for year in range(1993, 2058)) + "ទិវាជ័យជម្នះលើរបបប្រល័យពូជសាសន៍", (f"{year}-01-07" for year in range(1993, 2050)) ) def test_sangkranta(self): - sangkranta_years_apr14 = { + years_sangkranta_apr14 = { 2017, 2018, 2021, @@ -153,8 +153,8 @@ def test_sangkranta(self): 2030, 2031, } - for year in set(range(1993, 2058)).difference({2020}): - if year in sangkranta_years_apr14: + for year in set(range(1993, 2050)).difference({2020}): + if year in years_sangkranta_apr14: self.assertHoliday(f"{year}-04-14", f"{year}-04-15", f"{year}-04-16") else: self.assertHoliday(f"{year}-04-13", f"{year}-04-14", f"{year}-04-15") @@ -163,7 +163,7 @@ def test_king_sihamoni_birthday(self): name = "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម ព្រះករុណា ព្រះបាទសម្តេចព្រះបរមនាថ នរោត្តម សីហមុនី" self.assertNoHolidayName(name, 2004) self.assertHolidayName(name, (f"{year}-05-13" for year in range(2005, 2020))) - self.assertHolidayName(name, (f"{year}-05-14" for year in range(2005, 2058))) + self.assertHolidayName(name, (f"{year}-05-14" for year in range(2005, 2050))) self.assertHolidayName(name, (f"{year}-05-15" for year in range(2005, 2020))) def test_national_day_of_remembrance(self): @@ -180,11 +180,11 @@ def test_international_children_day(self): def test_queen_mother_monineath_birthday(self): name = "ព្រះរាជពិធីបុណ្យចម្រើនព្រះជន្ម សម្តេចព្រះមហាក្សត្រី ព្រះវររាជមាតា នរោត្តម មុនិនាថ សីហនុ" self.assertNoHolidayName(name, 1993) - self.assertHolidayName(name, (f"{year}-06-18" for year in range(1994, 2058))) + self.assertHolidayName(name, (f"{year}-06-18" for year in range(1994, 2050))) def test_constitution_day(self): self.assertHolidayName( - "ទិវាប្រកាសរដ្ឋធម្មនុញ្ញ", (f"{year}-09-24" for year in range(1993, 2058)) + "ទិវាប្រកាសរដ្ឋធម្មនុញ្ញ", (f"{year}-09-24" for year in range(1993, 2050)) ) def test_king_sihanouk_memorial_day(self): @@ -194,7 +194,7 @@ def test_king_sihanouk_memorial_day(self): " និងឯកភាពជាតិខ្មែរ ព្រះបរមរតនកោដ្ឋ" ) self.assertNoHolidayName(name, 2011) - self.assertHolidayName(name, (f"{year}-10-15" for year in range(2012, 2058))) + self.assertHolidayName(name, (f"{year}-10-15" for year in range(2012, 2050))) def test_paris_peace_agreement_day(self): name = "ទិវារំលឹកសន្ធិសញ្ញាសន្តិភាពទីក្រុងប៉ារីស" @@ -208,60 +208,16 @@ def test_king_sihamoni_coronation_day(self): "ព្រះមហាក្សត្រនៃព្រះរាជាណាចក្រកម្ពុជា" ) self.assertNoHolidayName(name, 2003) - self.assertHolidayName(name, (f"{year}-10-29" for year in range(2004, 2058))) + self.assertHolidayName(name, (f"{year}-10-29" for year in range(2004, 2050))) def test_national_independence_day(self): - self.assertHolidayName("ពិធីបុណ្យឯករាជ្យជាតិ", (f"{year}-11-09" for year in range(1993, 2058))) + self.assertHolidayName("ពិធីបុណ្យឯករាជ្យជាតិ", (f"{year}-11-09" for year in range(1993, 2050))) def test_international_human_rights_day(self): name = "ទិវាសិទ្ធិមនុស្សអន្តរជាតិ" self.assertHolidayName(name, (f"{year}-12-10" for year in range(1993, 2020))) self.assertNoHolidayName(name, 2020) - def test_meak_bochea(self): - name = "ពិធីបុណ្យមាឃបូជា" - self.assertHolidayName( - name, - "2015-02-03", - "2016-02-22", - "2017-02-11", - "2018-01-31", - "2019-02-19", - ) - self.assertNoHolidayName(name, 2158) - - def test_visaka_bochea(self): - name = "ពិធីបុណ្យវិសាខបូជា" - self.assertHolidayName( - name, - "2015-05-02", - "2016-05-20", - "2017-05-10", - "2018-04-29", - "2019-05-18", - "2020-05-06", - "2021-04-26", - "2022-05-15", - "2023-05-04", - ) - self.assertNoHolidayName(name, 2158) - - def test_preah_neangkoal(self): - name = "ព្រះរាជពិធីច្រត់ព្រះនង្គ័ល" - self.assertHolidayName( - name, - "2015-05-06", - "2016-05-24", - "2017-05-14", - "2018-05-03", - "2019-05-22", - "2020-05-10", - "2021-04-30", - "2022-05-19", - "2023-05-08", - ) - self.assertNoHolidayName(name, 2158) - def test_pchum_ben(self): name = "ពិធីបុណ្យភ្ផុំបិណ្ឌ" self.assertHolidayName( @@ -294,7 +250,6 @@ def test_pchum_ben(self): "2023-10-14", "2023-10-15", ) - self.assertNoHolidayName(name, 2158) def test_bon_om_touk(self): name = "ព្រះរាជពិធីបុណ្យអុំទូក បណ្តែតប្រទីប និងសំពះព្រះខែអកអំបុក" diff --git a/tests/countries/test_laos.py b/tests/countries/test_laos.py index a1031f984..1c931bb33 100644 --- a/tests/countries/test_laos.py +++ b/tests/countries/test_laos.py @@ -20,7 +20,7 @@ class TestLaos(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - super().setUpClass(Laos, years=range(1976, 2058), years_non_observed=range(2018, 2058)) + super().setUpClass(Laos, years=range(1976, 2050), years_non_observed=range(2018, 2050)) def test_country_aliases(self): self.assertAliases(Laos, LA, LAO) @@ -92,7 +92,7 @@ def test_2023_public_holiday(self): ) def test_new_years_day(self): - self.assertHoliday(f"{year}-01-01" for year in range(1976, 2058)) + self.assertHoliday(f"{year}-01-01" for year in range(1976, 2050)) self.assertNoNonObservedHoliday( "2012-01-02", @@ -102,7 +102,7 @@ def test_new_years_day(self): ) def test_international_women_rights_day(self): - self.assertHoliday(f"{year}-03-08" for year in range(1976, 2058)) + self.assertHoliday(f"{year}-03-08" for year in range(1976, 2050)) self.assertNoNonObservedHoliday( "2015-03-09", @@ -112,7 +112,7 @@ def test_international_women_rights_day(self): def test_laos_new_year_day(self): songkran_years_apr_13_15 = {2012, 2017} songkran_years_apr_13_16 = {2016, 2020, 2024} - for year in range(1976, 2058): + for year in range(1976, 2050): if year in songkran_years_apr_13_15: self.assertHoliday(f"{year}-04-13", f"{year}-04-14", f"{year}-04-15") elif year in songkran_years_apr_13_16: @@ -142,7 +142,7 @@ def test_laos_new_year_day(self): ) def test_labor_day(self): - self.assertHoliday(f"{year}-05-01" for year in range(1976, 2058)) + self.assertHoliday(f"{year}-05-01" for year in range(1976, 2050)) self.assertNoNonObservedHoliday( "2016-05-02", @@ -154,7 +154,7 @@ def test_international_children_day_public(self): self.assertHoliday(f"{year}-06-01" for year in range(1990, 2018)) def test_lao_national_day(self): - self.assertHoliday(f"{year}-12-02" for year in range(1976, 2058)) + self.assertHoliday(f"{year}-12-02" for year in range(1976, 2050)) self.assertNoNonObservedHoliday( "2012-12-03", From a484f9a0a0a1ad13f3ec6c5cd2dd68990faf09b3 Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Tue, 29 Oct 2024 20:33:28 +0200 Subject: [PATCH 17/32] Refactor United States tests (#2087) --- tests/countries/test_united_states.py | 467 ++++++++++++-------------- 1 file changed, 217 insertions(+), 250 deletions(-) diff --git a/tests/countries/test_united_states.py b/tests/countries/test_united_states.py index 045bd9d70..4cd8e3610 100644 --- a/tests/countries/test_united_states.py +++ b/tests/countries/test_united_states.py @@ -20,13 +20,13 @@ class TestUnitedStates(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - super().setUpClass( - UnitedStates, years=range(1865, 2050), years_non_observed=range(2000, 2024) - ) + years = range(1865, 2050) + super().setUpClass(UnitedStates, years=years, years_non_observed=range(2000, 2024)) cls.state_hols = { - subdiv: UnitedStates(subdiv=subdiv, years=range(1865, 2050)) + subdiv: UnitedStates(subdiv=subdiv, years=years) for subdiv in UnitedStates.subdivisions } + cls.unofficial_hols = UnitedStates(categories=UNOFFICIAL, years=years) def test_country_aliases(self): self.assertAliases(UnitedStates, US, USA) @@ -131,8 +131,9 @@ def test_veterans_day(self): name_1 = "Armistice Day" name_2 = "Veterans Day" self.assertHolidayName(name_1, (f"{year}-11-11" for year in range(1938, 1954))) - self.assertHolidayName(name_2, (f"{year}-11-11" for year in range(1954, 1971))) - self.assertHolidayName(name_2, (f"{year}-11-11" for year in range(1978, 2050))) + self.assertHolidayName( + name_2, (f"{year}-11-11" for year in (*range(1954, 1971), *range(1978, 2050))) + ) self.assertNoHolidayName(name_1, range(1865, 1938), range(1954, 2050)) self.assertNoHolidayName(name_2, range(1865, 1954)) self.assertHolidayName( @@ -536,6 +537,7 @@ def test_columbus_day_states(self): def test_columbus_day_al(self): name_1 = "Columbus Day / Fraternal Day" name_2 = "Columbus Day / American Indian Heritage Day / Fraternal Day" + al_holidays = self.state_hols["AL"] dt = ( "2010-10-11", "2011-10-10", @@ -552,13 +554,14 @@ def test_columbus_day_al(self): "2022-10-10", "2023-10-09", ) - self.assertNoHolidayName(name_1, self.state_hols["AL"], range(1865, 1970)) - self.assertHolidayName(name_1, self.state_hols["AL"], range(1971, 2000)) - self.assertHolidayName(name_2, self.state_hols["AL"], range(2000, 2050)) - self.assertHoliday(self.state_hols["AL"], dt) + self.assertNoHolidayName(name_1, al_holidays, range(1865, 1970)) + self.assertHolidayName(name_1, al_holidays, range(1971, 2000)) + self.assertHolidayName(name_2, al_holidays, range(2000, 2050)) + self.assertHoliday(al_holidays, dt) def test_columbus_day_ca(self): name = "Columbus Day" + ca_holidays = self.state_hols["CA"] dt = ( "1990-10-08", "1995-10-09", @@ -572,14 +575,14 @@ def test_columbus_day_ca(self): "2007-10-08", "2008-10-13", ) - self.assertNoHolidayName(name, self.state_hols["CA"], range(1865, 1970)) - self.assertNoHolidayName(name, self.state_hols["CA"], range(2009, 2050)) - self.assertHolidayName(name, self.state_hols["CA"], range(1971, 2009)) - self.assertHoliday(self.state_hols["CA"], dt) + self.assertNoHolidayName(name, ca_holidays, range(1865, 1970), range(2009, 2050)) + self.assertHolidayName(name, ca_holidays, range(1971, 2009)) + self.assertHoliday(ca_holidays, dt) def test_columbus_day_ri(self): name_1 = "Columbus Day" name_2 = "Indigenous Peoples' Day / Columbus Day" + ri_holidays = self.state_hols["RI"] dt = ( "2010-10-11", "2011-10-10", @@ -596,14 +599,15 @@ def test_columbus_day_ri(self): "2022-10-10", "2023-10-09", ) - self.assertNoHolidayName(name_1, self.state_hols["RI"], range(1865, 1970)) - self.assertHolidayName(name_1, self.state_hols["RI"], range(1971, 2022)) - self.assertHolidayName(name_2, self.state_hols["RI"], range(2022, 2050)) - self.assertHoliday(self.state_hols["RI"], dt) + self.assertNoHolidayName(name_1, ri_holidays, range(1865, 1970)) + self.assertHolidayName(name_1, ri_holidays, range(1971, 2022)) + self.assertHolidayName(name_2, ri_holidays, range(2022, 2050)) + self.assertHoliday(ri_holidays, dt) def test_columbus_day_sd(self): name_1 = "Columbus Day" name_2 = "Native Americans' Day" + sd_holidays = self.state_hols["SD"] dt = ( "2010-10-11", "2011-10-10", @@ -620,10 +624,10 @@ def test_columbus_day_sd(self): "2022-10-10", "2023-10-09", ) - self.assertNoHolidayName(name_1, self.state_hols["SD"], range(1865, 1937)) - self.assertHolidayName(name_1, self.state_hols["SD"], range(1937, 1990)) - self.assertHolidayName(name_2, self.state_hols["SD"], range(1990, 2050)) - self.assertHolidayName(name_2, self.state_hols["SD"], dt) + self.assertNoHolidayName(name_1, sd_holidays, range(1865, 1937)) + self.assertHolidayName(name_1, sd_holidays, range(1937, 1990)) + self.assertHolidayName(name_2, sd_holidays, range(1990, 2050)) + self.assertHolidayName(name_2, sd_holidays, dt) def test_epiphany(self): name = "Epiphany" @@ -642,10 +646,9 @@ def test_three_kings_day(self): def test_lee_jackson_day(self): name = "Lee Jackson Day" self.assertNoHolidayName(name) - self.assertNoHolidayName(name, self.state_hols["VA"], range(1865, 1889), range(2021, 2050)) - self.assertHolidayName( - name, self.state_hols["VA"], (f"{year}-01-19" for year in range(1889, 1983)) - ) + va_holidays = self.state_hols["VA"] + self.assertNoHolidayName(name, va_holidays, range(1865, 1889), range(2021, 2050)) + self.assertHolidayName(name, va_holidays, (f"{year}-01-19" for year in range(1889, 1983))) dt = ( "1983-01-17", "1990-01-15", @@ -664,7 +667,7 @@ def test_lee_jackson_day(self): "2019-01-18", "2020-01-17", ) - self.assertHolidayName(name, self.state_hols["VA"], dt) + self.assertHolidayName(name, va_holidays, dt) def test_inauguration_day(self): name = "Inauguration Day" @@ -718,10 +721,9 @@ def test_lincolns_birthday(self): "2005-02-11", "2006-02-13", ) - self.assertHolidayName( - name, self.state_hols["CA"], (f"{year}-02-12" for year in range(1971, 2010)) - ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["CA"], obs_dt) + ca_holidays = self.state_hols["CA"] + self.assertHolidayName(name, ca_holidays, (f"{year}-02-12" for year in range(1971, 2010))) + self.assertHolidayName(f"{name} (observed)", ca_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="CA", observed=False), obs_dt ) @@ -729,21 +731,18 @@ def test_lincolns_birthday(self): def test_susan_b_anthony_day(self): name = "Susan B. Anthony Day" self.assertNoHolidayName(name) - subdiv_start_years = { - "CA": 2014, - "FL": 2011, - "NY": 2004, - "WI": 1976, - } - for subdiv in subdiv_start_years: + for subdiv, start_year in ( + ("CA", 2014), + ("FL", 2011), + ("NY", 2004), + ("WI", 1976), + ): self.assertHolidayName( name, self.state_hols[subdiv], - (f"{year}-02-15" for year in range(subdiv_start_years[subdiv], 2050)), - ) - self.assertNoHolidayName( - name, self.state_hols[subdiv], range(1865, subdiv_start_years[subdiv]) + (f"{year}-02-15" for year in range(start_year, 2050)), ) + self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, start_year)) def test_mardi_gras(self): name = "Mardi Gras" @@ -770,6 +769,7 @@ def test_mardi_gras(self): def test_guam_discovery_day(self): name = "Guam Discovery Day" self.assertNoHolidayName(name) + gu_holidays = self.state_hols["GU"] dt = ( "2010-03-01", "2011-03-07", @@ -786,12 +786,13 @@ def test_guam_discovery_day(self): "2022-03-07", "2023-03-06", ) - self.assertHolidayName(name, self.state_hols["GU"], dt) - self.assertNoHolidayName(name, self.state_hols["GU"], range(1865, 1970)) + self.assertHolidayName(name, gu_holidays, dt) + self.assertNoHolidayName(name, gu_holidays, range(1865, 1970)) def test_casimir_pulaski_day(self): name = "Casimir Pulaski Day" self.assertNoHolidayName(name) + il_holidays = self.state_hols["IL"] dt = ( "2010-03-01", "2011-03-07", @@ -808,16 +809,15 @@ def test_casimir_pulaski_day(self): "2022-03-07", "2023-03-06", ) - self.assertHolidayName(name, self.state_hols["IL"], dt) - self.assertNoHolidayName(name, self.state_hols["IL"], range(1865, 1978)) + self.assertHolidayName(name, il_holidays, dt) + self.assertNoHolidayName(name, il_holidays, range(1865, 1978)) def test_texas_independence_day(self): name = "Texas Independence Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["TX"], (f"{year}-03-02" for year in range(1874, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["TX"], range(1865, 1874)) + tx_holidays = self.state_hols["TX"] + self.assertHolidayName(name, tx_holidays, (f"{year}-03-02" for year in range(1874, 2050))) + self.assertNoHolidayName(name, tx_holidays, range(1865, 1874)) def test_town_meeting_day(self): name = "Town Meeting Day" @@ -844,17 +844,16 @@ def test_town_meeting_day(self): def test_evacuation_day(self): name = "Evacuation Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["MA"], (f"{year}-03-17" for year in range(1901, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["MA"], range(1865, 1901)) + ma_holidays = self.state_hols["MA"] + self.assertHolidayName(name, ma_holidays, (f"{year}-03-17" for year in range(1901, 2050))) + self.assertNoHolidayName(name, ma_holidays, range(1865, 1901)) obs_dt = ( "2012-03-19", "2013-03-18", "2018-03-19", "2019-03-18", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["MA"], obs_dt) + self.assertHolidayName(f"{name} (observed)", ma_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="MA", observed=False), obs_dt ) @@ -862,16 +861,15 @@ def test_evacuation_day(self): def test_emancipation_day_in_puerto_rico(self): name = "Emancipation Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["PR"], (f"{year}-03-22" for year in range(1865, 2050)) - ) + pr_holidays = self.state_hols["PR"] + self.assertHolidayName(name, pr_holidays, (f"{year}-03-22" for year in range(1865, 2050))) obs_dt = ( "1998-03-23", "2009-03-23", "2015-03-23", "2020-03-23", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["PR"], obs_dt) + self.assertHolidayName(f"{name} (observed)", pr_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="PR", observed=False), obs_dt ) @@ -879,16 +877,15 @@ def test_emancipation_day_in_puerto_rico(self): def test_commonwealth_covenant_day(self): name = "Commonwealth Covenant Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["MP"], (f"{year}-03-24" for year in range(1865, 2050)) - ) + mp_holidays = self.state_hols["MP"] + self.assertHolidayName(name, mp_holidays, (f"{year}-03-24" for year in range(1865, 2050))) obs_dt = ( "2012-03-23", "2013-03-25", "2018-03-23", "2019-03-25", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["MP"], obs_dt) + self.assertHolidayName(f"{name} (observed)", mp_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="MP", observed=False), obs_dt ) @@ -896,10 +893,9 @@ def test_commonwealth_covenant_day(self): def test_prince_jonah_kuhio_kalanianaole_day(self): name = "Prince Jonah Kuhio Kalanianaole Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["HI"], (f"{year}-03-26" for year in range(1949, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["HI"], range(1865, 1949)) + hi_holidays = self.state_hols["HI"] + self.assertHolidayName(name, hi_holidays, (f"{year}-03-26" for year in range(1949, 2050))) + self.assertNoHolidayName(name, hi_holidays, range(1865, 1949)) obs_dt = ( "2011-03-25", "2016-03-25", @@ -907,7 +903,7 @@ def test_prince_jonah_kuhio_kalanianaole_day(self): "2022-03-25", "2023-03-27", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["HI"], obs_dt) + self.assertHolidayName(f"{name} (observed)", hi_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="HI", observed=False), obs_dt ) @@ -915,13 +911,13 @@ def test_prince_jonah_kuhio_kalanianaole_day(self): def test_sewards_day(self): name = "Seward's Day" self.assertNoHolidayName(name) + ak_holidays = self.state_hols["AK"] self.assertHolidayName( name, - self.state_hols["AK"], - (f"{year}-03-30" for year in range(1918, 1921)), - (f"{year}-03-30" for year in range(1922, 1955)), + ak_holidays, + (f"{year}-03-30" for year in (*range(1918, 1921), *range(1922, 1955))), ) - self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1918), 1921) + self.assertNoHolidayName(name, ak_holidays, range(1865, 1918), 1921) dt = ( "1955-03-28", "2010-03-29", @@ -939,15 +935,23 @@ def test_sewards_day(self): "2022-03-28", "2023-03-27", ) - self.assertHolidayName(name, self.state_hols["AK"], dt) + self.assertHolidayName(name, ak_holidays, dt) def test_cesar_chavez_day(self): name = "Cesar Chavez Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["CA"], (f"{year}-03-31" for year in range(1995, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["CA"], range(1865, 1995)) + for subdiv, start_year in ( + ("CA", 1995), + ("CO", 2001), + ("TX", 2000), + ): + self.assertHolidayName( + name, + self.state_hols[subdiv], + (f"{year}-03-31" for year in range(start_year, 2050)), + ) + self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, start_year)) + obs_dt = ( "1996-04-01", "2002-04-01", @@ -958,14 +962,6 @@ def test_cesar_chavez_day(self): self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="CA", observed=False), obs_dt ) - self.assertHolidayName( - name, self.state_hols["CO"], (f"{year}-03-31" for year in range(2001, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["CO"], range(1865, 2001)) - self.assertHolidayName( - name, self.state_hols["TX"], (f"{year}-03-31" for year in range(2000, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["TX"], range(1865, 2000)) def test_transfer_day(self): name = "Transfer Day" @@ -977,10 +973,9 @@ def test_transfer_day(self): def test_emancipation_day(self): name = "Emancipation Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["DC"], (f"{year}-04-16" for year in range(2005, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["DC"], range(1865, 2005)) + dc_holidays = self.state_hols["DC"] + self.assertHolidayName(name, dc_holidays, (f"{year}-04-16" for year in range(2005, 2050))) + self.assertNoHolidayName(name, dc_holidays, range(1865, 2005)) obs_dt = ( "2011-04-15", "2016-04-15", @@ -988,7 +983,7 @@ def test_emancipation_day(self): "2022-04-15", "2023-04-17", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["DC"], obs_dt) + self.assertHolidayName(f"{name} (observed)", dc_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="DC", observed=False), obs_dt ) @@ -996,10 +991,9 @@ def test_emancipation_day(self): def test_american_samoa_flag_day(self): name = "American Samoa Flag Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["AS"], (f"{year}-04-17" for year in range(1901, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["AS"], range(1865, 1901)) + as_holidays = self.state_hols["AS"] + self.assertHolidayName(name, as_holidays, (f"{year}-04-17" for year in range(1901, 2050))) + self.assertNoHolidayName(name, as_holidays, range(1865, 1901)) obs_dt = ( "2004-04-16", "2005-04-18", @@ -1009,7 +1003,7 @@ def test_american_samoa_flag_day(self): "2021-04-16", "2022-04-18", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["AS"], obs_dt) + self.assertHolidayName(f"{name} (observed)", as_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="AS", observed=False), obs_dt ) @@ -1044,7 +1038,8 @@ def test_patriots_day(self): def test_holy_thursday(self): name = "Holy Thursday" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["VI"], range(1865, 2050)) + vi_holidays = self.state_hols["VI"] + self.assertHolidayName(name, vi_holidays, range(1865, 2050)) dt = ( "2010-04-01", "2011-04-21", @@ -1061,7 +1056,7 @@ def test_holy_thursday(self): "2022-04-14", "2023-04-06", ) - self.assertHolidayName(name, self.state_hols["VI"], dt) + self.assertHolidayName(name, vi_holidays, dt) def test_good_friday(self): name = "Good Friday" @@ -1103,7 +1098,8 @@ def test_good_friday(self): def test_easter_monday(self): name = "Easter Monday" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["VI"], range(1865, 2050)) + vi_holidays = self.state_hols["VI"] + self.assertHolidayName(name, vi_holidays, range(1865, 2050)) dt = ( "2010-04-05", "2011-04-25", @@ -1120,7 +1116,7 @@ def test_easter_monday(self): "2022-04-18", "2023-04-10", ) - self.assertHolidayName(name, self.state_hols["VI"], dt) + self.assertHolidayName(name, vi_holidays, dt) def test_confederate_memorial_day(self): name = "Confederate Memorial Day" @@ -1146,9 +1142,10 @@ def test_confederate_memorial_day(self): self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, 1866)) self.assertHolidayName(name, self.state_hols[subdiv], dt) + ms_holidays = self.state_hols["MS"] self.assertHolidayName( name, - self.state_hols["MS"], + ms_holidays, "2010-04-26", "2011-04-25", "2012-04-30", @@ -1165,19 +1162,19 @@ def test_confederate_memorial_day(self): "2023-04-24", "2024-04-29", ) - self.assertHolidayName(name, self.state_hols["MS"], range(1866, 2050)) - self.assertNoHolidayName(name, self.state_hols["MS"], range(1865, 1866)) + self.assertHolidayName(name, ms_holidays, range(1866, 2050)) + self.assertNoHolidayName(name, ms_holidays, range(1865, 1866)) - self.assertHolidayName( - name, self.state_hols["TX"], (f"{year}-01-19" for year in range(1931, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["TX"], range(1865, 1931)) + tx_holidays = self.state_hols["TX"] + self.assertHolidayName(name, tx_holidays, (f"{year}-01-19" for year in range(1931, 2050))) + self.assertNoHolidayName(name, tx_holidays, range(1865, 1931)) - self.assertHolidayName(name, self.state_hols["GA"], range(1866, 2016)) - self.assertNoHolidayName(name, self.state_hols["GA"], range(2016, 2050)) + ga_holidays = self.state_hols["GA"] + self.assertHolidayName(name, ga_holidays, range(1866, 2016)) + self.assertNoHolidayName(name, ga_holidays, range(2016, 2050)) self.assertHolidayName( name, - self.state_hols["GA"], + ga_holidays, "2010-04-26", "2011-04-25", "2012-04-23", @@ -1188,10 +1185,10 @@ def test_confederate_memorial_day(self): name = "State Holiday" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["GA"], range(2016, 2050)) + self.assertHolidayName(name, ga_holidays, range(2016, 2050)) self.assertHolidayName( name, - self.state_hols["GA"], + ga_holidays, "2016-04-25", "2017-04-24", "2018-04-23", @@ -1205,14 +1202,14 @@ def test_confederate_memorial_day(self): def test_san_jacinto_day(self): name = "San Jacinto Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["TX"], (f"{year}-04-21" for year in range(1875, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["TX"], range(1865, 1875)) + tx_holidays = self.state_hols["TX"] + self.assertHolidayName(name, tx_holidays, (f"{year}-04-21" for year in range(1875, 2050))) + self.assertNoHolidayName(name, tx_holidays, range(1865, 1875)) def test_arbor_day(self): name = "Arbor Day" self.assertNoHolidayName(name) + ne_holidays = self.state_hols["NE"] dt = ( "1989-04-28", "2010-04-30", @@ -1230,15 +1227,14 @@ def test_arbor_day(self): "2022-04-29", "2023-04-28", ) - self.assertHolidayName( - name, self.state_hols["NE"], (f"{year}-04-22" for year in range(1875, 1989)) - ) - self.assertNoHolidayName(name, self.state_hols["NE"], range(1865, 1875)) - self.assertHolidayName(name, self.state_hols["NE"], dt) + self.assertHolidayName(name, ne_holidays, (f"{year}-04-22" for year in range(1875, 1989))) + self.assertNoHolidayName(name, ne_holidays, range(1865, 1875)) + self.assertHolidayName(name, ne_holidays, dt) def test_primary_election_day(self): name = "Primary Election Day" self.assertNoHolidayName(name) + in_holidays = self.state_hols["IN"] dt = ( "2006-05-02", "2008-05-06", @@ -1255,21 +1251,16 @@ def test_primary_election_day(self): "2022-05-03", "2023-05-02", ) - self.assertHolidayName( - name, self.state_hols["IN"], 2006, 2008, 2010, 2012, 2014, range(2015, 2050) - ) - self.assertNoHolidayName( - name, self.state_hols["IN"], range(1865, 2006), 2007, 2009, 2011, 2013 - ) - self.assertHolidayName(name, self.state_hols["IN"], dt) + self.assertHolidayName(name, in_holidays, 2006, 2008, 2010, 2012, 2014, range(2015, 2050)) + self.assertNoHolidayName(name, in_holidays, range(1865, 2006), 2007, 2009, 2011, 2013) + self.assertHolidayName(name, in_holidays, dt) def test_truman_day(self): name = "Truman Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["MO"], (f"{year}-05-08" for year in range(1949, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["MO"], range(1865, 1949)) + mo_holidays = self.state_hols["MO"] + self.assertHolidayName(name, mo_holidays, (f"{year}-05-08" for year in range(1949, 2050))) + self.assertNoHolidayName(name, mo_holidays, range(1865, 1949)) obs_dt = ( "2010-05-07", "2011-05-09", @@ -1277,7 +1268,7 @@ def test_truman_day(self): "2021-05-07", "2022-05-09", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["MO"], obs_dt) + self.assertHolidayName(f"{name} (observed)", mo_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="MO", observed=False), obs_dt ) @@ -1285,8 +1276,9 @@ def test_truman_day(self): def test_jefferson_davis_birthday(self): name = "Jefferson Davis Birthday" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["AL"], range(1890, 2050)) - self.assertNoHolidayName(name, self.state_hols["AL"], range(1865, 1890)) + al_holidays = self.state_hols["AL"] + self.assertHolidayName(name, al_holidays, range(1890, 2050)) + self.assertNoHolidayName(name, al_holidays, range(1865, 1890)) dt = ( "2010-06-07", "2011-06-06", @@ -1303,15 +1295,14 @@ def test_jefferson_davis_birthday(self): "2022-06-06", "2023-06-05", ) - self.assertHolidayName(name, self.state_hols["AL"], dt) + self.assertHolidayName(name, al_holidays, dt) def test_kamehameha_day(self): name = "Kamehameha Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["HI"], (f"{year}-06-11" for year in range(1872, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["HI"], range(1865, 1872)) + hi_holidays = self.state_hols["HI"] + self.assertHolidayName(name, hi_holidays, (f"{year}-06-11" for year in range(1872, 2050))) + self.assertNoHolidayName(name, hi_holidays, range(1865, 1872)) obs_dt = ( "2011-06-10", "2016-06-10", @@ -1319,34 +1310,32 @@ def test_kamehameha_day(self): "2022-06-10", "2023-06-12", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["HI"], obs_dt) + self.assertHolidayName(f"{name} (observed)", hi_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="HI", observed=False), obs_dt ) - self.assertNoHolidayName(f"{name} (observed)", self.state_hols["HI"], range(1872, 2011)) + self.assertNoHolidayName(f"{name} (observed)", hi_holidays, range(1872, 2011)) def test_emancipation_day_in_texas(self): name = "Emancipation Day In Texas" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["TX"], (f"{year}-06-19" for year in range(1980, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["TX"], range(1865, 1980)) + tx_holidays = self.state_hols["TX"] + self.assertHolidayName(name, tx_holidays, (f"{year}-06-19" for year in range(1980, 2050))) + self.assertNoHolidayName(name, tx_holidays, range(1865, 1980)) def test_west_virginia_day(self): name = "West Virginia Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["WV"], (f"{year}-06-20" for year in range(1927, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["WV"], range(1865, 1927)) + wv_holidays = self.state_hols["WV"] + self.assertHolidayName(name, wv_holidays, (f"{year}-06-20" for year in range(1927, 2050))) + self.assertNoHolidayName(name, wv_holidays, range(1865, 1927)) obs_dt = ( "2010-06-21", "2015-06-19", "2020-06-19", "2021-06-21", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["WV"], obs_dt) + self.assertHolidayName(f"{name} (observed)", wv_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="WV", observed=False), obs_dt ) @@ -1361,10 +1350,9 @@ def test_emancipation_day_in_virgin_islands(self): def test_manua_islands_cession_day(self): name = "Manu'a Islands Cession Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["AS"], (f"{year}-07-16" for year in range(1983, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["AS"], range(1865, 1983)) + as_holidays = self.state_hols["AS"] + self.assertHolidayName(name, as_holidays, (f"{year}-07-16" for year in range(1983, 2050))) + self.assertNoHolidayName(name, as_holidays, range(1865, 1983)) obs_dt = ( "2000-07-17", "2005-07-15", @@ -1375,7 +1363,7 @@ def test_manua_islands_cession_day(self): "2022-07-15", "2023-07-17", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["AS"], obs_dt) + self.assertHolidayName(f"{name} (observed)", as_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="AS", observed=False), obs_dt ) @@ -1383,17 +1371,15 @@ def test_manua_islands_cession_day(self): def test_liberation_day_guam(self): name = "Liberation Day (Guam)" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["GU"], (f"{year}-07-21" for year in range(1945, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["WV"], range(1865, 1945)) + gu_holidays = self.state_hols["GU"] + self.assertHolidayName(name, gu_holidays, (f"{year}-07-21" for year in range(1945, 2050))) + self.assertNoHolidayName(name, gu_holidays, range(1865, 1945)) def test_pioneer_day(self): name = "Pioneer Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["UT"], (f"{year}-07-24" for year in range(1865, 2050)) - ) + ut_holidays = self.state_hols["UT"] + self.assertHolidayName(name, ut_holidays, (f"{year}-07-24" for year in range(1865, 2050))) self.assertNoHolidayName(name, UnitedStates(subdiv="UT", years=1848)) obs_dt = ( "2010-07-23", @@ -1402,7 +1388,7 @@ def test_pioneer_day(self): "2021-07-23", "2022-07-25", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["UT"], obs_dt) + self.assertHolidayName(f"{name} (observed)", ut_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="UT", observed=False), obs_dt ) @@ -1410,16 +1396,15 @@ def test_pioneer_day(self): def test_constitution_day(self): name = "Constitution Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["PR"], (f"{year}-07-25" for year in range(1865, 2050)) - ) + pr_holidays = self.state_hols["PR"] + self.assertHolidayName(name, pr_holidays, (f"{year}-07-25" for year in range(1865, 2050))) obs_dt = ( "1999-07-26", "2004-07-26", "2010-07-26", "2021-07-26", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["PR"], obs_dt) + self.assertHolidayName(f"{name} (observed)", pr_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="PR", observed=False), obs_dt ) @@ -1427,8 +1412,9 @@ def test_constitution_day(self): def test_victory_day(self): name = "Victory Day" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["RI"], range(1948, 2050)) - self.assertNoHolidayName(name, self.state_hols["RI"], range(1865, 1948)) + ri_holidays = self.state_hols["RI"] + self.assertHolidayName(name, ri_holidays, range(1948, 2050)) + self.assertNoHolidayName(name, ri_holidays, range(1865, 1948)) dt = ( "2010-08-09", "2011-08-08", @@ -1445,13 +1431,14 @@ def test_victory_day(self): "2022-08-08", "2023-08-14", ) - self.assertHolidayName(name, self.state_hols["RI"], dt) + self.assertHolidayName(name, ri_holidays, dt) def test_statehood_day(self): name = "Statehood Day" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["HI"], range(1959, 2050)) - self.assertNoHolidayName(name, self.state_hols["HI"], range(1865, 1959)) + hi_holidays = self.state_hols["HI"] + self.assertHolidayName(name, hi_holidays, range(1959, 2050)) + self.assertNoHolidayName(name, hi_holidays, range(1865, 1959)) dt = ( "2010-08-20", "2011-08-19", @@ -1468,14 +1455,13 @@ def test_statehood_day(self): "2022-08-19", "2023-08-18", ) - self.assertHolidayName(name, self.state_hols["HI"], dt) + self.assertHolidayName(name, hi_holidays, dt) def test_bennington_battle_day(self): name = "Bennington Battle Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["VT"], (f"{year}-08-16" for year in range(1865, 2050)) - ) + vt_holidays = self.state_hols["VT"] + self.assertHolidayName(name, vt_holidays, (f"{year}-08-16" for year in range(1865, 2050))) self.assertNoHolidayName(name, UnitedStates(subdiv="VT", years=1777)) obs_dt = ( "2009-08-17", @@ -1483,7 +1469,7 @@ def test_bennington_battle_day(self): "2015-08-17", "2020-08-17", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["VT"], obs_dt) + self.assertHolidayName(f"{name} (observed)", vt_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="VT", observed=False), obs_dt ) @@ -1491,10 +1477,9 @@ def test_bennington_battle_day(self): def test_lyndon_baines_johnson_day(self): name = "Lyndon Baines Johnson Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["TX"], (f"{year}-08-27" for year in range(1973, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["WV"], range(1865, 1973)) + tx_holidays = self.state_hols["TX"] + self.assertHolidayName(name, tx_holidays, (f"{year}-08-27" for year in range(1973, 2050))) + self.assertNoHolidayName(name, tx_holidays, range(1865, 1973)) def test_commonwealth_cultural_day(self): name = "Commonwealth Cultural Day" @@ -1520,7 +1505,8 @@ def test_commonwealth_cultural_day(self): def test_white_sunday(self): name = "White Sunday" self.assertNoHolidayName(name) - self.assertHolidayName(name, self.state_hols["AS"], range(1865, 2050)) + as_holidays = self.state_hols["AS"] + self.assertHolidayName(name, as_holidays, range(1865, 2050)) dt = ( "2010-10-10", "2011-10-09", @@ -1538,22 +1524,21 @@ def test_white_sunday(self): "2023-10-08", "2024-10-13", ) - self.assertHolidayName(name, self.state_hols["AS"], dt) + self.assertHolidayName(name, as_holidays, dt) def test_alaska_day(self): name = "Alaska Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["AK"], (f"{year}-10-18" for year in range(1917, 2050)) - ) - self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1917)) + ak_holidays = self.state_hols["AK"] + self.assertHolidayName(name, ak_holidays, (f"{year}-10-18" for year in range(1917, 2050))) + self.assertNoHolidayName(name, ak_holidays, range(1865, 1917)) obs_dt = ( "2009-10-19", "2014-10-17", "2015-10-19", "2020-10-19", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["AK"], obs_dt) + self.assertHolidayName(f"{name} (observed)", ak_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="AK", observed=False), obs_dt ) @@ -1561,10 +1546,9 @@ def test_alaska_day(self): def test_nevada_day(self): name = "Nevada Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["NV"], (f"{year}-10-31" for year in range(1933, 2000)) - ) - self.assertNoHolidayName(name, self.state_hols["NV"], range(1865, 1933)) + nv_holidays = self.state_hols["NV"] + self.assertHolidayName(name, nv_holidays, (f"{year}-10-31" for year in range(1933, 2000))) + self.assertNoHolidayName(name, nv_holidays, range(1865, 1933)) dt = ( "2000-10-27", "2010-10-29", @@ -1582,7 +1566,7 @@ def test_nevada_day(self): "2022-10-28", "2023-10-27", ) - self.assertHolidayName(name, self.state_hols["NV"], dt) + self.assertHolidayName(name, nv_holidays, dt) obs_dt = ( "1992-10-30", @@ -1590,7 +1574,7 @@ def test_nevada_day(self): "1998-10-30", "1999-11-01", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["NV"], obs_dt) + self.assertHolidayName(f"{name} (observed)", nv_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="NV", observed=False), obs_dt ) @@ -1617,8 +1601,9 @@ def test_election_day(self): ) for subdiv in ("DE", "HI", "IL", "LA", "MP", "MT", "NH", "NJ", "WV"): self.assertHolidayName(name, self.state_hols[subdiv], dt) - self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, 2008)) - self.assertNoHolidayName(name, self.state_hols[subdiv], range(2009, 2050, 2)) + self.assertNoHolidayName( + name, self.state_hols[subdiv], range(1865, 2008), range(2009, 2050, 2) + ) dt = ( "2008-11-04", @@ -1685,56 +1670,43 @@ def test_election_day(self): "2020-11-03", "2024-11-05", ) - subdiv_us_territories = {"AS", "GU", "MP", "PR", "UM", "VI"} - for subdiv in set(UnitedStates.subdivisions) - subdiv_us_territories: - self.assertNoHolidayName( - name, UnitedStates(subdiv=subdiv, categories=UNOFFICIAL, years=(1844, 1847)) - ) - self.assertHolidayName( - name, - UnitedStates(subdiv=subdiv, categories=UNOFFICIAL), - dt, - ) - for subdiv in subdiv_us_territories: - self.assertNoHolidayName( - name, UnitedStates(subdiv=subdiv, categories=UNOFFICIAL, years=range(1865, 2050)) - ) + for subdiv in UnitedStates.subdivisions: + holidays = UnitedStates(subdiv=subdiv, categories=UNOFFICIAL, years=range(1865, 2050)) + if subdiv in {"AS", "GU", "MP", "PR", "UM", "VI"}: + self.assertNoHolidayName(name, holidays) + else: + self.assertNoHolidayName( + name, UnitedStates(subdiv=subdiv, categories=UNOFFICIAL, years=(1844, 1847)) + ) + self.assertHolidayName(name, holidays, dt) def test_valentines_day(self): name = "Valentine's Day" self.assertNoHolidayName(name) self.assertNoHolidayName(name, UnitedStates(categories=UNOFFICIAL, years=1846)) self.assertHolidayName( - name, - UnitedStates(categories=UNOFFICIAL), - (f"{year}-02-14" for year in range(1865, 2050)), + name, self.unofficial_hols, (f"{year}-02-14" for year in range(1865, 2050)) ) def test_st_patricks_day(self): name = "Saint Patrick's Day" self.assertNoHolidayName(name) self.assertHolidayName( - name, - UnitedStates(categories=UNOFFICIAL), - (f"{year}-03-17" for year in range(1865, 2050)), + name, self.unofficial_hols, (f"{year}-03-17" for year in range(1865, 2050)) ) def test_halloween(self): name = "Halloween" self.assertNoHolidayName(name) self.assertHolidayName( - name, - UnitedStates(categories=UNOFFICIAL), - (f"{year}-10-31" for year in range(1865, 2050)), + name, self.unofficial_hols, (f"{year}-10-31" for year in range(1865, 2050)) ) def test_groundhog_day(self): name = "Groundhog Day" self.assertNoHolidayName(name) self.assertHolidayName( - name, - UnitedStates(categories=UNOFFICIAL), - (f"{year}-02-02" for year in range(1886, 2050)), + name, self.unofficial_hols, (f"{year}-02-02" for year in range(1886, 2050)) ) def test_all_souls_day(self): @@ -1747,16 +1719,15 @@ def test_all_souls_day(self): def test_citizenship_day(self): name = "Citizenship Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["MP"], (f"{year}-11-04" for year in range(1865, 2050)) - ) + mp_holidays = self.state_hols["MP"] + self.assertHolidayName(name, mp_holidays, (f"{year}-11-04" for year in range(1865, 2050))) obs_dt = ( "2012-11-05", "2017-11-03", "2018-11-05", "2023-11-03", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["MP"], obs_dt) + self.assertHolidayName(f"{name} (observed)", mp_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="MP", observed=False), obs_dt ) @@ -1764,16 +1735,15 @@ def test_citizenship_day(self): def test_discovery_day(self): name = "Discovery Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["PR"], (f"{year}-11-19" for year in range(1865, 2050)) - ) + pr_holidays = self.state_hols["PR"] + self.assertHolidayName(name, pr_holidays, (f"{year}-11-19" for year in range(1865, 2050))) obs_dt = ( "2000-11-20", "2006-11-20", "2017-11-20", "2023-11-20", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["PR"], obs_dt) + self.assertHolidayName(f"{name} (observed)", pr_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="PR", observed=False), obs_dt ) @@ -1819,17 +1789,16 @@ def test_day_after_thanksgiving(self): def test_robert_lee_birthday(self): name_1 = "Robert E. Lee's Birthday" name_2 = "State Holiday" + ga_holidays = self.state_hols["GA"] self.assertNoHolidayName(name_1) self.assertNoHolidayName(name_2) - self.assertHolidayName(name_1, self.state_hols["GA"], range(1986, 2016)) - self.assertHolidayName(name_2, self.state_hols["GA"], range(2016, 2050)) - self.assertNoHolidayName( - name_1, self.state_hols["GA"], range(1865, 1986), range(2016, 2050) - ) - self.assertNoHolidayName(name_2, self.state_hols["GA"], range(1865, 2016)) + self.assertHolidayName(name_1, ga_holidays, range(1986, 2016)) + self.assertHolidayName(name_2, ga_holidays, range(2016, 2050)) + self.assertNoHolidayName(name_1, ga_holidays, range(1865, 1986), range(2016, 2050)) + self.assertNoHolidayName(name_2, ga_holidays, range(1865, 2016)) self.assertHolidayName( name_1, - self.state_hols["GA"], + ga_holidays, "2010-11-26", "2011-11-25", "2012-11-23", @@ -1839,7 +1808,7 @@ def test_robert_lee_birthday(self): ) self.assertHolidayName( name_2, - self.state_hols["GA"], + ga_holidays, "2016-11-25", "2017-11-24", "2018-11-23", @@ -1860,16 +1829,15 @@ def test_lady_of_camarin_day(self): def test_constitution_day_mp(self): name = "Constitution Day" self.assertNoHolidayName(name) - self.assertHolidayName( - name, self.state_hols["MP"], (f"{year}-12-08" for year in range(1865, 2050)) - ) + mp_holidays = self.state_hols["MP"] + self.assertHolidayName(name, mp_holidays, (f"{year}-12-08" for year in range(1865, 2050))) obs_dt = ( "2012-12-07", "2013-12-09", "2018-12-07", "2019-12-09", ) - self.assertHolidayName(f"{name} (observed)", self.state_hols["MP"], obs_dt) + self.assertHolidayName(f"{name} (observed)", mp_holidays, obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv="MP", observed=False), obs_dt ) @@ -1894,7 +1862,7 @@ def test_christmas_eve(self): self.assertHolidayName( name, self.state_hols[subdiv], - (f"{year}-12-24" for year in range(start_year if start_year > 0 else 1865, 2050)), + (f"{year}-12-24" for year in range(start_year, 2050)), ) self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, start_year)) self.assertHolidayName(f"{name} (observed)", self.state_hols[subdiv], obs_dt) @@ -1944,21 +1912,20 @@ def test_new_years_eve(self): self.assertHolidayName( name, self.state_hols[subdiv], - (f"{year}-12-31" for year in range(start_year if start_year > 0 else 1865, 2050)), + (f"{year}-12-31" for year in range(start_year, 2050)), ) - if start_year > 0: - self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, start_year)) + self.assertNoHolidayName(name, self.state_hols[subdiv], range(1865, start_year)) self.assertHolidayName(f"{name} (observed)", self.state_hols[subdiv], obs_dt) self.assertNoNonObservedHolidayName( f"{name} (observed)", UnitedStates(subdiv=subdiv, observed=False), obs_dt ) def test_frances_xavier_cabrini_day(self): - co_holidays = self.state_hols["CO"] name = "Frances Xavier Cabrini Day" - - self.assertNoHolidayName(name, co_holidays, range(2000, 2019)) - self.assertHolidayName(name, co_holidays, range(2020, 2024)) + self.assertNoHolidayName(name) + co_holidays = self.state_hols["CO"] + self.assertNoHolidayName(name, co_holidays, range(1865, 2019)) + self.assertHolidayName(name, co_holidays, range(2020, 2050)) self.assertHoliday( co_holidays, ( From 5a853fe8b3cb3d7311db364362a736cda32fa0ae Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Wed, 30 Oct 2024 04:21:25 +0700 Subject: [PATCH 18/32] Fix `make l10n` removing loc comment for Asarnha Bucha (#2091) --- holidays/countries/thailand.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index 37c99f642..32f773ff0 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -448,9 +448,10 @@ def _populate_public_holidays(self): # - CASE 2: SAT-SUN -> 1 in-lieu on MON # - CASE 3: SUN-MON -> 1 in-lieu on TUE - # Asarnha Bucha. self._add_observed( - self._add_asarnha_bucha(tr("วันอาสาฬหบูชา")), rule=SAT_SUN_TO_NEXT_MON_TUE + # Asarnha Bucha. + self._add_asarnha_bucha(tr("วันอาสาฬหบูชา")), + rule=SAT_SUN_TO_NEXT_MON_TUE, ) # วันเข้าพรรษา From 5937916ef2edee9313fa22d6053cd63b6ea22db0 Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Wed, 30 Oct 2024 04:26:01 +0700 Subject: [PATCH 19/32] Update Germany holidays: add East German Uprising Day 2028 in Berlin (#2092) Co-authored-by: ~Jhellico --- holidays/countries/germany.py | 11 ++++++++++- holidays/locale/de/LC_MESSAGES/DE.po | 8 ++++++-- holidays/locale/en_US/LC_MESSAGES/DE.po | 8 ++++++-- holidays/locale/th/LC_MESSAGES/DE.po | 10 +++++++--- holidays/locale/uk/LC_MESSAGES/DE.po | 8 ++++++-- snapshots/countries/DE_BE.json | 1 + tests/countries/test_germany.py | 9 +++++++++ 7 files changed, 45 insertions(+), 10 deletions(-) diff --git a/holidays/countries/germany.py b/holidays/countries/germany.py index 5f00cc033..e4f6cc709 100644 --- a/holidays/countries/germany.py +++ b/holidays/countries/germany.py @@ -12,7 +12,7 @@ from gettext import gettext as tr -from holidays.calendars.gregorian import MAY, OCT +from holidays.calendars.gregorian import MAY, JUN, OCT from holidays.constants import CATHOLIC, PUBLIC from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays from holidays.holiday_base import HolidayBase @@ -304,6 +304,13 @@ class DEU(Germany): class GermanyStaticHolidays: + """ + References: + - https://www.stuttgarter-zeitung.de/inhalt.reformationstag-2017-einmalig-bundesweiter-feiertag.b7e189b3-a33d-41a3-a0f4-141cd13df54e.html + - https://www.bbc.com/news/world-europe-52574748 + - https://gesetze.berlin.de/bsbe/document/jlr-FeiertGBEV8P1 + """ + special_public_holidays = { 2017: (OCT, 31, tr("Reformationstag")), } @@ -329,4 +336,6 @@ class GermanyStaticHolidays: "und der Beendigung des Zweiten Weltkriegs in Europa" ), ), + # 75th anniversary of the East German uprising of 1953. + 2028: (JUN, 17, tr("75. Jahrestag des Aufstandes vom 17. Juni 1953")), } diff --git a/holidays/locale/de/LC_MESSAGES/DE.po b/holidays/locale/de/LC_MESSAGES/DE.po index 81b4e6bff..06f50b13d 100644 --- a/holidays/locale/de/LC_MESSAGES/DE.po +++ b/holidays/locale/de/LC_MESSAGES/DE.po @@ -13,9 +13,9 @@ # Germany holidays. msgid "" msgstr "" -"Project-Id-Version: Holidays 0.59\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-04-04 16:13+0300\n" -"PO-Revision-Date: 2024-10-17 11:43+0700\n" +"PO-Revision-Date: 2024-10-30 02:14+0700\n" "Last-Translator: PPsyrius \n" "Language-Team: Holidays localization team\n" "Language: de\n" @@ -115,3 +115,7 @@ msgstr "" #. World Children's Day. msgid "Weltkindertag" msgstr "" + +#. 75th anniversary of the East German uprising of 1953. +msgid "75. Jahrestag des Aufstandes vom 17. Juni 1953" +msgstr "" diff --git a/holidays/locale/en_US/LC_MESSAGES/DE.po b/holidays/locale/en_US/LC_MESSAGES/DE.po index 6020e2d0f..f6e7d0024 100644 --- a/holidays/locale/en_US/LC_MESSAGES/DE.po +++ b/holidays/locale/en_US/LC_MESSAGES/DE.po @@ -14,9 +14,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.59\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-04-04 16:13+0300\n" -"PO-Revision-Date: 2024-10-17 11:43+0700\n" +"PO-Revision-Date: 2024-10-30 02:14+0700\n" "Last-Translator: PPsyrius \n" "Language-Team: Holidays localization team\n" "Language: en_US\n" @@ -120,3 +120,7 @@ msgstr "Assumption Day" #. World Children's Day. msgid "Weltkindertag" msgstr "World Children's Day" + +#. 75th anniversary of the East German uprising of 1953. +msgid "75. Jahrestag des Aufstandes vom 17. Juni 1953" +msgstr "75th anniversary of the East German uprising of 1953" diff --git a/holidays/locale/th/LC_MESSAGES/DE.po b/holidays/locale/th/LC_MESSAGES/DE.po index 601c49542..a0ed17b74 100644 --- a/holidays/locale/th/LC_MESSAGES/DE.po +++ b/holidays/locale/th/LC_MESSAGES/DE.po @@ -14,11 +14,11 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.59\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2024-09-05 23:21+0700\n" -"PO-Revision-Date: 2024-10-17 11:44+0700\n" +"PO-Revision-Date: 2024-10-30 02:14+0700\n" "Last-Translator: PPsyrius \n" -"Language-Team: Holidays Localization Team\n" +"Language-Team: Holidays localization team\n" "Language: th\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -120,3 +120,7 @@ msgstr "วันสมโภชแม่พระรับเกียรติ #. World Children's Day. msgid "Weltkindertag" msgstr "วันเด็กสากล" + +#. 75th anniversary of the East German uprising of 1953. +msgid "75. Jahrestag des Aufstandes vom 17. Juni 1953" +msgstr "วันครบรอบ 75 ปีของการก่อการกำเริบในเยอรมนีตะวันออก ค.ศ. 1953" diff --git a/holidays/locale/uk/LC_MESSAGES/DE.po b/holidays/locale/uk/LC_MESSAGES/DE.po index b31b024e5..ee6ed677c 100644 --- a/holidays/locale/uk/LC_MESSAGES/DE.po +++ b/holidays/locale/uk/LC_MESSAGES/DE.po @@ -14,9 +14,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.59\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-04-04 16:13+0300\n" -"PO-Revision-Date: 2024-10-17 11:44+0700\n" +"PO-Revision-Date: 2024-10-30 02:15+0700\n" "Last-Translator: PPsyrius \n" "Language-Team: Holidays localization team\n" "Language: uk\n" @@ -120,3 +120,7 @@ msgstr "Внебовзяття Пресвятої Діви Марії" #. World Children's Day. msgid "Weltkindertag" msgstr "Всесвітній день дітей" + +#. 75th anniversary of the East German uprising of 1953. +msgid "75. Jahrestag des Aufstandes vom 17. Juni 1953" +msgstr "75-та річниця Повстання 1953 у Східній Німеччині" diff --git a/snapshots/countries/DE_BE.json b/snapshots/countries/DE_BE.json index fec5b8d19..cd896410c 100644 --- a/snapshots/countries/DE_BE.json +++ b/snapshots/countries/DE_BE.json @@ -358,6 +358,7 @@ "2028-05-01": "Labor Day", "2028-05-25": "Ascension Day", "2028-06-05": "Whit Monday", + "2028-06-17": "75th anniversary of the East German uprising of 1953", "2028-10-03": "German Unity Day", "2028-12-25": "Christmas Day", "2028-12-26": "Second Day of Christmas", diff --git a/tests/countries/test_germany.py b/tests/countries/test_germany.py index e35b3d5a1..f284792b6 100644 --- a/tests/countries/test_germany.py +++ b/tests/countries/test_germany.py @@ -206,6 +206,15 @@ def test_80_jahrestag_beendigung_zweiter_weltkrieg(self): for subdiv in subdivs_that_dont: self.assertNoHoliday(self.subdiv_holidays[subdiv], "2025-05-08") + def test_75_jahrestag_des_aufstandes_vom_17_juni_1953(self): + subdivs_that_have = {"BE"} + subdivs_that_dont = set(DE.subdivisions) - subdivs_that_have + + for subdiv in subdivs_that_have: + self.assertHoliday(self.subdiv_holidays[subdiv], "2028-06-17") + for subdiv in subdivs_that_dont: + self.assertNoHoliday(self.subdiv_holidays[subdiv], "2028-06-17") + def test_christi_himmelfahrt(self): known_good = ( "2014-05-29", From a2ff133814e8b100c651fb4524219448a1cd2a7e Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Wed, 30 Oct 2024 01:55:57 +0200 Subject: [PATCH 20/32] Refactor Australia tests (#2088) --- tests/countries/test_australia.py | 221 ++++++++++++++---------------- 1 file changed, 106 insertions(+), 115 deletions(-) diff --git a/tests/countries/test_australia.py b/tests/countries/test_australia.py index f7a3455f7..bf751164b 100644 --- a/tests/countries/test_australia.py +++ b/tests/countries/test_australia.py @@ -38,8 +38,7 @@ def _assertVariableDays(self, year: int, subdiv_holidays: dict): # noqa: N802 self.assertEqual( dt in prov_holidays, subdiv in hol_provs, - f"Failed date `{dt:%Y-%m-%d}`, " - f"province `{subdiv}`: {', '.join(hol_provs)}", + f"Failed date `{dt:%Y-%m-%d}`, province `{subdiv}`: {', '.join(hol_provs)}", ) def test_country_aliases(self): @@ -58,32 +57,23 @@ def test_australia_day(self): self.assertNoHolidayName(name_2, range(1900, 1935)) self.assertNoHoliday(f"{year}-01-26" for year in range(1900, 1935)) - for subdiv in set(Australia.subdivisions) - {"NSW", "SA"}: - self.assertHolidayName( - name_1, - self.subdiv_holidays[subdiv], - range(1900, 1935), - ) - self.assertHolidayName( - name_2, - self.subdiv_holidays[subdiv], - range(1935, 2050), - ) - self.assertNoHolidayName(name_1, self.subdiv_holidays[subdiv], range(1935, 2050)) - self.assertNoHolidayName(name_2, self.subdiv_holidays[subdiv], range(1900, 1935)) - self.assertNoHolidayName(name_1, Australia(subdiv=subdiv, years=1887)) - - nsw_holidays = self.subdiv_holidays["NSW"] - self.assertHolidayName(name_1, nsw_holidays, range(1900, 1946)) - self.assertHolidayName(name_2, nsw_holidays, range(1946, 2050)) - self.assertNoHolidayName(name_1, nsw_holidays, range(1946, 2050)) - self.assertNoHolidayName(name_2, nsw_holidays, range(1900, 1946)) - self.assertNoHolidayName(name_1, Australia(subdiv="NSW", years=1887)) - - sa_holidays = self.subdiv_holidays["SA"] - self.assertHolidayName(name_2, sa_holidays, range(1935, 2050)) - self.assertNoHolidayName(name_2, sa_holidays, range(1900, 1935)) - self.assertNoHolidayName(name_1, sa_holidays) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "NSW": + self.assertHolidayName(name_1, holidays, range(1900, 1946)) + self.assertHolidayName(name_2, holidays, range(1946, 2050)) + self.assertNoHolidayName(name_1, holidays, range(1946, 2050)) + self.assertNoHolidayName(name_2, holidays, range(1900, 1946)) + self.assertNoHolidayName(name_1, Australia(subdiv="NSW", years=1887)) + elif subdiv == "SA": + self.assertHolidayName(name_2, holidays, range(1935, 2050)) + self.assertNoHolidayName(name_2, holidays, range(1900, 1935)) + self.assertNoHolidayName(name_1, holidays) + else: + self.assertHolidayName(name_1, holidays, range(1900, 1935)) + self.assertHolidayName(name_2, holidays, range(1935, 2050)) + self.assertNoHolidayName(name_1, holidays, range(1935, 2050)) + self.assertNoHolidayName(name_2, holidays, range(1900, 1935)) + self.assertNoHolidayName(name_1, Australia(subdiv=subdiv, years=1887)) def test_good_friday(self): name = "Good Friday" @@ -109,21 +99,14 @@ def test_easter_saturday(self): name = "Easter Saturday" self.assertNoHolidayName(name) - for subdiv in ( - "ACT", - "NSW", - "NT", - "QLD", - "SA", - ): - self.assertHolidayName(name, self.subdiv_holidays[subdiv], range(1900, 2050)) - - vic_holidays = self.subdiv_holidays["VIC"] - self.assertHolidayName(name, vic_holidays, range(2003, 2050)) - self.assertNoHolidayName(name, vic_holidays, range(1900, 2003)) - - for subdiv in ("TAS", "WA"): - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "VIC": + self.assertHolidayName(name, holidays, range(2003, 2050)) + self.assertNoHolidayName(name, holidays, range(1900, 2003)) + elif subdiv in {"TAS", "WA"}: + self.assertNoHolidayName(name, holidays) + else: + self.assertHolidayName(name, holidays, range(1900, 2050)) def test_easter_sunday(self): name = "Easter Sunday" @@ -185,17 +168,17 @@ def test_labour_day(self): def test_sovereigns_birthday(self): name_king = "King's Birthday" name_queen = "Queen's Birthday" - self.assertHolidayName(name_king, (f"{year}-11-09" for year in range(1902, 1912))) - self.assertHolidayName(name_king, (f"{year}-06-03" for year in range(1912, 1936))) - for subdiv in Australia.subdivisions: + self.assertHolidayName( + name_king, + (f"{year}-11-09" for year in range(1902, 1912)), + (f"{year}-06-03" for year in range(1912, 1936)), + ) + + for holidays in self.subdiv_holidays.values(): self.assertHolidayName( name_king, - self.subdiv_holidays[subdiv], + holidays, (f"{year}-11-09" for year in range(1902, 1912)), - ) - self.assertHolidayName( - name_king, - self.subdiv_holidays[subdiv], (f"{year}-06-03" for year in range(1912, 1936)), ) self.assertNoHolidayName(name_king, range(1936, 2050)) @@ -221,8 +204,6 @@ def test_canberra_day(self): name = "Canberra Day" self.assertNoHolidayName(name) - act_holidays = self.subdiv_holidays["ACT"] - self.assertHolidayName(name, act_holidays, (f"{year}-03-12" for year in range(1913, 1959))) dt = ( "1959-03-16", "2000-03-20", @@ -238,16 +219,20 @@ def test_canberra_day(self): "2023-03-13", "2024-03-11", ) - self.assertHolidayName(name, act_holidays, dt) - self.assertNoHolidayName(name, act_holidays, range(1900, 1913)) - for subdiv in set(Australia.subdivisions) - {"ACT"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "ACT": + self.assertHolidayName( + name, holidays, (f"{year}-03-12" for year in range(1913, 1959)) + ) + self.assertHolidayName(name, holidays, dt) + self.assertNoHolidayName(name, holidays, range(1900, 1913)) + else: + self.assertNoHolidayName(name, holidays) def test_family_and_community_day(self): name = "Family & Community Day" self.assertNoHolidayName(name) - act_holidays = self.subdiv_holidays["ACT"] dt = ( "2010-09-26", "2011-10-10", @@ -258,16 +243,17 @@ def test_family_and_community_day(self): "2016-09-26", "2017-09-25", ) - self.assertHolidayName(name, act_holidays, dt) - self.assertNoHolidayName(name, act_holidays, range(1900, 2010), range(2018, 2050)) - for subdiv in set(Australia.subdivisions) - {"ACT"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "ACT": + self.assertHolidayName(name, holidays, dt) + self.assertNoHolidayName(name, holidays, range(1900, 2010), range(2018, 2050)) + else: + self.assertNoHolidayName(name, holidays) def test_reconciliation_day(self): name = "Reconciliation Day" self.assertNoHolidayName(name) - act_holidays = self.subdiv_holidays["ACT"] dt = ( "2018-05-28", "2019-05-27", @@ -277,16 +263,17 @@ def test_reconciliation_day(self): "2023-05-29", "2024-05-27", ) - self.assertHolidayName(name, act_holidays, dt) - self.assertNoHolidayName(name, act_holidays, range(1900, 2018)) - for subdiv in set(Australia.subdivisions) - {"ACT"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "ACT": + self.assertHolidayName(name, holidays, dt) + self.assertNoHolidayName(name, holidays, range(1900, 2018)) + else: + self.assertNoHolidayName(name, holidays) def test_bank_holiday(self): name = "Bank Holiday" self.assertNoHolidayName(name) - nsw_holidays = self.subdiv_holidays["NSW"] dt = ( "2000-08-07", "2007-08-06", @@ -303,17 +290,18 @@ def test_bank_holiday(self): "2023-08-07", "2024-08-05", ) - self.assertHolidayName(name, nsw_holidays, dt) - self.assertNoHolidayName(name, nsw_holidays, range(1900, 1912), range(2011, 2050)) - for subdiv in set(Australia.subdivisions) - {"NSW"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) self.assertHolidayName(name, Australia(subdiv="NSW", categories=BANK), dt_bank) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "NSW": + self.assertHolidayName(name, holidays, dt) + self.assertNoHolidayName(name, holidays, range(1900, 1912), range(2011, 2050)) + else: + self.assertNoHolidayName(name, holidays) def test_picnic_day(self): name = "Picnic Day" self.assertNoHolidayName(name) - nt_holidays = self.subdiv_holidays["NT"] dt = ( "2000-08-07", "2010-08-02", @@ -325,16 +313,17 @@ def test_picnic_day(self): "2023-08-07", "2024-08-05", ) - self.assertHolidayName(name, nt_holidays, dt) - self.assertHolidayName(name, nt_holidays, range(1900, 2050)) - for subdiv in set(Australia.subdivisions) - {"NT"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "NT": + self.assertHolidayName(name, holidays, dt) + self.assertHolidayName(name, holidays, range(1900, 2050)) + else: + self.assertNoHolidayName(name, holidays) def test_royal_queensland_show(self): name = "The Royal Queensland Show" self.assertNoHolidayName(name) - qld_holidays = self.subdiv_holidays["QLD"] dt = ( "2000-08-16", "2010-08-11", @@ -346,16 +335,17 @@ def test_royal_queensland_show(self): "2023-08-16", "2024-08-14", ) - self.assertHolidayName(name, qld_holidays, dt) - self.assertHolidayName(name, qld_holidays, range(1900, 2050)) - for subdiv in set(Australia.subdivisions) - {"QLD"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "QLD": + self.assertHolidayName(name, holidays, dt) + self.assertHolidayName(name, holidays, range(1900, 2050)) + else: + self.assertNoHolidayName(name, holidays) def test_adelaide_cup_day(self): name = "Adelaide Cup Day" self.assertNoHolidayName(name) - sa_holidays = self.subdiv_holidays["SA"] dt = ( "2000-05-15", "2005-05-16", @@ -368,17 +358,18 @@ def test_adelaide_cup_day(self): "2023-03-13", "2024-03-11", ) - self.assertHolidayName(name, sa_holidays, dt) - self.assertHolidayName(name, sa_holidays, range(1973, 2050)) - self.assertNoHolidayName(name, sa_holidays, range(1900, 1973)) - for subdiv in set(Australia.subdivisions) - {"SA"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "SA": + self.assertHolidayName(name, holidays, dt) + self.assertHolidayName(name, holidays, range(1973, 2050)) + self.assertNoHolidayName(name, holidays, range(1900, 1973)) + else: + self.assertNoHolidayName(name, holidays) def test_melbourne_cup_day(self): name = "Melbourne Cup Day" self.assertNoHolidayName(name) - vic_holidays = self.subdiv_holidays["VIC"] dt = ( "2009-11-03", "2010-11-02", @@ -390,17 +381,18 @@ def test_melbourne_cup_day(self): "2023-11-07", "2024-11-05", ) - self.assertHolidayName(name, vic_holidays, dt) - self.assertHolidayName(name, vic_holidays, range(2009, 2050)) - self.assertNoHolidayName(name, vic_holidays, range(1900, 2009)) - for subdiv in set(Australia.subdivisions) - {"VIC"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "VIC": + self.assertHolidayName(name, holidays, dt) + self.assertHolidayName(name, holidays, range(2009, 2050)) + self.assertNoHolidayName(name, holidays, range(1900, 2009)) + else: + self.assertNoHolidayName(name, holidays) def test_grand_final_day(self): name = "Grand Final Day" self.assertNoHolidayName(name) - vic_holidays = self.subdiv_holidays["VIC"] dt = ( "2015-10-02", "2016-09-30", @@ -413,11 +405,13 @@ def test_grand_final_day(self): "2023-09-29", "2024-09-27", ) - self.assertHolidayName(name, vic_holidays, dt) - self.assertHolidayName(name, vic_holidays, range(2015, 2050)) - self.assertNoHolidayName(name, vic_holidays, range(1900, 2015)) - for subdiv in set(Australia.subdivisions) - {"VIC"}: - self.assertNoHolidayName(name, self.subdiv_holidays[subdiv]) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "VIC": + self.assertHolidayName(name, holidays, dt) + self.assertHolidayName(name, holidays, range(2015, 2050)) + self.assertNoHolidayName(name, holidays, range(1900, 2015)) + else: + self.assertNoHolidayName(name, holidays) def test_western_australia_day(self): name_1 = "Foundation Day" @@ -425,7 +419,6 @@ def test_western_australia_day(self): self.assertNoHolidayName(name_1) self.assertNoHolidayName(name_2) - wa_holidays = self.subdiv_holidays["WA"] dt_1 = ( "2000-06-05", "2005-06-06", @@ -445,16 +438,17 @@ def test_western_australia_day(self): "2021-06-07", "2022-06-06", ) - self.assertHolidayName(name_1, wa_holidays, dt_1) - self.assertHolidayName(name_2, wa_holidays, dt_2) - self.assertNoHolidayName(name_1, wa_holidays, range(2012, 2050)) - self.assertNoHolidayName(name_2, wa_holidays, range(1900, 2012)) + for subdiv, holidays in self.subdiv_holidays.items(): + if subdiv == "WA": + self.assertHolidayName(name_1, holidays, dt_1) + self.assertHolidayName(name_2, holidays, dt_2) + self.assertNoHolidayName(name_1, holidays, range(2012, 2050)) + self.assertNoHolidayName(name_2, holidays, range(1900, 2012)) + else: + self.assertNoHolidayName(name_1, holidays) + self.assertNoHolidayName(name_2, holidays) self.assertNoHolidayName(name_1, Australia(subdiv="WA", years=1832)) - for subdiv in set(Australia.subdivisions) - {"WA"}: - self.assertNoHolidayName(name_1, self.subdiv_holidays[subdiv]) - self.assertNoHolidayName(name_2, self.subdiv_holidays[subdiv]) - def test_national_day_of_mourning_for_queen_elizabeth_ii(self): name = "National Day of Mourning for Queen Elizabeth II" dt = "2022-09-22" @@ -463,15 +457,12 @@ def test_national_day_of_mourning_for_queen_elizabeth_ii(self): self.assertHolidayName(name, holidays, dt) def test_special_holidays(self): - act_holidays = self.subdiv_holidays["ACT"] - qld_holidays = self.subdiv_holidays["QLD"] - wa_holidays = self.subdiv_holidays["WA"] - self.assertHoliday(act_holidays, "2020-04-20", "2021-04-25") - self.assertHoliday(qld_holidays, "2010-12-28", "2011-01-03", "2012-06-11") + self.assertHoliday(self.subdiv_holidays["ACT"], "2020-04-20", "2021-04-25") + self.assertHoliday(self.subdiv_holidays["QLD"], "2010-12-28", "2011-01-03", "2012-06-11") self.assertNoNonObservedHoliday( Australia(subdiv="QLD", observed=False, years=(2010, 2011)), "2010-12-28", "2011-01-03" ) - self.assertHoliday(wa_holidays, "2011-04-26") + self.assertHoliday(self.subdiv_holidays["WA"], "2011-04-26") def test_all_holidays(self): holidays_found = set() From d31f03fb022a5989bf071f0d21b299e700a3145e Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Wed, 30 Oct 2024 07:59:19 +0700 Subject: [PATCH 21/32] Fixed Thai Calendar test case coverage (#2090) --- tests/test_holiday_groups.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/test_holiday_groups.py b/tests/test_holiday_groups.py index d81d98923..7c3e0ce00 100644 --- a/tests/test_holiday_groups.py +++ b/tests/test_holiday_groups.py @@ -12,7 +12,8 @@ from unittest import TestCase -from holidays.groups import ChristianHolidays, InternationalHolidays +from holidays.calendars.thai import KHMER_CALENDAR +from holidays.groups import ChristianHolidays, InternationalHolidays, ThaiCalendarHolidays from holidays.holiday_base import HolidayBase @@ -57,3 +58,30 @@ def __init__(self, *args, **kwargs): ValueError, lambda: test_holidays._add_childrens_day("Invalid", "INVALID_TYPE"), ) + + +class TestThaiCalendarHolidays(TestCase): + def test_add_thai_calendar_holiday(self): + # Check for out-of-range dates. + class TestHolidays(HolidayBase, ThaiCalendarHolidays): + def __init__(self, *args, **kwargs): + ThaiCalendarHolidays.__init__(self) + super().__init__(*args, **kwargs) + + test_holidays = TestHolidays() + + test_holidays._populate(2158) + test_holidays._add_asarnha_bucha("Asarnha Bucha") + test_holidays._add_boun_haw_khao_padapdin("Boun Haw Khao Padapdin") + test_holidays._add_boun_haw_khao_salark("Boun Haw Khao Salark") + test_holidays._add_boun_suang_heua("Boun Suang Huea") + test_holidays._add_khao_phansa("Khao Phansa") + test_holidays._add_loy_krathong("Loy Krathong") + test_holidays._add_makha_bucha("Makha Bucha") + test_holidays._add_makha_bucha("Meak Bochea", KHMER_CALENDAR) + test_holidays._add_ok_phansa("Ok Phansa") + test_holidays._add_pchum_ben("Pchum Ben") + test_holidays._add_preah_neangkoal("Royal Ploughing Ceremony (Cambodia)") + test_holidays._add_visakha_bucha("Visakha Bucha") + test_holidays._add_visakha_bucha("Visaka Bochea", KHMER_CALENDAR) + self.assertEqual(0, len(test_holidays)) From 522df1dda00ac57ba33cd749fa16fd7a7a43289e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:04:41 -0700 Subject: [PATCH 22/32] Bump ruff from 0.7.0 to 0.7.1 (#2095) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 8ea5656fa..0df59ddea 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.4.0 -ruff==0.7.0 +ruff==0.7.1 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 From 0ae7f419390da73ba6c37d8bd670869ebd886097 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:05:16 +0000 Subject: [PATCH 23/32] Bump pytest-cov from 5.0.0 to 6.0.0 (#2096) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/tests.txt b/requirements/tests.txt index d1c591b28..1f79d2139 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -5,7 +5,7 @@ importlib-metadata==8.5.0 numpy<2.1.0; python_version < '3.10' numpy==2.1.2; python_version >= '3.10' polib==1.2.0 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-xdist==3.6.1 pytest==8.3.3 zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability From ca990d6a8997dbc41ba6e20f8fc868e9acfc383d Mon Sep 17 00:00:00 2001 From: Panpakorn Siripanich <19505219+PPsyrius@users.noreply.github.com> Date: Fri, 1 Nov 2024 23:11:19 +0700 Subject: [PATCH 24/32] Update Indonesia holidays: `th` localization, more refractor (#2097) Co-authored-by: ~Jhellico --- README.rst | 2 +- holidays/countries/indonesia.py | 449 ++++++++++++++++++++---- holidays/locale/en_US/LC_MESSAGES/ID.po | 82 ++++- holidays/locale/id/LC_MESSAGES/ID.po | 78 +++- holidays/locale/th/LC_MESSAGES/ID.po | 195 ++++++++++ holidays/locale/uk/LC_MESSAGES/ID.po | 80 ++++- snapshots/countries/ID_COMMON.json | 358 +++++++++++++------ tests/countries/test_indonesia.py | 280 ++++++++++++--- 8 files changed, 1255 insertions(+), 269 deletions(-) create mode 100644 holidays/locale/th/LC_MESSAGES/ID.po diff --git a/README.rst b/README.rst index 9a04d173c..419aba787 100644 --- a/README.rst +++ b/README.rst @@ -513,7 +513,7 @@ All other default values are highlighted with bold: * - Indonesia - ID - - - en_US, **id**, uk + - en_US, **id**, th, uk - GOVERNMENT * - Iran - IR diff --git a/holidays/countries/indonesia.py b/holidays/countries/indonesia.py index e833a0d0e..e31e7d083 100644 --- a/holidays/countries/indonesia.py +++ b/holidays/countries/indonesia.py @@ -27,11 +27,11 @@ IslamicHolidays, StaticHolidays, ) -from holidays.holiday_base import HolidayBase +from holidays.observed_holiday_base import ObservedHolidayBase class Indonesia( - HolidayBase, + ObservedHolidayBase, BuddhistCalendarHolidays, ChineseCalendarHolidays, ChristianHolidays, @@ -42,16 +42,22 @@ class Indonesia( """ References: - https://en.wikipedia.org/wiki/Public_holidays_in_Indonesia + - https://id.wikipedia.org/wiki/Hari_libur_di_Indonesia + - https://www.liburnasional.com/sejarah/ - https://www.timeanddate.com/holidays/indonesia - - https://www.officeholidays.com/countries/indonesia - https://en.wikipedia.org/wiki/Nyepi + - https://bali.com/bali/travel-guide/culture/nyepi-balinese-new-year/ """ country = "ID" default_language = "id" # %s (estimated). estimated_label = tr("%s (perkiraan)") - supported_languages = ("en_US", "id", "uk") + # %s (observed). + observed_label = tr("Pegangti %s") + # %s (observed, estimated). + observed_estimated_label = tr("Pegangti %s (perkiraan)") + supported_languages = ("en_US", "id", "th", "uk") supported_categories = (GOVERNMENT, PUBLIC) def __init__(self, *args, **kwargs): @@ -70,10 +76,78 @@ def _populate_public_holidays(self): # New Year's Day. self._add_new_years_day(tr("Tahun Baru Masehi")) - if self._year <= 1967 or self._year >= 2003: - # Lunar New Year. - self._add_chinese_new_years_day(tr("Tahun Baru Imlek")) + # Independence Day. + self._add_holiday_aug_17(tr("Hari Kemerdekaan Republik Indonesia")) + + # Keputusan Presiden no 24 tahun 1953. (1953-01-01; Removed) + if self._year <= 1952: + # Armed Forces Day. + self._add_holiday_oct_5(tr("Hari Angkatan Perang")) + + # Heroes' Day. + self._add_holiday_nov_10(tr("Hari Pahlawan")) + + # Keputusan Presiden no 24 tahun 1953. (1953-01-01; Added Nationally) + if self._year >= 1953: + # Christmas Day. + self._add_christmas_day(tr("Hari Raya Natal")) + + # Eid al-Fitr. + self._add_eid_al_fitr_day(tr("Hari Raya Idul Fitri")) + + # Eid al-Fitr Second Day. + self._add_eid_al_fitr_day_two(tr("Hari kedua dari Hari Raya Idul Fitri")) + + # Eid al-Adha. + self._add_eid_al_adha_day(tr("Hari Raya Idul Adha")) + + # Keputusan Presiden no 24 tahun 1953. (1953-01-01; Added Nationally) + # Keputusan Presiden no 21 tahun 1963. (1963-10-15; Moved to Denominative-based) + # Keputusan Presiden no 251 tahun 1967. (1967-12-16; Removed) + if 1953 <= self._year <= 1963: + # Easter Monday. + self._add_easter_monday(tr("Hari kedua Paskah")) + + # Whit Monday. + self._add_whit_monday(tr("Hari kedua Pentakosta")) + + # Nuzul Al Quran. + self._add_nuzul_al_quran_day(tr("Nuzululqur'an")) + + # Keputusan Presiden no 24 tahun 1953. (1953-01-01; Added Nationally) + # Keputusan Presiden no 21 tahun 1963. (1963-10-15; Moved to Denominative-based) + # Keputusan Presiden no 251 tahun 1967. (1967-12-16; Added Nationally) + if 1953 <= self._year <= 1962 or self._year >= 1968: + # Isra' and Mi'raj. + self._add_isra_and_miraj_day(tr("Isra Mikraj Nabi Muhammad")) + + # (Same as above, was before 1963 cut-off date) + if 1953 <= self._year <= 1963 or self._year >= 1968: + # Ascension Day. + self._add_ascension_thursday(tr("Kenaikan Yesus Kristus")) + # Islamic New Year. + self._add_islamic_new_year_day(tr("Tahun Baru Islam")) + + # Prophet's Birthday. + self._add_mawlid_day(tr("Maulid Nabi Muhammad")) + + # Keputusan Presiden no 21 tahun 1963. (1963-10-15; Added Denominative-based) + # Keputusan Presiden no 251 tahun 1967. (1967-12-16; Added Nationally) + # Keputusan Presiden no 10 tahun 1971. (1971-03-15; Removed) + if 1968 <= self._year <= 1970: + # Assumption Day. + self._add_assumption_of_mary_day(tr("Mikraj Santa Maria")) + + # Keputusan Presiden no 24 tahun 1953. (1953-01-01; Added Nationally) + # Keputusan Presiden no 21 tahun 1963. (1963-10-15; Moved to Denominative-based) + # Keputusan Presiden no 251 tahun 1967. (1967-12-16; Removed) + # Keputusan Presiden no 10 tahun 1971. (1971-03-15; Added Nationally) + if 1953 <= self._year <= 1963 or self._year >= 1971: + # Good Friday. + self._add_good_friday(tr("Wafat Yesus Kristus")) + + # Keputusan Presiden no 3 tahun 1983. (1983-01-19; Added Nationally) if self._year >= 1983: dates_obs = { 2009: (MAR, 26), @@ -94,79 +168,40 @@ def _populate_public_holidays(self): 2024: (MAR, 11), 2025: (MAR, 29), 2026: (MAR, 19), + 2027: (MAR, 8), + 2028: (MAR, 26), + 2029: (MAR, 15), + 2030: (MAR, 5), } if self._year in dates_obs: # Day of Silence. self._add_holiday(tr("Hari Suci Nyepi"), dates_obs[self._year]) - if 1953 <= self._year <= 1962 or self._year >= 1971: - # Good Friday. - self._add_good_friday(tr("Wafat Yesus Kristus")) - - if 1953 <= self._year <= 1962: - # Easter Monday. - self._add_easter_monday(tr("Hari kedua Paskah")) - - if self._year >= 1983: - # Buddha's Birthday. + # Vesak Day. self._add_vesak(tr("Hari Raya Waisak")) - if 1953 <= self._year <= 1968 or self._year >= 2014: + # Keputusan Presiden no 19 tahun 2002. (2002-04-09; Added Nationally) + if self._year >= 2003: + # Lunar New Year. + self._add_chinese_new_years_day(tr("Tahun Baru Imlek")) + + # Keputusan Presiden no 24 tahun 1953. (1953-01-01; Added Nationally) + # Keputusan Presiden no 148 tahun 1968. (1968-04-18; Removed) + # Keputusan Presiden no 24 tahun 2013. (2013-07-29; Added Nationally) + if 1953 <= self._year <= 1967 or self._year >= 2014: # International Labor Day. self._add_labor_day(tr("Hari Buruh Internasional")) - if 1953 <= self._year <= 1962 or self._year >= 1968: - # Ascension Day. - self._add_ascension_thursday(tr("Kenaikan Yesus Kristus")) - - if 1953 <= self._year <= 1962: - # Whit Monday. - self._add_whit_monday(tr("Hari kedua Pentakosta")) - + # Keputusan Presiden no 24 tahun 2016. (2016-06-01; Added Nationally) if self._year >= 2016: # Pancasila Day. self._add_holiday_jun_1(tr("Hari Lahir Pancasila")) - if 1968 <= self._year <= 1970: - # Assumption Day. - self._add_assumption_of_mary_day(tr("Mikraj Santa Maria")) - - # Independence Day. - self._add_holiday_aug_17(tr("Hari Kemerdekaan Republik Indonesia")) - - if self._year <= 1952: - # Armed Forces Day. - self._add_holiday_oct_5(tr("Hari Angkatan Perang")) - - # Heroes' Day. - self._add_holiday_nov_10(tr("Hari Pahlawan")) - - if self._year >= 1953: - # Christmas Day. - self._add_christmas_day(tr("Hari Raya Natal")) - - # Eid al-Fitr. - self._add_eid_al_fitr_day(tr("Hari Raya Idulfitri")) - - # Eid al-Fitr Second Day. - self._add_eid_al_fitr_day_two(tr("Hari kedua dari Hari Raya Idulfitri")) - - # Eid al-Adha. - self._add_eid_al_adha_day(tr("Hari Raya Iduladha")) - - if 1953 <= self._year <= 1962 or self._year >= 1968: - # Islamic New Year. - self._add_islamic_new_year_day(tr("Tahun Baru Islam")) - - # Prophet's Birthday. - self._add_mawlid_day(tr("Maulid Nabi Muhammad")) - - # Isra' and Mi'raj. - self._add_isra_and_miraj_day(tr("Isra Mikraj Nabi Muhammad")) - - if 1953 <= self._year <= 1962: - # Nuzul Al Quran. - self._add_nuzul_al_quran_day(tr("Nuzululqur'an")) + # Keputusan Presiden no 8 tahun 2024. (2024-01-29; Added Nationally) + # This KEPPRES overwrites all pre-existing ones. + if self._year >= 2024: + # Easter Sunday. + self._add_easter_sunday(tr("Kebangkitan Yesus Kristus")) class ID(Indonesia): @@ -196,6 +231,8 @@ class IndonesiaBuddhistHolidays(_CustomBuddhistHolidays): 2021: (MAY, 26), 2022: (MAY, 16), 2023: (JUN, 4), + 2024: (MAY, 23), + 2025: (MAY, 12), } @@ -222,6 +259,8 @@ class IndonesiaChineseHolidays(_CustomChineseHolidays): 2021: (FEB, 12), 2022: (FEB, 1), 2023: (JAN, 22), + 2024: (FEB, 10), + 2025: (JAN, 29), } @@ -250,6 +289,8 @@ class IndonesiaIslamicHolidays(_CustomIslamicHolidays): 2021: (JUL, 20), 2022: (JUL, 10), 2023: (JUN, 29), + 2024: (JUN, 17), + 2025: (JUN, 6), } EID_AL_FITR_DATES = { @@ -277,6 +318,7 @@ class IndonesiaIslamicHolidays(_CustomIslamicHolidays): 2022: (MAY, 2), 2023: (APR, 22), 2024: (APR, 10), + 2025: (MAR, 31), } HIJRI_NEW_YEAR_DATES = { @@ -303,6 +345,8 @@ class IndonesiaIslamicHolidays(_CustomIslamicHolidays): 2021: (AUG, 11), 2022: (JUL, 30), 2023: (JUL, 19), + 2024: (JUL, 7), + 2025: (JUN, 27), } ISRA_AND_MIRAJ_DATES = { @@ -329,6 +373,8 @@ class IndonesiaIslamicHolidays(_CustomIslamicHolidays): 2021: (MAR, 11), 2022: (FEB, 28), 2023: (FEB, 18), + 2024: (FEB, 6), + 2025: (JAN, 27), } MAWLID_DATES = { @@ -349,33 +395,260 @@ class IndonesiaIslamicHolidays(_CustomIslamicHolidays): 2020: (OCT, 29), 2021: (OCT, 19), 2022: (OCT, 8), + 2023: (SEP, 28), + 2024: (SEP, 16), + 2025: (SEP, 5), } class IndonesiaStaticHolidays: - # Election Day. - election_day = tr("Hari Pemilihan") + """ + References (Election Days): + - https://peraturan.bpk.go.id/Details/58370/keppres-no-53-tahun-1999 + - https://peraturan.bpk.go.id/Details/55580/keppres-no-26-tahun-2004 + - https://peraturan.bpk.go.id/Details/55662/keppres-no-55-tahun-2004 + - https://peraturan.bpk.go.id/Details/55763/keppres-no-75-tahun-2004 + - https://peraturan.bpk.go.id/Details/55345/keppres-no-7-tahun-2009 + - https://peraturan.bpk.go.id/Details/55369/keppres-no-17-tahun-2009 + - https://peraturan.bpk.go.id/Details/57563/keppres-no-14-tahun-2014 + - https://peraturan.bpk.go.id/Details/57581/keppres-no-24-tahun-2014 + - https://peraturan.bpk.go.id/Details/54477/keppres-no-25-tahun-2015 + - https://peraturan.bpk.go.id/Details/57397/keppres-no-3-tahun-2017 + - https://peraturan.bpk.go.id/Details/82669/keppres-no-15-tahun-2018 + - https://peraturan.bpk.go.id/Details/104497/keppres-no-10-tahun-2019 + - https://peraturan.bpk.go.id/Details/152704/keppres-no-22-tahun-2020 + - https://peraturan.bpk.go.id/Details/277337/keppres-no-10-tahun-2024 + + References (Joint Holidays): + - https://data.santoslolowang.com/viewing/Agama_Nasional_Indonesia/kepbersama_2002.pdf/ + - https://nasional.tempo.co/read/5515/tahun-depan-libur-hari-raya-berubah + - https://nasional.tempo.co/read/45224/2005-pemerintah-tetapkan-13-hari-libur-nasional + - https://news.detik.com/berita/d-562326/30-maret-libur-hari-nyepi-31-maret-ditetapkan-cuti-bersama + - https://news.detik.com/berita/d-836627/dari-12-hari-jatah-cuti-tahun-ini-dipaksa-cuti-bareng-11-hari + - https://news.detik.com/berita/d-787189/inilah-jadwal-libur-dan-cuti-bersama-2008 + - https://news.detik.com/berita/d-889403/cuti-bersama-dihapus-sisa-4-hari-untuk-lebaran-natal + - https://news.detik.com/berita/d-1263142/kamis-24-desember-cuti-bersama + - https://news.detik.com/berita/d-1179419/daftar-libur-dan-cuti-bersama-2010 + - https://news.detik.com/berita/d-1378563/daftar-hari-libur-nasional-dan-cuti-bersama-2011 + - https://news.detik.com/berita/d-1639209/pemerintah-tetapkan-senin-16-mei-2011-cuti-bersama + - https://news.detik.com/berita/d-1831855/cuti-bersama-tahun-2012-bertambah-1-hari-jadi-6-hari + - https://news.detik.com/berita/d-1969257/ini-dia-jadwal-hari-libur-nasional-cuti-bersama-tahun-2013 + - https://news.detik.com/berita/d-2335984/daftar-cuti-bersama-dan-hari-libur-nasional-2014-termasuk-may-day + - https://news.detik.com/berita/d-2576131/ini-daftar-hari-libur-dan-cuti-bersama-tahun-2015 + - https://bkpsdm.salatiga.go.id/pelaksanaan-hari-libur-nasional-dan-cuti-bersama-tahun-2015.html + - https://news.detik.com/berita/d-2952083/ini-rincian-libur-dan-cuti-bersama-2016 + - https://setkab.go.id/tidak-kurangi-hak-cuti-tahunan-presiden-jokowi-tetapkan-23-juni-sebagai-cuti-bersama-idul-fitri/ + - https://setkab.go.id/pelayanan-publik-tetap-jalan-presiden-jokowi-tetapkan-cuti-bersama-pns-tahun-2018/ + - https://setkab.go.id/keppres-no-132019-cuti-bersama-pns-pada-idul-fitri-1440h-tanggal-3-4-dan-7-juni/ + - https://setkab.go.id/pemerintah-keluarkan-skb-3-menteri-hapus-tiga-hari-cuti-bersama-2020/ + - https://setkab.go.id/inilah-perubahan-hari-libur-nasional-dan-cuti-bersama-tahun-2021/ + - https://setkab.go.id/presiden-jokowi-terbitkan-keppres-4-tahun-2022-tentang-cuti-bersama-asn-tahun-2022/ + - https://news.detik.com/berita/d-6468002/apakah-ada-cuti-bersama-natal-2022-cek-infonya-di-sini + - https://setkab.go.id/presiden-tandatangani-keppres-perubahan-cuti-bersama-bagi-asn/ + - https://setkab.go.id/inilah-keppres-7-2024-tentang-cuti-bersama-asn-tahun-2024/ + - https://setkab.go.id/pemerintah-tetapkan-hari-libur-nasional-dan-cuti-bersama-tahun-2025/ + """ + + # General Election Day. + general_election_day = tr("Hari Pemilihan Unum") + # Presidential Election Day. + presidential_election_day = tr("Hari Pemilihan Presiden") + # Legislative Election Day. + legislative_election_day = tr("Hari Pemilihan Legislatif") + # Local Election Day. + local_election_day = tr("Hari Pemilihan Kepala Daerah") + # Eid al-Fitr Joint Holiday. - eid_al_fitr_joint_holiday = tr("Cuti Bersama Hari Raya Idulfitri") + eid_al_fitr_joint_holiday = tr("Cuti Bersama Hari Raya Idul Fitri") + # Eid al-Adha Joint Holiday. + eid_al_adha_joint_holiday = tr("Cuti Bersama Hari Raya Idul Adha") + # Prophet's Birthday Joint Holiday. + mawlid_joint_holiday = tr("Cuti Bersama Maulid Nabi Muhammad") + # Islamic New Year Joint Holiday. + islamic_new_year_joint_holiday = tr("Cuti Bersama Tahun Baru Islam") + # Ascension Joint Holiday. + ascension_joint_holiday = tr("Cuti Bersama Kenaikan Yesus Kristus") # Christmas Joint Holiday. christmas_joint_holiday = tr("Cuti Bersama Hari Raya Natal") # Lunar New Year Joint Holiday. lunar_new_year_joint_holiday = tr("Cuti Bersama Tahun Baru Imlek") # Day of Silence Joint Holiday. day_of_silence_joint_holiday = tr("Cuti Bersama Hari Suci Nyepi") + # Vesak Joint Holiday. + vesak_joint_holiday = tr("Cuti Bersama Hari Raya Waisak") + # New Year's Joint Holiday. + new_years_joint_holiday = tr("Cuti Bersama Tahun Baru Masehi") special_public_holidays = { - 2018: (JUN, 27, election_day), - 2019: (APR, 17, election_day), - 2020: (DEC, 9, election_day), + 1999: (JUN, 7, legislative_election_day), + 2004: ( + (APR, 5, legislative_election_day), + (JUL, 5, presidential_election_day), + (SEP, 20, presidential_election_day), + ), + 2009: ( + (APR, 9, legislative_election_day), + (JUL, 8, presidential_election_day), + ), + 2014: ( + (APR, 9, legislative_election_day), + (JUL, 9, presidential_election_day), + ), + 2015: (DEC, 9, local_election_day), + 2017: (FEB, 15, local_election_day), + 2018: (JUN, 27, local_election_day), + 2019: (APR, 17, general_election_day), + 2020: (DEC, 9, local_election_day), + 2024: (FEB, 14, general_election_day), + } + special_public_holidays_observed = { + # Eid al-Fitr. + 2004: (NOV, 16, tr("Hari Raya Idul Fitri")), } special_government_holidays = { + # Cuti Bersama (Joint Holidays/Collective Leaves). + # This was first implemented in 2002. + 2002: ( + (DEC, 5, eid_al_fitr_joint_holiday), + (DEC, 9, eid_al_fitr_joint_holiday), + (DEC, 10, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2003: ( + (NOV, 24, eid_al_fitr_joint_holiday), + (NOV, 27, eid_al_fitr_joint_holiday), + (NOV, 28, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2004: ( + (NOV, 17, eid_al_fitr_joint_holiday), + (NOV, 18, eid_al_fitr_joint_holiday), + (NOV, 19, eid_al_fitr_joint_holiday), + ), + 2005: ( + (NOV, 2, eid_al_fitr_joint_holiday), + (NOV, 5, eid_al_fitr_joint_holiday), + (NOV, 7, eid_al_fitr_joint_holiday), + (NOV, 8, eid_al_fitr_joint_holiday), + ), + 2006: ( + (MAR, 31, day_of_silence_joint_holiday), + (MAY, 26, ascension_joint_holiday), + # Independence Day Joint Holiday. + (AUG, 18, tr("Cuti Bersama Hari Kemerdekaan Republik Indonesia")), + (OCT, 23, eid_al_fitr_joint_holiday), + (OCT, 26, eid_al_fitr_joint_holiday), + (OCT, 27, eid_al_fitr_joint_holiday), + ), + 2007: ( + (MAY, 18, ascension_joint_holiday), + (OCT, 12, eid_al_fitr_joint_holiday), + (OCT, 15, eid_al_fitr_joint_holiday), + (OCT, 16, eid_al_fitr_joint_holiday), + (OCT, 17, eid_al_fitr_joint_holiday), + (OCT, 18, eid_al_fitr_joint_holiday), + (OCT, 19, eid_al_fitr_joint_holiday), + (DEC, 21, christmas_joint_holiday), + (DEC, 24, christmas_joint_holiday), + (DEC, 26, christmas_joint_holiday), + (DEC, 31, new_years_joint_holiday), + ), + 2008: ( + (JAN, 11, islamic_new_year_joint_holiday), + (SEP, 29, eid_al_fitr_joint_holiday), + (SEP, 30, eid_al_fitr_joint_holiday), + (OCT, 3, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2009: ( + (JAN, 2, new_years_joint_holiday), + (SEP, 18, eid_al_fitr_joint_holiday), + (SEP, 23, eid_al_fitr_joint_holiday), + (DEC, 24, christmas_joint_holiday), + ), + 2010: ( + (SEP, 9, eid_al_fitr_joint_holiday), + (SEP, 13, eid_al_fitr_joint_holiday), + (DEC, 24, christmas_joint_holiday), + ), + 2011: ( + (MAY, 16, vesak_joint_holiday), + (AUG, 29, eid_al_fitr_joint_holiday), + (SEP, 1, eid_al_fitr_joint_holiday), + (SEP, 2, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2012: ( + (MAY, 18, ascension_joint_holiday), + (AUG, 21, eid_al_fitr_joint_holiday), + (AUG, 22, eid_al_fitr_joint_holiday), + (NOV, 16, islamic_new_year_joint_holiday), + (DEC, 24, christmas_joint_holiday), + (DEC, 31, new_years_joint_holiday), + ), + 2013: ( + (AUG, 5, eid_al_fitr_joint_holiday), + (AUG, 6, eid_al_fitr_joint_holiday), + (AUG, 7, eid_al_fitr_joint_holiday), + (OCT, 14, eid_al_adha_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2014: ( + (JUL, 30, eid_al_fitr_joint_holiday), + (JUL, 31, eid_al_fitr_joint_holiday), + (AUG, 1, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2015: ( + (JUL, 16, eid_al_fitr_joint_holiday), + (JUL, 20, eid_al_fitr_joint_holiday), + (JUL, 21, eid_al_fitr_joint_holiday), + ), + 2016: ( + (JUL, 4, eid_al_fitr_joint_holiday), + (JUL, 5, eid_al_fitr_joint_holiday), + (JUL, 8, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2017: ( + (JUN, 23, eid_al_fitr_joint_holiday), + (JUN, 27, eid_al_fitr_joint_holiday), + (JUN, 28, eid_al_fitr_joint_holiday), + (JUN, 29, eid_al_fitr_joint_holiday), + (JUN, 30, eid_al_fitr_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2018: ( + (JUN, 11, eid_al_fitr_joint_holiday), + (JUN, 12, eid_al_fitr_joint_holiday), + (JUN, 13, eid_al_fitr_joint_holiday), + (JUN, 14, eid_al_fitr_joint_holiday), + (JUN, 18, eid_al_fitr_joint_holiday), + (JUN, 19, eid_al_fitr_joint_holiday), + (JUN, 20, eid_al_fitr_joint_holiday), + (DEC, 24, christmas_joint_holiday), + ), + 2019: ( + (JUN, 3, eid_al_fitr_joint_holiday), + (JUN, 4, eid_al_fitr_joint_holiday), + (JUN, 7, eid_al_fitr_joint_holiday), + (DEC, 24, christmas_joint_holiday), + ), + 2020: ( + (AUG, 21, islamic_new_year_joint_holiday), + (OCT, 28, mawlid_joint_holiday), + (OCT, 30, mawlid_joint_holiday), + (DEC, 24, christmas_joint_holiday), + ), + 2021: ( + (MAY, 12, eid_al_fitr_joint_holiday), + (DEC, 24, christmas_joint_holiday), + ), 2022: ( (APR, 29, eid_al_fitr_joint_holiday), (MAY, 4, eid_al_fitr_joint_holiday), (MAY, 5, eid_al_fitr_joint_holiday), (MAY, 6, eid_al_fitr_joint_holiday), - (DEC, 26, christmas_joint_holiday), ), 2023: ( (JAN, 23, lunar_new_year_joint_holiday), @@ -385,6 +658,36 @@ class IndonesiaStaticHolidays: (APR, 21, eid_al_fitr_joint_holiday), (APR, 24, eid_al_fitr_joint_holiday), (APR, 25, eid_al_fitr_joint_holiday), + (JUN, 2, vesak_joint_holiday), + (JUN, 28, eid_al_adha_joint_holiday), + (JUN, 30, eid_al_adha_joint_holiday), (DEC, 26, christmas_joint_holiday), ), + 2024: ( + (FEB, 9, lunar_new_year_joint_holiday), + (MAR, 12, day_of_silence_joint_holiday), + (APR, 8, eid_al_fitr_joint_holiday), + (APR, 9, eid_al_fitr_joint_holiday), + (APR, 12, eid_al_fitr_joint_holiday), + (APR, 15, eid_al_fitr_joint_holiday), + (MAY, 10, ascension_joint_holiday), + (MAY, 24, vesak_joint_holiday), + (JUN, 18, eid_al_adha_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + 2025: ( + (JAN, 28, lunar_new_year_joint_holiday), + (MAR, 28, day_of_silence_joint_holiday), + (APR, 2, eid_al_fitr_joint_holiday), + (APR, 3, eid_al_fitr_joint_holiday), + (APR, 4, eid_al_fitr_joint_holiday), + (APR, 7, eid_al_fitr_joint_holiday), + (MAY, 13, vesak_joint_holiday), + (MAY, 30, ascension_joint_holiday), + (JUN, 9, eid_al_adha_joint_holiday), + (DEC, 26, christmas_joint_holiday), + ), + } + special_government_holidays_observed = { + 2020: (DEC, 31, eid_al_fitr_joint_holiday), } diff --git a/holidays/locale/en_US/LC_MESSAGES/ID.po b/holidays/locale/en_US/LC_MESSAGES/ID.po index 4f0357b78..5f5e5fd28 100644 --- a/holidays/locale/en_US/LC_MESSAGES/ID.po +++ b/holidays/locale/en_US/LC_MESSAGES/ID.po @@ -14,30 +14,42 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.57\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-07-23 14:09+0300\n" -"PO-Revision-Date: 2024-09-07 17:22+0300\n" -"Last-Translator: ~Jhellico \n" -"Language-Team: Holidays localization team\n" +"PO-Revision-Date: 2024-10-30 16:44+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" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" #. %s (estimated). #, c-format msgid "%s (perkiraan)" msgstr "%s (estimated)" -#. Election Day. -msgid "Hari Pemilihan" -msgstr "Election Day" +#. General Election Day. +msgid "Hari Pemilihan Unum" +msgstr "General Election Day" + +#. Presidential Election Day. +msgid "Hari Pemilihan Presiden" +msgstr "Presidential Election Day" + +#. Legislative Election Day. +msgid "Hari Pemilihan Legislatif" +msgstr "Legislative Election Day" + +#. Local Election Day. +msgid "Hari Pemilihan Kepala Daerah" +msgstr "Local Election Day" #. Eid al-Fitr Joint Holiday. -msgid "Cuti Bersama Hari Raya Idulfitri" +msgid "Cuti Bersama Hari Raya Idul Fitri" msgstr "Eid al-Fitr Joint Holiday" #. Christmas Joint Holiday. @@ -72,9 +84,9 @@ msgstr "Good Friday" msgid "Hari kedua Paskah" msgstr "Easter Monday" -#. Buddha's Birthday. +#. Vesak Day. msgid "Hari Raya Waisak" -msgstr "Buddha's Birthday" +msgstr "Vesak Day" #. International Labor Day. msgid "Hari Buruh Internasional" @@ -113,15 +125,15 @@ msgid "Hari Raya Natal" msgstr "Christmas Day" #. Eid al-Fitr. -msgid "Hari Raya Idulfitri" +msgid "Hari Raya Idul Fitri" msgstr "Eid al-Fitr" #. Eid al-Fitr Second Day. -msgid "Hari kedua dari Hari Raya Idulfitri" +msgid "Hari kedua dari Hari Raya Idul Fitri" msgstr "Eid al-Fitr Second Day" #. Eid al-Adha. -msgid "Hari Raya Iduladha" +msgid "Hari Raya Idul Adha" msgstr "Eid al-Adha" #. Islamic New Year. @@ -139,3 +151,45 @@ msgstr "Isra' and Mi'raj" #. Nuzul Al Quran. msgid "Nuzululqur'an" msgstr "Nuzul Al Quran" + +#. Eid al-Adha Joint Holiday. +msgid "Cuti Bersama Hari Raya Idul Adha" +msgstr "Eid al-Adha Joint Holiday" + +#. Prophet's Birthday Joint Holiday. +msgid "Cuti Bersama Maulid Nabi Muhammad" +msgstr "Prophet's Birthday Joint Holiday" + +#. Ascension Joint Holiday. +msgid "Cuti Bersama Kenaikan Yesus Kristus" +msgstr "Ascension Joint Holiday" + +#. Vesak Joint Holiday. +msgid "Cuti Bersama Hari Raya Waisak" +msgstr "Vesak Joint Holiday" + +#. %s (observed). +#, c-format +msgid "Pegangti %s" +msgstr "%s (observed)" + +#. %s (observed, estimated). +#, c-format +msgid "Pegangti %s (perkiraan)" +msgstr "%s (observed, estimated)" + +#. Islamic New Year Joint Holiday. +msgid "Cuti Bersama Tahun Baru Islam" +msgstr "Islamic New Year Joint Holiday" + +#. New Year's Joint Holiday. +msgid "Cuti Bersama Tahun Baru Masehi" +msgstr "New Year's Joint Holiday" + +#. Independence Day Joint Holiday. +msgid "Cuti Bersama Hari Kemerdekaan Republik Indonesia" +msgstr "Independence Day Joint Holiday" + +#. Easter Sunday. +msgid "Kebangkitan Yesus Kristus" +msgstr "Easter Sunday" diff --git a/holidays/locale/id/LC_MESSAGES/ID.po b/holidays/locale/id/LC_MESSAGES/ID.po index e2aff91e2..558f44415 100644 --- a/holidays/locale/id/LC_MESSAGES/ID.po +++ b/holidays/locale/id/LC_MESSAGES/ID.po @@ -14,30 +14,42 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.30\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-07-23 14:09+0300\n" -"PO-Revision-Date: 2023-07-23 14:12+0300\n" -"Last-Translator: ~Jhellico \n" -"Language-Team: Holidays localization team\n" +"PO-Revision-Date: 2024-10-30 16:45+0700\n" +"Last-Translator: PPsyrius \n" +"Language-Team: Holidays Localization Team\n" "Language: id\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" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.5\n" #. %s (estimated). #, c-format msgid "%s (perkiraan)" msgstr "" -#. Election Day. -msgid "Hari Pemilihan" +#. General Election Day. +msgid "Hari Pemilihan Unum" +msgstr "" + +#. Presidential Election Day. +msgid "Hari Pemilihan Presiden" +msgstr "" + +#. Legislative Election Day. +msgid "Hari Pemilihan Legislatif" +msgstr "" + +#. Local Election Day. +msgid "Hari Pemilihan Kepala Daerah" msgstr "" #. Eid al-Fitr Joint Holiday. -msgid "Cuti Bersama Hari Raya Idulfitri" +msgid "Cuti Bersama Hari Raya Idul Fitri" msgstr "" #. Christmas Joint Holiday. @@ -72,7 +84,7 @@ msgstr "" msgid "Hari kedua Paskah" msgstr "" -#. Buddha's Birthday. +#. Vesak Day. msgid "Hari Raya Waisak" msgstr "" @@ -113,15 +125,15 @@ msgid "Hari Raya Natal" msgstr "" #. Eid al-Fitr. -msgid "Hari Raya Idulfitri" +msgid "Hari Raya Idul Fitri" msgstr "" #. Eid al-Fitr Second Day. -msgid "Hari kedua dari Hari Raya Idulfitri" +msgid "Hari kedua dari Hari Raya Idul Fitri" msgstr "" #. Eid al-Adha. -msgid "Hari Raya Iduladha" +msgid "Hari Raya Idul Adha" msgstr "" #. Islamic New Year. @@ -139,3 +151,45 @@ msgstr "" #. Nuzul Al Quran. msgid "Nuzululqur'an" msgstr "" + +#. Eid al-Adha Joint Holiday. +msgid "Cuti Bersama Hari Raya Idul Adha" +msgstr "" + +#. Prophet's Birthday Joint Holiday. +msgid "Cuti Bersama Maulid Nabi Muhammad" +msgstr "" + +#. Ascension Joint Holiday. +msgid "Cuti Bersama Kenaikan Yesus Kristus" +msgstr "" + +#. Vesak Joint Holiday. +msgid "Cuti Bersama Hari Raya Waisak" +msgstr "" + +#. %s (observed). +#, c-format +msgid "Pegangti %s" +msgstr "" + +#. %s (observed, estimated). +#, c-format +msgid "Pegangti %s (perkiraan)" +msgstr "" + +#. Islamic New Year Joint Holiday. +msgid "Cuti Bersama Tahun Baru Islam" +msgstr "" + +#. New Year's Joint Holiday. +msgid "Cuti Bersama Tahun Baru Masehi" +msgstr "" + +#. Independence Day Joint Holiday. +msgid "Cuti Bersama Hari Kemerdekaan Republik Indonesia" +msgstr "" + +#. Easter Sunday. +msgid "Kebangkitan Yesus Kristus" +msgstr "" diff --git a/holidays/locale/th/LC_MESSAGES/ID.po b/holidays/locale/th/LC_MESSAGES/ID.po new file mode 100644 index 000000000..d5d6c2ad0 --- /dev/null +++ b/holidays/locale/th/LC_MESSAGES/ID.po @@ -0,0 +1,195 @@ +# holidays +# -------- +# A fast, efficient Python library for generating country, province and state +# specific sets of holidays on the fly. It aims to make determining whether a +# specific date is a holiday as fast and flexible as possible. +# +# Authors: Vacanza Team and individual contributors (see AUTHORS file) +# dr-prodigy (c) 2017-2023 +# ryanss (c) 2014-2017 +# Website: https://github.com/vacanza/holidays +# License: MIT (see LICENSE file) +# +# Indonesia holidays th localization. +# +msgid "" +msgstr "" +"Project-Id-Version: Holidays 0.60\n" +"POT-Creation-Date: 2023-07-23 14:09+0300\n" +"PO-Revision-Date: 2024-10-30 17:08+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" +"Generated-By: Lingua 4.15.0\n" +"X-Generator: Poedit 3.5\n" + +#. %s (estimated). +#, c-format +msgid "%s (perkiraan)" +msgstr "%s (โดยประมาณ)" + +#. General Election Day. +msgid "Hari Pemilihan Unum" +msgstr "วันเลือกตั้งทั่วไป" + +#. Presidential Election Day. +msgid "Hari Pemilihan Presiden" +msgstr "วันเลือกตั้งประธานาธิบดี" + +#. Legislative Election Day. +msgid "Hari Pemilihan Legislatif" +msgstr "วันเลือกตั้งสมาชิกสภาผู้แทนราษฎร" + +#. Local Election Day. +msgid "Hari Pemilihan Kepala Daerah" +msgstr "วันเลือกตั้งท้องถิ่น" + +#. Eid al-Fitr Joint Holiday. +msgid "Cuti Bersama Hari Raya Idul Fitri" +msgstr "หยุดร่วมพิเศษวันอีฎิ้ลฟิตริ" + +#. Christmas Joint Holiday. +msgid "Cuti Bersama Hari Raya Natal" +msgstr "หยุดร่วมพิเศษวันคริสต์มาส" + +#. Lunar New Year Joint Holiday. +msgid "Cuti Bersama Tahun Baru Imlek" +msgstr "หยุดร่วมพิเศษวันตรุษจีน" + +#. Day of Silence Joint Holiday. +msgid "Cuti Bersama Hari Suci Nyepi" +msgstr "หยุดร่วมพิเศษวันแห่งความเงียบ" + +#. New Year's Day. +msgid "Tahun Baru Masehi" +msgstr "วันขึ้นปีใหม่" + +#. Lunar New Year. +msgid "Tahun Baru Imlek" +msgstr "วันตรุษจีน" + +#. Day of Silence. +msgid "Hari Suci Nyepi" +msgstr "วันแห่งความเงียบ" + +#. Good Friday. +msgid "Wafat Yesus Kristus" +msgstr "วันศุกร์ประเสริฐ" + +#. Easter Monday. +msgid "Hari kedua Paskah" +msgstr "วันจันทร์อีสเตอร์" + +#. Vesak Day. +msgid "Hari Raya Waisak" +msgstr "วันวิสาขบูชา" + +#. International Labor Day. +msgid "Hari Buruh Internasional" +msgstr "วันแรงงานสากล" + +#. Ascension Day. +msgid "Kenaikan Yesus Kristus" +msgstr "วันสมโภชพระเยซูเจ้าเสด็จขึ้นสวรรค์" + +#. Whit Monday. +msgid "Hari kedua Pentakosta" +msgstr "วันจันทร์หลังวันสมโภชพระจิตเจ้า" + +#. Pancasila Day. +msgid "Hari Lahir Pancasila" +msgstr "วันปัญจศีล" + +#. Assumption Day. +msgid "Mikraj Santa Maria" +msgstr "วันสมโภชแม่พระรับเกียรติยกขึ้นสวรรค์" + +#. Independence Day. +msgid "Hari Kemerdekaan Republik Indonesia" +msgstr "วันประกาศอิสรภาพสาธารณรัฐอินโดนีเซีย" + +#. Armed Forces Day. +msgid "Hari Angkatan Perang" +msgstr "วันกองทัพสาธารณรัฐอินโดนีเซีย" + +#. Heroes' Day. +msgid "Hari Pahlawan" +msgstr "วันวีรบุรุษอินโดนีเซีย" + +#. Christmas Day. +msgid "Hari Raya Natal" +msgstr "วันคริสต์มาส" + +#. Eid al-Fitr. +msgid "Hari Raya Idul Fitri" +msgstr "วันอีฎิ้ลฟิตริ" + +#. Eid al-Fitr Second Day. +msgid "Hari kedua dari Hari Raya Idul Fitri" +msgstr "วันอีฎิ้ลฟิตริวันที่สอง" + +#. Eid al-Adha. +msgid "Hari Raya Idul Adha" +msgstr "วันอีดิ้ลอัฎฮา" + +#. Islamic New Year. +msgid "Tahun Baru Islam" +msgstr "วันขึ้นปีใหม่อิสลาม" + +#. Prophet's Birthday. +msgid "Maulid Nabi Muhammad" +msgstr "วันเมาลิดนบี" + +#. Isra' and Mi'raj. +msgid "Isra Mikraj Nabi Muhammad" +msgstr "วันเมี๊ยะราจ" + +#. Nuzul Al Quran. +msgid "Nuzululqur'an" +msgstr "วันนูซุลอัลกุรอาน" + +#. Eid al-Adha Joint Holiday. +msgid "Cuti Bersama Hari Raya Idul Adha" +msgstr "หยุดร่วมพิเศษวันอีดิ้ลอัฎฮา" + +#. Prophet's Birthday Joint Holiday. +msgid "Cuti Bersama Maulid Nabi Muhammad" +msgstr "หยุดร่วมพิเศษวันเมาลิดนบี" + +#. Ascension Joint Holiday. +msgid "Cuti Bersama Kenaikan Yesus Kristus" +msgstr "หยุดร่วมพิเศษวันสมโภชพระเยซูเจ้าเสด็จขึ้นสวรรค์" + +#. Vesak Joint Holiday. +msgid "Cuti Bersama Hari Raya Waisak" +msgstr "หยุดร่วมพิเศษวันวิสาขบูชา" + +#. %s (observed). +#, c-format +msgid "Pegangti %s" +msgstr "ชดเชย%s" + +#. %s (observed, estimated). +#, c-format +msgid "Pegangti %s (perkiraan)" +msgstr "ชดเชย%s (โดยประมาณ)" + +#. Islamic New Year Joint Holiday. +msgid "Cuti Bersama Tahun Baru Islam" +msgstr "หยุดร่วมพิเศษวันขึ้นปีใหม่อิสลาม" + +#. New Year's Joint Holiday. +msgid "Cuti Bersama Tahun Baru Masehi" +msgstr "หยุดร่วมพิเศษวันขึ้นปีใหม่" + +#. Independence Day Joint Holiday. +msgid "Cuti Bersama Hari Kemerdekaan Republik Indonesia" +msgstr "หยุดร่วมพิเศษวันประกาศอิสรภาพสาธารณรัฐอินโดนีเซีย" + +#. Easter Sunday. +msgid "Kebangkitan Yesus Kristus" +msgstr "วันอาทิตย์อีสเตอร์" diff --git a/holidays/locale/uk/LC_MESSAGES/ID.po b/holidays/locale/uk/LC_MESSAGES/ID.po index 93153d29d..c68a1efd0 100644 --- a/holidays/locale/uk/LC_MESSAGES/ID.po +++ b/holidays/locale/uk/LC_MESSAGES/ID.po @@ -14,30 +14,42 @@ # msgid "" msgstr "" -"Project-Id-Version: Holidays 0.30\n" +"Project-Id-Version: Holidays 0.60\n" "POT-Creation-Date: 2023-07-23 14:09+0300\n" -"PO-Revision-Date: 2023-07-23 14:28+0300\n" -"Last-Translator: ~Jhellico \n" -"Language-Team: Holidays localization team\n" +"PO-Revision-Date: 2024-10-30 16:45+0700\n" +"Last-Translator: PPsyrius \n" +"Language-Team: Holidays Localization Team\n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.5\n" #. %s (estimated). #, c-format msgid "%s (perkiraan)" msgstr "%s (приблизна дата)" -#. Election Day. -msgid "Hari Pemilihan" -msgstr "День виборів" +#. General Election Day. +msgid "Hari Pemilihan Unum" +msgstr "День загальних виборів" + +#. Presidential Election Day. +msgid "Hari Pemilihan Presiden" +msgstr "День президентських виборів" + +#. Legislative Election Day. +msgid "Hari Pemilihan Legislatif" +msgstr "День парламентських виборів" + +#. Local Election Day. +msgid "Hari Pemilihan Kepala Daerah" +msgstr "День місцевих виборів" #. Eid al-Fitr Joint Holiday. -msgid "Cuti Bersama Hari Raya Idulfitri" +msgid "Cuti Bersama Hari Raya Idul Fitri" msgstr "Додатковий вихідний на Курбан-байрам" #. Christmas Joint Holiday. @@ -72,7 +84,7 @@ msgstr "Страсна пʼятниця" msgid "Hari kedua Paskah" msgstr "Великодній понеділок" -#. Buddha's Birthday. +#. Vesak Day. msgid "Hari Raya Waisak" msgstr "День народження Будди" @@ -113,15 +125,15 @@ msgid "Hari Raya Natal" msgstr "Різдво Христове" #. Eid al-Fitr. -msgid "Hari Raya Idulfitri" +msgid "Hari Raya Idul Fitri" msgstr "Рамазан-байрам" #. Eid al-Fitr Second Day. -msgid "Hari kedua dari Hari Raya Idulfitri" +msgid "Hari kedua dari Hari Raya Idul Fitri" msgstr "Другий день Рамазан-байрам" #. Eid al-Adha. -msgid "Hari Raya Iduladha" +msgid "Hari Raya Idul Adha" msgstr "Курбан-байрам" #. Islamic New Year. @@ -139,3 +151,45 @@ msgstr "Вознесіння пророка Мухаммада" #. Nuzul Al Quran. msgid "Nuzululqur'an" msgstr "Річниця обʼявлення Корану" + +#. Eid al-Adha Joint Holiday. +msgid "Cuti Bersama Hari Raya Idul Adha" +msgstr "Додатковий вихідний на Курбан-байрам" + +#. Prophet's Birthday Joint Holiday. +msgid "Cuti Bersama Maulid Nabi Muhammad" +msgstr "Додатковий вихідний на День народження пророка Мухаммада" + +#. Ascension Joint Holiday. +msgid "Cuti Bersama Kenaikan Yesus Kristus" +msgstr "Додатковий вихідний на Вознесіння Господнє" + +#. Vesak Joint Holiday. +msgid "Cuti Bersama Hari Raya Waisak" +msgstr "Додатковий вихідний на День народження Будди" + +#. %s (observed). +#, c-format +msgid "Pegangti %s" +msgstr "%s (вихідний)" + +#. %s (observed, estimated). +#, c-format +msgid "Pegangti %s (perkiraan)" +msgstr "%s (вихідний, приблизна дата)" + +#. Islamic New Year Joint Holiday. +msgid "Cuti Bersama Tahun Baru Islam" +msgstr "Додатковий вихідний на Ісламський Новий рік" + +#. New Year's Joint Holiday. +msgid "Cuti Bersama Tahun Baru Masehi" +msgstr "Додатковий вихідний на Новий рік" + +#. Independence Day Joint Holiday. +msgid "Cuti Bersama Hari Kemerdekaan Republik Indonesia" +msgstr "Додатковий вихідний на День незалежності Республіки Індонезія" + +#. Easter Sunday. +msgid "Kebangkitan Yesus Kristus" +msgstr "Великдень" diff --git a/snapshots/countries/ID_COMMON.json b/snapshots/countries/ID_COMMON.json index 34619f98b..b631f90eb 100644 --- a/snapshots/countries/ID_COMMON.json +++ b/snapshots/countries/ID_COMMON.json @@ -1,21 +1,17 @@ { "1950-01-01": "New Year's Day", - "1950-02-17": "Lunar New Year (estimated)", "1950-08-17": "Independence Day", "1950-10-05": "Armed Forces Day", "1950-11-10": "Heroes' Day", "1951-01-01": "New Year's Day", - "1951-02-06": "Lunar New Year (estimated)", "1951-08-17": "Independence Day", "1951-10-05": "Armed Forces Day", "1951-11-10": "Heroes' Day", "1952-01-01": "New Year's Day", - "1952-01-27": "Lunar New Year (estimated)", "1952-08-17": "Independence Day", "1952-10-05": "Armed Forces Day", "1952-11-10": "Heroes' Day", "1953-01-01": "New Year's Day", - "1953-02-14": "Lunar New Year (estimated)", "1953-04-03": "Good Friday", "1953-04-06": "Easter Monday", "1953-04-12": "Isra' and Mi'raj (estimated)", @@ -31,7 +27,6 @@ "1953-11-19": "Prophet's Birthday (estimated)", "1953-12-25": "Christmas Day", "1954-01-01": "New Year's Day", - "1954-02-03": "Lunar New Year (estimated)", "1954-04-01": "Isra' and Mi'raj (estimated)", "1954-04-16": "Good Friday", "1954-04-19": "Easter Monday", @@ -47,7 +42,6 @@ "1954-11-08": "Prophet's Birthday (estimated)", "1954-12-25": "Christmas Day", "1955-01-01": "New Year's Day", - "1955-01-24": "Lunar New Year (estimated)", "1955-03-21": "Isra' and Mi'raj (estimated)", "1955-04-08": "Good Friday", "1955-04-11": "Easter Monday", @@ -63,7 +57,6 @@ "1955-10-29": "Prophet's Birthday (estimated)", "1955-12-25": "Christmas Day", "1956-01-01": "New Year's Day", - "1956-02-12": "Lunar New Year (estimated)", "1956-03-10": "Isra' and Mi'raj (estimated)", "1956-03-30": "Good Friday", "1956-04-02": "Easter Monday", @@ -79,7 +72,6 @@ "1956-10-17": "Prophet's Birthday (estimated)", "1956-12-25": "Christmas Day", "1957-01-01": "New Year's Day", - "1957-01-31": "Lunar New Year (estimated)", "1957-02-27": "Isra' and Mi'raj (estimated)", "1957-04-17": "Nuzul Al Quran (estimated)", "1957-04-19": "Good Friday", @@ -95,7 +87,6 @@ "1957-12-25": "Christmas Day", "1958-01-01": "New Year's Day", "1958-02-16": "Isra' and Mi'raj (estimated)", - "1958-02-18": "Lunar New Year (estimated)", "1958-04-04": "Good Friday", "1958-04-06": "Nuzul Al Quran (estimated)", "1958-04-07": "Easter Monday", @@ -111,7 +102,6 @@ "1958-12-25": "Christmas Day", "1959-01-01": "New Year's Day", "1959-02-06": "Isra' and Mi'raj (estimated)", - "1959-02-08": "Lunar New Year (estimated)", "1959-03-27": "Good Friday; Nuzul Al Quran (estimated)", "1959-03-30": "Easter Monday", "1959-04-10": "Eid al-Fitr (estimated)", @@ -126,7 +116,6 @@ "1959-12-25": "Christmas Day", "1960-01-01": "New Year's Day", "1960-01-26": "Isra' and Mi'raj (estimated)", - "1960-01-28": "Lunar New Year (estimated)", "1960-03-15": "Nuzul Al Quran (estimated)", "1960-03-28": "Eid al-Fitr (estimated)", "1960-03-29": "Eid al-Fitr Second Day (estimated)", @@ -142,7 +131,6 @@ "1960-12-25": "Christmas Day", "1961-01-01": "New Year's Day", "1961-01-14": "Isra' and Mi'raj (estimated)", - "1961-02-15": "Lunar New Year (estimated)", "1961-03-04": "Nuzul Al Quran (estimated)", "1961-03-18": "Eid al-Fitr (estimated)", "1961-03-19": "Eid al-Fitr Second Day (estimated)", @@ -158,7 +146,6 @@ "1961-12-25": "Christmas Day", "1962-01-01": "New Year's Day", "1962-01-04": "Isra' and Mi'raj (estimated)", - "1962-02-05": "Lunar New Year (estimated)", "1962-02-21": "Nuzul Al Quran (estimated)", "1962-03-07": "Eid al-Fitr (estimated)", "1962-03-08": "Eid al-Fitr Second Day (estimated)", @@ -174,15 +161,20 @@ "1962-12-24": "Isra' and Mi'raj (estimated)", "1962-12-25": "Christmas Day", "1963-01-01": "New Year's Day", - "1963-01-25": "Lunar New Year (estimated)", + "1963-02-11": "Nuzul Al Quran (estimated)", "1963-02-24": "Eid al-Fitr (estimated)", "1963-02-25": "Eid al-Fitr Second Day (estimated)", + "1963-04-12": "Good Friday", + "1963-04-15": "Easter Monday", "1963-05-01": "International Labor Day", "1963-05-03": "Eid al-Adha (estimated)", + "1963-05-23": "Ascension Day", + "1963-05-24": "Islamic New Year (estimated)", + "1963-06-03": "Whit Monday", + "1963-08-02": "Prophet's Birthday (estimated)", "1963-08-17": "Independence Day", "1963-12-25": "Christmas Day", "1964-01-01": "New Year's Day", - "1964-02-13": "Lunar New Year (estimated)", "1964-02-14": "Eid al-Fitr (estimated)", "1964-02-15": "Eid al-Fitr Second Day (estimated)", "1964-04-22": "Eid al-Adha (estimated)", @@ -190,14 +182,13 @@ "1964-08-17": "Independence Day", "1964-12-25": "Christmas Day", "1965-01-01": "New Year's Day", - "1965-02-02": "Eid al-Fitr (estimated); Lunar New Year (estimated)", + "1965-02-02": "Eid al-Fitr (estimated)", "1965-02-03": "Eid al-Fitr Second Day (estimated)", "1965-04-11": "Eid al-Adha (estimated)", "1965-05-01": "International Labor Day", "1965-08-17": "Independence Day", "1965-12-25": "Christmas Day", "1966-01-01": "New Year's Day", - "1966-01-21": "Lunar New Year (estimated)", "1966-01-22": "Eid al-Fitr (estimated)", "1966-01-23": "Eid al-Fitr Second Day (estimated)", "1966-04-01": "Eid al-Adha (estimated)", @@ -207,7 +198,6 @@ "1967-01-01": "New Year's Day", "1967-01-12": "Eid al-Fitr (estimated)", "1967-01-13": "Eid al-Fitr Second Day (estimated)", - "1967-02-09": "Lunar New Year (estimated)", "1967-03-21": "Eid al-Adha (estimated)", "1967-05-01": "International Labor Day", "1967-08-17": "Independence Day", @@ -216,7 +206,6 @@ "1968-01-02": "Eid al-Fitr Second Day (estimated)", "1968-03-09": "Eid al-Adha (estimated)", "1968-03-30": "Islamic New Year (estimated)", - "1968-05-01": "International Labor Day", "1968-05-23": "Ascension Day", "1968-06-08": "Prophet's Birthday (estimated)", "1968-08-15": "Assumption Day", @@ -385,7 +374,7 @@ "1983-04-01": "Good Friday", "1983-05-10": "Isra' and Mi'raj (estimated)", "1983-05-12": "Ascension Day", - "1983-05-27": "Buddha's Birthday (estimated)", + "1983-05-27": "Vesak Day (estimated)", "1983-07-11": "Eid al-Fitr (estimated)", "1983-07-12": "Eid al-Fitr Second Day (estimated)", "1983-08-17": "Independence Day", @@ -396,7 +385,7 @@ "1984-01-01": "New Year's Day", "1984-04-20": "Good Friday", "1984-04-28": "Isra' and Mi'raj (estimated)", - "1984-05-15": "Buddha's Birthday (estimated)", + "1984-05-15": "Vesak Day (estimated)", "1984-05-31": "Ascension Day", "1984-06-30": "Eid al-Fitr (estimated)", "1984-07-01": "Eid al-Fitr Second Day (estimated)", @@ -409,7 +398,7 @@ "1985-04-05": "Good Friday", "1985-04-17": "Isra' and Mi'raj (estimated)", "1985-05-16": "Ascension Day", - "1985-06-03": "Buddha's Birthday (estimated)", + "1985-06-03": "Vesak Day (estimated)", "1985-06-19": "Eid al-Fitr (estimated)", "1985-06-20": "Eid al-Fitr Second Day (estimated)", "1985-08-17": "Independence Day", @@ -421,7 +410,7 @@ "1986-03-28": "Good Friday", "1986-04-06": "Isra' and Mi'raj (estimated)", "1986-05-08": "Ascension Day", - "1986-05-23": "Buddha's Birthday (estimated)", + "1986-05-23": "Vesak Day (estimated)", "1986-06-08": "Eid al-Fitr (estimated)", "1986-06-09": "Eid al-Fitr Second Day (estimated)", "1986-08-15": "Eid al-Adha (estimated)", @@ -432,7 +421,7 @@ "1987-01-01": "New Year's Day", "1987-03-27": "Isra' and Mi'raj (estimated)", "1987-04-17": "Good Friday", - "1987-05-12": "Buddha's Birthday (estimated)", + "1987-05-12": "Vesak Day (estimated)", "1987-05-28": "Ascension Day; Eid al-Fitr (estimated)", "1987-05-29": "Eid al-Fitr Second Day (estimated)", "1987-08-04": "Eid al-Adha (estimated)", @@ -446,7 +435,7 @@ "1988-05-12": "Ascension Day", "1988-05-16": "Eid al-Fitr (estimated)", "1988-05-17": "Eid al-Fitr Second Day (estimated)", - "1988-05-30": "Buddha's Birthday (estimated)", + "1988-05-30": "Vesak Day (estimated)", "1988-07-23": "Eid al-Adha (estimated)", "1988-08-13": "Islamic New Year (estimated)", "1988-08-17": "Independence Day", @@ -458,7 +447,7 @@ "1989-05-04": "Ascension Day", "1989-05-06": "Eid al-Fitr (estimated)", "1989-05-07": "Eid al-Fitr Second Day (estimated)", - "1989-05-19": "Buddha's Birthday (estimated)", + "1989-05-19": "Vesak Day (estimated)", "1989-07-13": "Eid al-Adha (estimated)", "1989-08-02": "Islamic New Year (estimated)", "1989-08-17": "Independence Day", @@ -469,7 +458,7 @@ "1990-04-13": "Good Friday", "1990-04-26": "Eid al-Fitr (estimated)", "1990-04-27": "Eid al-Fitr Second Day (estimated)", - "1990-05-09": "Buddha's Birthday (estimated)", + "1990-05-09": "Vesak Day (estimated)", "1990-05-24": "Ascension Day", "1990-07-02": "Eid al-Adha (estimated)", "1990-07-23": "Islamic New Year (estimated)", @@ -482,7 +471,7 @@ "1991-04-15": "Eid al-Fitr (estimated)", "1991-04-16": "Eid al-Fitr Second Day (estimated)", "1991-05-09": "Ascension Day", - "1991-05-28": "Buddha's Birthday (estimated)", + "1991-05-28": "Vesak Day (estimated)", "1991-06-22": "Eid al-Adha (estimated)", "1991-07-12": "Islamic New Year (estimated)", "1991-08-17": "Independence Day", @@ -493,7 +482,7 @@ "1992-04-04": "Eid al-Fitr (estimated)", "1992-04-05": "Eid al-Fitr Second Day (estimated)", "1992-04-17": "Good Friday", - "1992-05-17": "Buddha's Birthday (estimated)", + "1992-05-17": "Vesak Day (estimated)", "1992-05-28": "Ascension Day", "1992-06-11": "Eid al-Adha (estimated)", "1992-07-01": "Islamic New Year (estimated)", @@ -507,7 +496,7 @@ "1993-04-09": "Good Friday", "1993-05-20": "Ascension Day", "1993-05-31": "Eid al-Adha (estimated)", - "1993-06-04": "Buddha's Birthday (estimated)", + "1993-06-04": "Vesak Day (estimated)", "1993-06-21": "Islamic New Year (estimated)", "1993-08-17": "Independence Day", "1993-08-29": "Prophet's Birthday (estimated)", @@ -519,7 +508,7 @@ "1994-04-01": "Good Friday", "1994-05-12": "Ascension Day", "1994-05-20": "Eid al-Adha (estimated)", - "1994-05-25": "Buddha's Birthday (estimated)", + "1994-05-25": "Vesak Day (estimated)", "1994-06-10": "Islamic New Year (estimated)", "1994-08-17": "Independence Day", "1994-08-19": "Prophet's Birthday (estimated)", @@ -530,7 +519,7 @@ "1995-03-03": "Eid al-Fitr Second Day (estimated)", "1995-04-14": "Good Friday", "1995-05-09": "Eid al-Adha (estimated)", - "1995-05-14": "Buddha's Birthday (estimated)", + "1995-05-14": "Vesak Day (estimated)", "1995-05-25": "Ascension Day", "1995-05-30": "Islamic New Year (estimated)", "1995-08-08": "Prophet's Birthday (estimated)", @@ -544,7 +533,7 @@ "1996-04-27": "Eid al-Adha (estimated)", "1996-05-16": "Ascension Day", "1996-05-18": "Islamic New Year (estimated)", - "1996-05-31": "Buddha's Birthday (estimated)", + "1996-05-31": "Vesak Day (estimated)", "1996-07-27": "Prophet's Birthday (estimated)", "1996-08-17": "Independence Day", "1996-12-08": "Isra' and Mi'raj (estimated)", @@ -556,7 +545,7 @@ "1997-04-17": "Eid al-Adha (estimated)", "1997-05-07": "Islamic New Year (estimated)", "1997-05-08": "Ascension Day", - "1997-05-21": "Buddha's Birthday (estimated)", + "1997-05-21": "Vesak Day (estimated)", "1997-07-16": "Prophet's Birthday (estimated)", "1997-08-17": "Independence Day", "1997-11-27": "Isra' and Mi'raj (estimated)", @@ -567,7 +556,7 @@ "1998-04-07": "Eid al-Adha (estimated)", "1998-04-10": "Good Friday", "1998-04-27": "Islamic New Year (estimated)", - "1998-05-10": "Buddha's Birthday (estimated)", + "1998-05-10": "Vesak Day (estimated)", "1998-05-21": "Ascension Day", "1998-07-06": "Prophet's Birthday (estimated)", "1998-08-17": "Independence Day", @@ -580,7 +569,8 @@ "1999-04-02": "Good Friday", "1999-04-17": "Islamic New Year (estimated)", "1999-05-13": "Ascension Day", - "1999-05-29": "Buddha's Birthday (estimated)", + "1999-05-29": "Vesak Day (estimated)", + "1999-06-07": "Legislative Election Day", "1999-06-26": "Prophet's Birthday (estimated)", "1999-08-17": "Independence Day", "1999-11-05": "Isra' and Mi'raj (estimated)", @@ -591,7 +581,7 @@ "2000-03-16": "Eid al-Adha (estimated)", "2000-04-06": "Islamic New Year (estimated)", "2000-04-21": "Good Friday", - "2000-05-18": "Buddha's Birthday (estimated)", + "2000-05-18": "Vesak Day (estimated)", "2000-06-01": "Ascension Day", "2000-06-14": "Prophet's Birthday (estimated)", "2000-08-17": "Independence Day", @@ -603,7 +593,7 @@ "2001-03-06": "Eid al-Adha", "2001-03-26": "Islamic New Year", "2001-04-13": "Good Friday", - "2001-05-07": "Buddha's Birthday (estimated)", + "2001-05-07": "Vesak Day (estimated)", "2001-05-24": "Ascension Day", "2001-06-04": "Prophet's Birthday (estimated)", "2001-08-17": "Independence Day", @@ -617,37 +607,52 @@ "2002-03-29": "Good Friday", "2002-05-09": "Ascension Day", "2002-05-24": "Prophet's Birthday (estimated)", - "2002-05-26": "Buddha's Birthday (estimated)", + "2002-05-26": "Vesak Day (estimated)", "2002-08-17": "Independence Day", "2002-10-04": "Isra' and Mi'raj", + "2002-12-05": "Eid al-Fitr Joint Holiday", "2002-12-06": "Eid al-Fitr", "2002-12-07": "Eid al-Fitr Second Day", + "2002-12-09": "Eid al-Fitr Joint Holiday", + "2002-12-10": "Eid al-Fitr Joint Holiday", "2002-12-25": "Christmas Day", + "2002-12-26": "Christmas Joint Holiday", "2003-01-01": "New Year's Day", "2003-02-01": "Lunar New Year", "2003-02-12": "Eid al-Adha", "2003-03-05": "Islamic New Year", "2003-04-18": "Good Friday", "2003-05-13": "Prophet's Birthday (estimated)", - "2003-05-15": "Buddha's Birthday (estimated)", + "2003-05-15": "Vesak Day (estimated)", "2003-05-29": "Ascension Day", "2003-08-17": "Independence Day", "2003-09-24": "Isra' and Mi'raj", + "2003-11-24": "Eid al-Fitr Joint Holiday", "2003-11-25": "Eid al-Fitr", "2003-11-26": "Eid al-Fitr Second Day", + "2003-11-27": "Eid al-Fitr Joint Holiday", + "2003-11-28": "Eid al-Fitr Joint Holiday", "2003-12-25": "Christmas Day", + "2003-12-26": "Christmas Joint Holiday", "2004-01-01": "New Year's Day", "2004-01-22": "Lunar New Year", "2004-02-02": "Eid al-Adha", "2004-02-22": "Islamic New Year", + "2004-04-05": "Legislative Election Day", "2004-04-09": "Good Friday", "2004-05-01": "Prophet's Birthday (estimated)", "2004-05-20": "Ascension Day", - "2004-06-02": "Buddha's Birthday (estimated)", + "2004-06-02": "Vesak Day (estimated)", + "2004-07-05": "Presidential Election Day", "2004-08-17": "Independence Day", "2004-09-12": "Isra' and Mi'raj", + "2004-09-20": "Presidential Election Day", "2004-11-14": "Eid al-Fitr", "2004-11-15": "Eid al-Fitr Second Day", + "2004-11-16": "Eid al-Fitr (observed)", + "2004-11-17": "Eid al-Fitr Joint Holiday", + "2004-11-18": "Eid al-Fitr Joint Holiday", + "2004-11-19": "Eid al-Fitr Joint Holiday", "2004-12-25": "Christmas Day", "2005-01-01": "New Year's Day", "2005-01-21": "Eid al-Adha", @@ -656,24 +661,34 @@ "2005-03-25": "Good Friday", "2005-04-21": "Prophet's Birthday (estimated)", "2005-05-05": "Ascension Day", - "2005-05-22": "Buddha's Birthday (estimated)", + "2005-05-22": "Vesak Day (estimated)", "2005-08-17": "Independence Day", "2005-09-01": "Isra' and Mi'raj", + "2005-11-02": "Eid al-Fitr Joint Holiday", "2005-11-03": "Eid al-Fitr", "2005-11-04": "Eid al-Fitr Second Day", + "2005-11-05": "Eid al-Fitr Joint Holiday", + "2005-11-07": "Eid al-Fitr Joint Holiday", + "2005-11-08": "Eid al-Fitr Joint Holiday", "2005-12-25": "Christmas Day", "2006-01-01": "New Year's Day", "2006-01-10": "Eid al-Adha", "2006-01-30": "Lunar New Year", "2006-01-31": "Islamic New Year", + "2006-03-31": "Day of Silence Joint Holiday", "2006-04-10": "Prophet's Birthday", "2006-04-14": "Good Friday", - "2006-05-12": "Buddha's Birthday (estimated)", + "2006-05-12": "Vesak Day (estimated)", "2006-05-25": "Ascension Day", + "2006-05-26": "Ascension Joint Holiday", "2006-08-17": "Independence Day", + "2006-08-18": "Independence Day Joint Holiday", "2006-08-22": "Isra' and Mi'raj", + "2006-10-23": "Eid al-Fitr Joint Holiday", "2006-10-24": "Eid al-Fitr", "2006-10-25": "Eid al-Fitr Second Day", + "2006-10-26": "Eid al-Fitr Joint Holiday", + "2006-10-27": "Eid al-Fitr Joint Holiday", "2006-12-25": "Christmas Day", "2006-12-31": "Eid al-Adha", "2007-01-01": "New Year's Day", @@ -682,40 +697,62 @@ "2007-03-31": "Prophet's Birthday", "2007-04-06": "Good Friday", "2007-05-17": "Ascension Day", - "2007-06-01": "Buddha's Birthday", + "2007-05-18": "Ascension Joint Holiday", + "2007-06-01": "Vesak Day", "2007-08-11": "Isra' and Mi'raj", "2007-08-17": "Independence Day", + "2007-10-12": "Eid al-Fitr Joint Holiday", "2007-10-13": "Eid al-Fitr", "2007-10-14": "Eid al-Fitr Second Day", + "2007-10-15": "Eid al-Fitr Joint Holiday", + "2007-10-16": "Eid al-Fitr Joint Holiday", + "2007-10-17": "Eid al-Fitr Joint Holiday", + "2007-10-18": "Eid al-Fitr Joint Holiday", + "2007-10-19": "Eid al-Fitr Joint Holiday", "2007-12-20": "Eid al-Adha", + "2007-12-21": "Christmas Joint Holiday", + "2007-12-24": "Christmas Joint Holiday", "2007-12-25": "Christmas Day", + "2007-12-26": "Christmas Joint Holiday", + "2007-12-31": "New Year's Joint Holiday", "2008-01-01": "New Year's Day", "2008-01-10": "Islamic New Year", + "2008-01-11": "Islamic New Year Joint Holiday", "2008-02-07": "Lunar New Year", "2008-03-20": "Prophet's Birthday", "2008-03-21": "Good Friday", "2008-05-01": "Ascension Day", - "2008-05-20": "Buddha's Birthday", + "2008-05-20": "Vesak Day", "2008-07-31": "Isra' and Mi'raj", "2008-08-17": "Independence Day", + "2008-09-29": "Eid al-Fitr Joint Holiday", + "2008-09-30": "Eid al-Fitr Joint Holiday", "2008-10-01": "Eid al-Fitr", "2008-10-02": "Eid al-Fitr Second Day", + "2008-10-03": "Eid al-Fitr Joint Holiday", "2008-12-08": "Eid al-Adha", "2008-12-25": "Christmas Day", + "2008-12-26": "Christmas Joint Holiday", "2008-12-29": "Islamic New Year", "2009-01-01": "New Year's Day", + "2009-01-02": "New Year's Joint Holiday", "2009-01-26": "Lunar New Year", "2009-03-09": "Prophet's Birthday", "2009-03-26": "Day of Silence", + "2009-04-09": "Legislative Election Day", "2009-04-10": "Good Friday", - "2009-05-09": "Buddha's Birthday", + "2009-05-09": "Vesak Day", "2009-05-21": "Ascension Day", + "2009-07-08": "Presidential Election Day", "2009-07-20": "Isra' and Mi'raj", "2009-08-17": "Independence Day", + "2009-09-18": "Eid al-Fitr Joint Holiday", "2009-09-20": "Eid al-Fitr", "2009-09-21": "Eid al-Fitr Second Day", + "2009-09-23": "Eid al-Fitr Joint Holiday", "2009-11-27": "Eid al-Adha", "2009-12-18": "Islamic New Year", + "2009-12-24": "Christmas Joint Holiday", "2009-12-25": "Christmas Day", "2010-01-01": "New Year's Day", "2010-02-15": "Lunar New Year", @@ -723,71 +760,96 @@ "2010-03-16": "Day of Silence", "2010-04-02": "Good Friday", "2010-05-13": "Ascension Day", - "2010-05-28": "Buddha's Birthday", + "2010-05-28": "Vesak Day", "2010-07-09": "Isra' and Mi'raj", "2010-08-17": "Independence Day", + "2010-09-09": "Eid al-Fitr Joint Holiday", "2010-09-10": "Eid al-Fitr", "2010-09-11": "Eid al-Fitr Second Day", + "2010-09-13": "Eid al-Fitr Joint Holiday", "2010-11-17": "Eid al-Adha", "2010-12-07": "Islamic New Year", + "2010-12-24": "Christmas Joint Holiday", "2010-12-25": "Christmas Day", "2011-01-01": "New Year's Day", "2011-02-03": "Lunar New Year", "2011-02-15": "Prophet's Birthday", "2011-03-05": "Day of Silence", "2011-04-22": "Good Friday", - "2011-05-17": "Buddha's Birthday", + "2011-05-16": "Vesak Joint Holiday", + "2011-05-17": "Vesak Day", "2011-06-02": "Ascension Day", "2011-06-29": "Isra' and Mi'raj", "2011-08-17": "Independence Day", + "2011-08-29": "Eid al-Fitr Joint Holiday", "2011-08-30": "Eid al-Fitr", "2011-08-31": "Eid al-Fitr Second Day", + "2011-09-01": "Eid al-Fitr Joint Holiday", + "2011-09-02": "Eid al-Fitr Joint Holiday", "2011-11-06": "Eid al-Adha", "2011-11-27": "Islamic New Year", "2011-12-25": "Christmas Day", + "2011-12-26": "Christmas Joint Holiday", "2012-01-01": "New Year's Day", "2012-01-23": "Lunar New Year", "2012-02-05": "Prophet's Birthday", "2012-03-23": "Day of Silence", "2012-04-06": "Good Friday", - "2012-05-06": "Buddha's Birthday", + "2012-05-06": "Vesak Day", "2012-05-17": "Ascension Day", + "2012-05-18": "Ascension Joint Holiday", "2012-06-17": "Isra' and Mi'raj", "2012-08-17": "Independence Day", "2012-08-19": "Eid al-Fitr", "2012-08-20": "Eid al-Fitr Second Day", + "2012-08-21": "Eid al-Fitr Joint Holiday", + "2012-08-22": "Eid al-Fitr Joint Holiday", "2012-10-26": "Eid al-Adha", "2012-11-15": "Islamic New Year", + "2012-11-16": "Islamic New Year Joint Holiday", + "2012-12-24": "Christmas Joint Holiday", "2012-12-25": "Christmas Day", + "2012-12-31": "New Year's Joint Holiday", "2013-01-01": "New Year's Day", "2013-01-24": "Prophet's Birthday", "2013-02-11": "Lunar New Year", "2013-03-12": "Day of Silence", "2013-03-29": "Good Friday", "2013-05-09": "Ascension Day", - "2013-05-25": "Buddha's Birthday", + "2013-05-25": "Vesak Day", "2013-06-06": "Isra' and Mi'raj", + "2013-08-05": "Eid al-Fitr Joint Holiday", + "2013-08-06": "Eid al-Fitr Joint Holiday", + "2013-08-07": "Eid al-Fitr Joint Holiday", "2013-08-08": "Eid al-Fitr", "2013-08-09": "Eid al-Fitr Second Day", "2013-08-17": "Independence Day", + "2013-10-14": "Eid al-Adha Joint Holiday", "2013-10-15": "Eid al-Adha", "2013-11-05": "Islamic New Year", "2013-12-25": "Christmas Day", + "2013-12-26": "Christmas Joint Holiday", "2014-01-01": "New Year's Day", "2014-01-14": "Prophet's Birthday", "2014-01-31": "Lunar New Year", "2014-03-31": "Day of Silence", + "2014-04-09": "Legislative Election Day", "2014-04-18": "Good Friday", "2014-05-01": "International Labor Day", - "2014-05-15": "Buddha's Birthday", + "2014-05-15": "Vesak Day", "2014-05-27": "Isra' and Mi'raj", "2014-05-29": "Ascension Day", + "2014-07-09": "Presidential Election Day", "2014-07-28": "Eid al-Fitr", "2014-07-29": "Eid al-Fitr Second Day", + "2014-07-30": "Eid al-Fitr Joint Holiday", + "2014-07-31": "Eid al-Fitr Joint Holiday", + "2014-08-01": "Eid al-Fitr Joint Holiday", "2014-08-17": "Independence Day", "2014-10-05": "Eid al-Adha", "2014-10-25": "Islamic New Year", "2014-12-25": "Christmas Day", + "2014-12-26": "Christmas Joint Holiday", "2015-01-01": "New Year's Day", "2015-01-03": "Prophet's Birthday", "2015-02-19": "Lunar New Year", @@ -796,12 +858,16 @@ "2015-05-01": "International Labor Day", "2015-05-14": "Ascension Day", "2015-05-16": "Isra' and Mi'raj", - "2015-06-02": "Buddha's Birthday", + "2015-06-02": "Vesak Day", + "2015-07-16": "Eid al-Fitr Joint Holiday", "2015-07-17": "Eid al-Fitr", "2015-07-18": "Eid al-Fitr Second Day", + "2015-07-20": "Eid al-Fitr Joint Holiday", + "2015-07-21": "Eid al-Fitr Joint Holiday", "2015-08-17": "Independence Day", "2015-09-24": "Eid al-Adha", "2015-10-14": "Islamic New Year", + "2015-12-09": "Local Election Day", "2015-12-24": "Prophet's Birthday", "2015-12-25": "Christmas Day", "2016-01-01": "New Year's Day", @@ -811,31 +877,42 @@ "2016-05-01": "International Labor Day", "2016-05-05": "Ascension Day", "2016-05-06": "Isra' and Mi'raj", - "2016-05-22": "Buddha's Birthday", + "2016-05-22": "Vesak Day", "2016-06-01": "Pancasila Day", + "2016-07-04": "Eid al-Fitr Joint Holiday", + "2016-07-05": "Eid al-Fitr Joint Holiday", "2016-07-06": "Eid al-Fitr", "2016-07-07": "Eid al-Fitr Second Day", + "2016-07-08": "Eid al-Fitr Joint Holiday", "2016-08-17": "Independence Day", "2016-09-12": "Eid al-Adha", "2016-10-02": "Islamic New Year", "2016-12-12": "Prophet's Birthday", "2016-12-25": "Christmas Day", + "2016-12-26": "Christmas Joint Holiday", "2017-01-01": "New Year's Day", "2017-01-28": "Lunar New Year", + "2017-02-15": "Local Election Day", "2017-03-28": "Day of Silence", "2017-04-14": "Good Friday", "2017-04-24": "Isra' and Mi'raj", "2017-05-01": "International Labor Day", - "2017-05-11": "Buddha's Birthday", + "2017-05-11": "Vesak Day", "2017-05-25": "Ascension Day", "2017-06-01": "Pancasila Day", + "2017-06-23": "Eid al-Fitr Joint Holiday", "2017-06-25": "Eid al-Fitr", "2017-06-26": "Eid al-Fitr Second Day", + "2017-06-27": "Eid al-Fitr Joint Holiday", + "2017-06-28": "Eid al-Fitr Joint Holiday", + "2017-06-29": "Eid al-Fitr Joint Holiday", + "2017-06-30": "Eid al-Fitr Joint Holiday", "2017-08-17": "Independence Day", "2017-09-01": "Eid al-Adha", "2017-09-21": "Islamic New Year", "2017-12-01": "Prophet's Birthday", "2017-12-25": "Christmas Day", + "2017-12-26": "Christmas Joint Holiday", "2018-01-01": "New Year's Day", "2018-02-16": "Lunar New Year", "2018-03-17": "Day of Silence", @@ -843,32 +920,44 @@ "2018-04-14": "Isra' and Mi'raj", "2018-05-01": "International Labor Day", "2018-05-10": "Ascension Day", - "2018-05-29": "Buddha's Birthday", + "2018-05-29": "Vesak Day", "2018-06-01": "Pancasila Day", + "2018-06-11": "Eid al-Fitr Joint Holiday", + "2018-06-12": "Eid al-Fitr Joint Holiday", + "2018-06-13": "Eid al-Fitr Joint Holiday", + "2018-06-14": "Eid al-Fitr Joint Holiday", "2018-06-15": "Eid al-Fitr", "2018-06-16": "Eid al-Fitr Second Day", - "2018-06-27": "Election Day", + "2018-06-18": "Eid al-Fitr Joint Holiday", + "2018-06-19": "Eid al-Fitr Joint Holiday", + "2018-06-20": "Eid al-Fitr Joint Holiday", + "2018-06-27": "Local Election Day", "2018-08-17": "Independence Day", "2018-08-22": "Eid al-Adha", "2018-09-11": "Islamic New Year", "2018-11-20": "Prophet's Birthday", + "2018-12-24": "Christmas Joint Holiday", "2018-12-25": "Christmas Day", "2019-01-01": "New Year's Day", "2019-02-05": "Lunar New Year", "2019-03-07": "Day of Silence", "2019-04-03": "Isra' and Mi'raj", - "2019-04-17": "Election Day", + "2019-04-17": "General Election Day", "2019-04-19": "Good Friday", "2019-05-01": "International Labor Day", - "2019-05-19": "Buddha's Birthday", + "2019-05-19": "Vesak Day", "2019-05-30": "Ascension Day", "2019-06-01": "Pancasila Day", + "2019-06-03": "Eid al-Fitr Joint Holiday", + "2019-06-04": "Eid al-Fitr Joint Holiday", "2019-06-05": "Eid al-Fitr", "2019-06-06": "Eid al-Fitr Second Day", + "2019-06-07": "Eid al-Fitr Joint Holiday", "2019-08-11": "Eid al-Adha", "2019-08-17": "Independence Day", "2019-09-01": "Islamic New Year", "2019-11-09": "Prophet's Birthday", + "2019-12-24": "Christmas Joint Holiday", "2019-12-25": "Christmas Day", "2020-01-01": "New Year's Day", "2020-01-25": "Lunar New Year", @@ -876,7 +965,7 @@ "2020-03-25": "Day of Silence", "2020-04-10": "Good Friday", "2020-05-01": "International Labor Day", - "2020-05-07": "Buddha's Birthday", + "2020-05-07": "Vesak Day", "2020-05-21": "Ascension Day", "2020-05-24": "Eid al-Fitr", "2020-05-25": "Eid al-Fitr Second Day", @@ -884,23 +973,30 @@ "2020-07-31": "Eid al-Adha", "2020-08-17": "Independence Day", "2020-08-20": "Islamic New Year", + "2020-08-21": "Islamic New Year Joint Holiday", + "2020-10-28": "Prophet's Birthday Joint Holiday", "2020-10-29": "Prophet's Birthday", - "2020-12-09": "Election Day", + "2020-10-30": "Prophet's Birthday Joint Holiday", + "2020-12-09": "Local Election Day", + "2020-12-24": "Christmas Joint Holiday", "2020-12-25": "Christmas Day", + "2020-12-31": "Eid al-Fitr Joint Holiday (observed)", "2021-01-01": "New Year's Day", "2021-02-12": "Lunar New Year", "2021-03-11": "Isra' and Mi'raj", "2021-03-14": "Day of Silence", "2021-04-02": "Good Friday", "2021-05-01": "International Labor Day", + "2021-05-12": "Eid al-Fitr Joint Holiday", "2021-05-13": "Ascension Day; Eid al-Fitr", "2021-05-14": "Eid al-Fitr Second Day", - "2021-05-26": "Buddha's Birthday", + "2021-05-26": "Vesak Day", "2021-06-01": "Pancasila Day", "2021-07-20": "Eid al-Adha", "2021-08-11": "Islamic New Year", "2021-08-17": "Independence Day", "2021-10-19": "Prophet's Birthday", + "2021-12-24": "Christmas Joint Holiday", "2021-12-25": "Christmas Day", "2022-01-01": "New Year's Day", "2022-02-01": "Lunar New Year", @@ -914,7 +1010,7 @@ "2022-05-04": "Eid al-Fitr Joint Holiday", "2022-05-05": "Eid al-Fitr Joint Holiday", "2022-05-06": "Eid al-Fitr Joint Holiday", - "2022-05-16": "Buddha's Birthday", + "2022-05-16": "Vesak Day", "2022-05-26": "Ascension Day", "2022-06-01": "Pancasila Day", "2022-07-10": "Eid al-Adha", @@ -922,7 +1018,6 @@ "2022-08-17": "Independence Day", "2022-10-08": "Prophet's Birthday", "2022-12-25": "Christmas Day", - "2022-12-26": "Christmas Joint Holiday", "2023-01-01": "New Year's Day", "2023-01-22": "Lunar New Year", "2023-01-23": "Lunar New Year Joint Holiday", @@ -940,45 +1035,71 @@ "2023-05-01": "International Labor Day", "2023-05-18": "Ascension Day", "2023-06-01": "Pancasila Day", - "2023-06-04": "Buddha's Birthday", + "2023-06-02": "Vesak Joint Holiday", + "2023-06-04": "Vesak Day", + "2023-06-28": "Eid al-Adha Joint Holiday", "2023-06-29": "Eid al-Adha", + "2023-06-30": "Eid al-Adha Joint Holiday", "2023-07-19": "Islamic New Year", "2023-08-17": "Independence Day", - "2023-09-27": "Prophet's Birthday (estimated)", + "2023-09-28": "Prophet's Birthday", "2023-12-25": "Christmas Day", "2023-12-26": "Christmas Joint Holiday", "2024-01-01": "New Year's Day", - "2024-02-08": "Isra' and Mi'raj (estimated)", - "2024-02-10": "Lunar New Year (estimated)", + "2024-02-06": "Isra' and Mi'raj", + "2024-02-09": "Lunar New Year Joint Holiday", + "2024-02-10": "Lunar New Year", + "2024-02-14": "General Election Day", "2024-03-11": "Day of Silence", + "2024-03-12": "Day of Silence Joint Holiday", "2024-03-29": "Good Friday", + "2024-03-31": "Easter Sunday", + "2024-04-08": "Eid al-Fitr Joint Holiday", + "2024-04-09": "Eid al-Fitr Joint Holiday", "2024-04-10": "Eid al-Fitr", "2024-04-11": "Eid al-Fitr Second Day", + "2024-04-12": "Eid al-Fitr Joint Holiday", + "2024-04-15": "Eid al-Fitr Joint Holiday", "2024-05-01": "International Labor Day", "2024-05-09": "Ascension Day", - "2024-05-22": "Buddha's Birthday (estimated)", + "2024-05-10": "Ascension Joint Holiday", + "2024-05-23": "Vesak Day", + "2024-05-24": "Vesak Joint Holiday", "2024-06-01": "Pancasila Day", - "2024-06-16": "Eid al-Adha (estimated)", - "2024-07-07": "Islamic New Year (estimated)", + "2024-06-17": "Eid al-Adha", + "2024-06-18": "Eid al-Adha Joint Holiday", + "2024-07-07": "Islamic New Year", "2024-08-17": "Independence Day", - "2024-09-15": "Prophet's Birthday (estimated)", + "2024-09-16": "Prophet's Birthday", "2024-12-25": "Christmas Day", + "2024-12-26": "Christmas Joint Holiday", "2025-01-01": "New Year's Day", - "2025-01-27": "Isra' and Mi'raj (estimated)", - "2025-01-29": "Lunar New Year (estimated)", + "2025-01-27": "Isra' and Mi'raj", + "2025-01-28": "Lunar New Year Joint Holiday", + "2025-01-29": "Lunar New Year", + "2025-03-28": "Day of Silence Joint Holiday", "2025-03-29": "Day of Silence", - "2025-03-30": "Eid al-Fitr (estimated)", - "2025-03-31": "Eid al-Fitr Second Day (estimated)", + "2025-03-31": "Eid al-Fitr", + "2025-04-01": "Eid al-Fitr Second Day", + "2025-04-02": "Eid al-Fitr Joint Holiday", + "2025-04-03": "Eid al-Fitr Joint Holiday", + "2025-04-04": "Eid al-Fitr Joint Holiday", + "2025-04-07": "Eid al-Fitr Joint Holiday", "2025-04-18": "Good Friday", + "2025-04-20": "Easter Sunday", "2025-05-01": "International Labor Day", - "2025-05-11": "Buddha's Birthday (estimated)", + "2025-05-12": "Vesak Day", + "2025-05-13": "Vesak Joint Holiday", "2025-05-29": "Ascension Day", + "2025-05-30": "Ascension Joint Holiday", "2025-06-01": "Pancasila Day", - "2025-06-06": "Eid al-Adha (estimated)", - "2025-06-26": "Islamic New Year (estimated)", + "2025-06-06": "Eid al-Adha", + "2025-06-09": "Eid al-Adha Joint Holiday", + "2025-06-27": "Islamic New Year", "2025-08-17": "Independence Day", - "2025-09-04": "Prophet's Birthday (estimated)", + "2025-09-05": "Prophet's Birthday", "2025-12-25": "Christmas Day", + "2025-12-26": "Christmas Joint Holiday", "2026-01-01": "New Year's Day", "2026-01-16": "Isra' and Mi'raj (estimated)", "2026-02-17": "Lunar New Year (estimated)", @@ -986,10 +1107,11 @@ "2026-03-20": "Eid al-Fitr (estimated)", "2026-03-21": "Eid al-Fitr Second Day (estimated)", "2026-04-03": "Good Friday", + "2026-04-05": "Easter Sunday", "2026-05-01": "International Labor Day", "2026-05-14": "Ascension Day", "2026-05-27": "Eid al-Adha (estimated)", - "2026-05-31": "Buddha's Birthday (estimated)", + "2026-05-31": "Vesak Day (estimated)", "2026-06-01": "Pancasila Day", "2026-06-16": "Islamic New Year (estimated)", "2026-08-17": "Independence Day", @@ -998,13 +1120,15 @@ "2027-01-01": "New Year's Day", "2027-01-05": "Isra' and Mi'raj (estimated)", "2027-02-06": "Lunar New Year (estimated)", + "2027-03-08": "Day of Silence", "2027-03-09": "Eid al-Fitr (estimated)", "2027-03-10": "Eid al-Fitr Second Day (estimated)", "2027-03-26": "Good Friday", + "2027-03-28": "Easter Sunday", "2027-05-01": "International Labor Day", "2027-05-06": "Ascension Day", "2027-05-16": "Eid al-Adha (estimated)", - "2027-05-20": "Buddha's Birthday (estimated)", + "2027-05-20": "Vesak Day (estimated)", "2027-06-01": "Pancasila Day", "2027-06-06": "Islamic New Year (estimated)", "2027-08-14": "Prophet's Birthday (estimated)", @@ -1014,10 +1138,12 @@ "2028-01-26": "Lunar New Year (estimated)", "2028-02-26": "Eid al-Fitr (estimated)", "2028-02-27": "Eid al-Fitr Second Day (estimated)", + "2028-03-26": "Day of Silence", "2028-04-14": "Good Friday", + "2028-04-16": "Easter Sunday", "2028-05-01": "International Labor Day", "2028-05-05": "Eid al-Adha (estimated)", - "2028-05-09": "Buddha's Birthday (estimated)", + "2028-05-09": "Vesak Day (estimated)", "2028-05-25": "Ascension Day; Islamic New Year (estimated)", "2028-06-01": "Pancasila Day", "2028-08-03": "Prophet's Birthday (estimated)", @@ -1028,12 +1154,14 @@ "2029-02-13": "Lunar New Year (estimated)", "2029-02-14": "Eid al-Fitr (estimated)", "2029-02-15": "Eid al-Fitr Second Day (estimated)", + "2029-03-15": "Day of Silence", "2029-03-30": "Good Friday", + "2029-04-01": "Easter Sunday", "2029-04-24": "Eid al-Adha (estimated)", "2029-05-01": "International Labor Day", "2029-05-10": "Ascension Day", "2029-05-14": "Islamic New Year (estimated)", - "2029-05-27": "Buddha's Birthday (estimated)", + "2029-05-27": "Vesak Day (estimated)", "2029-06-01": "Pancasila Day", "2029-07-24": "Prophet's Birthday (estimated)", "2029-08-17": "Independence Day", @@ -1043,11 +1171,13 @@ "2030-02-03": "Lunar New Year (estimated)", "2030-02-04": "Eid al-Fitr (estimated)", "2030-02-05": "Eid al-Fitr Second Day (estimated)", + "2030-03-05": "Day of Silence", "2030-04-13": "Eid al-Adha (estimated)", "2030-04-19": "Good Friday", + "2030-04-21": "Easter Sunday", "2030-05-01": "International Labor Day", "2030-05-03": "Islamic New Year (estimated)", - "2030-05-16": "Buddha's Birthday (estimated)", + "2030-05-16": "Vesak Day (estimated)", "2030-05-30": "Ascension Day", "2030-06-01": "Pancasila Day", "2030-07-13": "Prophet's Birthday (estimated)", @@ -1060,11 +1190,12 @@ "2031-01-25": "Eid al-Fitr Second Day (estimated)", "2031-04-02": "Eid al-Adha (estimated)", "2031-04-11": "Good Friday", + "2031-04-13": "Easter Sunday", "2031-04-23": "Islamic New Year (estimated)", "2031-05-01": "International Labor Day", "2031-05-22": "Ascension Day", "2031-06-01": "Pancasila Day", - "2031-06-04": "Buddha's Birthday (estimated)", + "2031-06-04": "Vesak Day (estimated)", "2031-07-02": "Prophet's Birthday (estimated)", "2031-08-17": "Independence Day", "2031-11-12": "Isra' and Mi'raj (estimated)", @@ -1075,10 +1206,11 @@ "2032-02-11": "Lunar New Year (estimated)", "2032-03-22": "Eid al-Adha (estimated)", "2032-03-26": "Good Friday", + "2032-03-28": "Easter Sunday", "2032-04-11": "Islamic New Year (estimated)", "2032-05-01": "International Labor Day", "2032-05-06": "Ascension Day", - "2032-05-23": "Buddha's Birthday (estimated)", + "2032-05-23": "Vesak Day (estimated)", "2032-06-01": "Pancasila Day", "2032-06-20": "Prophet's Birthday (estimated)", "2032-08-17": "Independence Day", @@ -1091,8 +1223,9 @@ "2033-03-11": "Eid al-Adha (estimated)", "2033-04-01": "Islamic New Year (estimated)", "2033-04-15": "Good Friday", + "2033-04-17": "Easter Sunday", "2033-05-01": "International Labor Day", - "2033-05-13": "Buddha's Birthday (estimated)", + "2033-05-13": "Vesak Day (estimated)", "2033-05-26": "Ascension Day", "2033-06-01": "Pancasila Day", "2033-06-09": "Prophet's Birthday (estimated)", @@ -1106,10 +1239,11 @@ "2034-03-01": "Eid al-Adha (estimated)", "2034-03-21": "Islamic New Year (estimated)", "2034-04-07": "Good Friday", + "2034-04-09": "Easter Sunday", "2034-05-01": "International Labor Day", "2034-05-18": "Ascension Day", "2034-05-30": "Prophet's Birthday (estimated)", - "2034-06-01": "Buddha's Birthday (estimated); Pancasila Day", + "2034-06-01": "Pancasila Day; Vesak Day (estimated)", "2034-08-17": "Independence Day", "2034-10-10": "Isra' and Mi'raj (estimated)", "2034-12-12": "Eid al-Fitr (estimated)", @@ -1120,10 +1254,11 @@ "2035-02-18": "Eid al-Adha (estimated)", "2035-03-11": "Islamic New Year (estimated)", "2035-03-23": "Good Friday", + "2035-03-25": "Easter Sunday", "2035-05-01": "International Labor Day", "2035-05-03": "Ascension Day", "2035-05-20": "Prophet's Birthday (estimated)", - "2035-05-22": "Buddha's Birthday (estimated)", + "2035-05-22": "Vesak Day (estimated)", "2035-06-01": "Pancasila Day", "2035-08-17": "Independence Day", "2035-09-29": "Isra' and Mi'raj (estimated)", @@ -1135,9 +1270,10 @@ "2036-02-07": "Eid al-Adha (estimated)", "2036-02-28": "Islamic New Year (estimated)", "2036-04-11": "Good Friday", + "2036-04-13": "Easter Sunday", "2036-05-01": "International Labor Day", "2036-05-08": "Prophet's Birthday (estimated)", - "2036-05-10": "Buddha's Birthday (estimated)", + "2036-05-10": "Vesak Day (estimated)", "2036-05-22": "Ascension Day", "2036-06-01": "Pancasila Day", "2036-08-17": "Independence Day", @@ -1150,10 +1286,11 @@ "2037-02-15": "Lunar New Year (estimated)", "2037-02-16": "Islamic New Year (estimated)", "2037-04-03": "Good Friday", + "2037-04-05": "Easter Sunday", "2037-04-28": "Prophet's Birthday (estimated)", "2037-05-01": "International Labor Day", "2037-05-14": "Ascension Day", - "2037-05-29": "Buddha's Birthday (estimated)", + "2037-05-29": "Vesak Day (estimated)", "2037-06-01": "Pancasila Day", "2037-08-17": "Independence Day", "2037-09-07": "Isra' and Mi'raj (estimated)", @@ -1166,8 +1303,9 @@ "2038-02-05": "Islamic New Year (estimated)", "2038-04-17": "Prophet's Birthday (estimated)", "2038-04-23": "Good Friday", + "2038-04-25": "Easter Sunday", "2038-05-01": "International Labor Day", - "2038-05-18": "Buddha's Birthday (estimated)", + "2038-05-18": "Vesak Day (estimated)", "2038-06-01": "Pancasila Day", "2038-06-03": "Ascension Day", "2038-08-17": "Independence Day", @@ -1181,8 +1319,9 @@ "2039-01-26": "Islamic New Year (estimated)", "2039-04-06": "Prophet's Birthday (estimated)", "2039-04-08": "Good Friday", + "2039-04-10": "Easter Sunday", "2039-05-01": "International Labor Day", - "2039-05-07": "Buddha's Birthday (estimated)", + "2039-05-07": "Vesak Day (estimated)", "2039-05-19": "Ascension Day", "2039-06-01": "Pancasila Day", "2039-08-17": "Independence Day; Isra' and Mi'raj (estimated)", @@ -1195,9 +1334,10 @@ "2040-02-12": "Lunar New Year (estimated)", "2040-03-25": "Prophet's Birthday (estimated)", "2040-03-30": "Good Friday", + "2040-04-01": "Easter Sunday", "2040-05-01": "International Labor Day", "2040-05-10": "Ascension Day", - "2040-05-25": "Buddha's Birthday (estimated)", + "2040-05-25": "Vesak Day (estimated)", "2040-06-01": "Pancasila Day", "2040-08-05": "Isra' and Mi'raj (estimated)", "2040-08-17": "Independence Day", @@ -1210,8 +1350,9 @@ "2041-02-01": "Lunar New Year (estimated)", "2041-03-15": "Prophet's Birthday (estimated)", "2041-04-19": "Good Friday", + "2041-04-21": "Easter Sunday", "2041-05-01": "International Labor Day", - "2041-05-14": "Buddha's Birthday (estimated)", + "2041-05-14": "Vesak Day (estimated)", "2041-05-30": "Ascension Day", "2041-06-01": "Pancasila Day", "2041-07-25": "Isra' and Mi'raj (estimated)", @@ -1225,10 +1366,11 @@ "2042-01-22": "Lunar New Year (estimated)", "2042-03-04": "Prophet's Birthday (estimated)", "2042-04-04": "Good Friday", + "2042-04-06": "Easter Sunday", "2042-05-01": "International Labor Day", "2042-05-15": "Ascension Day", "2042-06-01": "Pancasila Day", - "2042-06-02": "Buddha's Birthday (estimated)", + "2042-06-02": "Vesak Day (estimated)", "2042-07-15": "Isra' and Mi'raj (estimated)", "2042-08-17": "Independence Day", "2042-09-15": "Eid al-Fitr (estimated)", @@ -1240,9 +1382,10 @@ "2043-02-10": "Lunar New Year (estimated)", "2043-02-22": "Prophet's Birthday (estimated)", "2043-03-27": "Good Friday", + "2043-03-29": "Easter Sunday", "2043-05-01": "International Labor Day", "2043-05-07": "Ascension Day", - "2043-05-23": "Buddha's Birthday (estimated)", + "2043-05-23": "Vesak Day (estimated)", "2043-06-01": "Pancasila Day", "2043-07-04": "Isra' and Mi'raj (estimated)", "2043-08-17": "Independence Day", @@ -1255,8 +1398,9 @@ "2044-01-30": "Lunar New Year (estimated)", "2044-02-11": "Prophet's Birthday (estimated)", "2044-04-15": "Good Friday", + "2044-04-17": "Easter Sunday", "2044-05-01": "International Labor Day", - "2044-05-12": "Buddha's Birthday (estimated)", + "2044-05-12": "Vesak Day (estimated)", "2044-05-26": "Ascension Day", "2044-06-01": "Pancasila Day", "2044-06-23": "Isra' and Mi'raj (estimated)", @@ -1270,9 +1414,10 @@ "2045-01-30": "Prophet's Birthday (estimated)", "2045-02-17": "Lunar New Year (estimated)", "2045-04-07": "Good Friday", + "2045-04-09": "Easter Sunday", "2045-05-01": "International Labor Day", "2045-05-18": "Ascension Day", - "2045-05-31": "Buddha's Birthday (estimated)", + "2045-05-31": "Vesak Day (estimated)", "2045-06-01": "Pancasila Day", "2045-06-13": "Isra' and Mi'raj (estimated)", "2045-08-14": "Eid al-Fitr (estimated)", @@ -1285,9 +1430,10 @@ "2046-01-19": "Prophet's Birthday (estimated)", "2046-02-06": "Lunar New Year (estimated)", "2046-03-23": "Good Friday", + "2046-03-25": "Easter Sunday", "2046-05-01": "International Labor Day", "2046-05-03": "Ascension Day", - "2046-05-20": "Buddha's Birthday (estimated)", + "2046-05-20": "Vesak Day (estimated)", "2046-06-01": "Pancasila Day", "2046-06-02": "Isra' and Mi'raj (estimated)", "2046-08-03": "Eid al-Fitr (estimated)", @@ -1300,8 +1446,9 @@ "2047-01-08": "Prophet's Birthday (estimated)", "2047-01-26": "Lunar New Year (estimated)", "2047-04-12": "Good Friday", + "2047-04-14": "Easter Sunday", "2047-05-01": "International Labor Day", - "2047-05-09": "Buddha's Birthday (estimated)", + "2047-05-09": "Vesak Day (estimated)", "2047-05-22": "Isra' and Mi'raj (estimated)", "2047-05-23": "Ascension Day", "2047-06-01": "Pancasila Day", @@ -1315,10 +1462,11 @@ "2048-01-01": "New Year's Day", "2048-02-14": "Lunar New Year (estimated)", "2048-04-03": "Good Friday", + "2048-04-05": "Easter Sunday", "2048-05-01": "International Labor Day", "2048-05-10": "Isra' and Mi'raj (estimated)", "2048-05-14": "Ascension Day", - "2048-05-27": "Buddha's Birthday (estimated)", + "2048-05-27": "Vesak Day (estimated)", "2048-06-01": "Pancasila Day", "2048-07-12": "Eid al-Fitr (estimated)", "2048-07-13": "Eid al-Fitr Second Day (estimated)", @@ -1330,9 +1478,10 @@ "2049-01-01": "New Year's Day", "2049-02-02": "Lunar New Year (estimated)", "2049-04-16": "Good Friday", + "2049-04-18": "Easter Sunday", "2049-04-29": "Isra' and Mi'raj (estimated)", "2049-05-01": "International Labor Day", - "2049-05-16": "Buddha's Birthday (estimated)", + "2049-05-16": "Vesak Day (estimated)", "2049-05-27": "Ascension Day", "2049-06-01": "Pancasila Day", "2049-07-01": "Eid al-Fitr (estimated)", @@ -1345,11 +1494,12 @@ "2050-01-01": "New Year's Day", "2050-01-23": "Lunar New Year (estimated)", "2050-04-08": "Good Friday", + "2050-04-10": "Easter Sunday", "2050-04-19": "Isra' and Mi'raj (estimated)", "2050-05-01": "International Labor Day", "2050-05-19": "Ascension Day", "2050-06-01": "Pancasila Day", - "2050-06-04": "Buddha's Birthday (estimated)", + "2050-06-04": "Vesak Day (estimated)", "2050-06-20": "Eid al-Fitr (estimated)", "2050-06-21": "Eid al-Fitr Second Day (estimated)", "2050-08-17": "Independence Day", diff --git a/tests/countries/test_indonesia.py b/tests/countries/test_indonesia.py index 33b76a5c0..8140ea499 100644 --- a/tests/countries/test_indonesia.py +++ b/tests/countries/test_indonesia.py @@ -12,7 +12,7 @@ from unittest import TestCase -from holidays.constants import GOVERNMENT +from holidays.constants import GOVERNMENT, PUBLIC from holidays.countries.indonesia import Indonesia, ID, IDN from tests.common import CommonCountryTests @@ -20,25 +20,138 @@ class TestIndonesia(CommonCountryTests, TestCase): @classmethod def setUpClass(cls): - super().setUpClass(Indonesia, years=range(1946, 2050)) + super().setUpClass(Indonesia, years=range(1946, 2050), years_non_observed=(2004, 2020)) def test_country_aliases(self): self.assertAliases(Indonesia, ID, IDN) def test_no_holidays(self): - self.assertNoHolidays(Indonesia(years=1945)) + self.assertNoHolidays(Indonesia(years=1945, categories=(GOVERNMENT, PUBLIC))) def test_special(self): - self.assertHoliday("2018-06-27", "2019-04-17", "2020-12-09") + dt = ( + # All Election Types. + "1999-06-07", + "2004-04-05", + "2004-07-05", + "2004-09-20", + "2009-04-09", + "2009-07-08", + "2014-04-09", + "2014-07-09", + "2015-12-09", + "2017-02-15", + "2018-06-27", + "2019-04-17", + "2020-12-09", + "2024-02-14", + ) + dt_observed = ("2004-11-16",) + self.assertHoliday(dt, dt_observed) + self.assertNoNonObservedHoliday(dt_observed) def test_special_government(self): - self.assertHoliday( - Indonesia(categories=GOVERNMENT), + dt = ( + # Joint Holidays (Cuti Bersama) + "2002-12-05", + "2002-12-09", + "2002-12-10", + "2002-12-26", + "2003-11-24", + "2003-11-27", + "2003-11-28", + "2003-12-26", + "2004-11-17", + "2004-11-18", + "2004-11-19", + "2005-11-02", + "2005-11-05", + "2005-11-07", + "2005-11-08", + "2006-03-31", + "2006-05-26", + "2006-08-18", + "2006-10-23", + "2006-10-26", + "2006-10-27", + "2007-05-18", + "2007-10-12", + "2007-10-15", + "2007-10-16", + "2007-10-17", + "2007-10-18", + "2007-10-19", + "2007-12-21", + "2007-12-24", + "2007-12-26", + "2007-12-31", + "2008-01-11", + "2008-09-29", + "2008-09-30", + "2008-10-03", + "2008-12-26", + "2009-01-02", + "2009-09-18", + "2009-09-23", + "2009-12-24", + "2010-09-09", + "2010-09-13", + "2010-12-24", + "2011-05-16", + "2011-08-29", + "2011-09-01", + "2011-09-02", + "2011-12-26", + "2012-05-18", + "2012-08-21", + "2012-08-22", + "2012-11-16", + "2012-12-24", + "2012-12-31", + "2013-08-05", + "2013-08-06", + "2013-08-07", + "2013-10-14", + "2013-12-26", + "2014-07-30", + "2014-07-31", + "2014-08-01", + "2014-12-26", + "2015-07-16", + "2015-07-20", + "2015-07-21", + "2016-07-04", + "2016-07-05", + "2016-07-08", + "2016-12-26", + "2017-06-23", + "2017-06-27", + "2017-06-28", + "2017-06-29", + "2017-06-30", + "2017-12-26", + "2018-06-11", + "2018-06-12", + "2018-06-13", + "2018-06-14", + "2018-06-18", + "2018-06-19", + "2018-06-20", + "2018-12-24", + "2019-06-03", + "2019-06-04", + "2019-06-07", + "2019-12-24", + "2020-08-21", + "2020-10-28", + "2020-10-30", + "2020-12-24", + "2021-05-12", + "2021-12-24", "2022-04-29", "2022-05-04", "2022-05-05", "2022-05-06", - "2022-12-26", "2023-01-23", "2023-03-23", "2023-04-19", @@ -46,7 +159,36 @@ def test_special_government(self): "2023-04-21", "2023-04-24", "2023-04-25", + "2023-06-02", + "2023-06-28", + "2023-06-30", "2023-12-26", + "2024-02-09", + "2024-03-12", + "2024-04-08", + "2024-04-09", + "2024-04-12", + "2024-04-15", + "2024-05-10", + "2024-05-24", + "2024-06-18", + "2024-12-26", + "2025-01-28", + "2025-03-28", + "2025-04-02", + "2025-04-03", + "2025-04-04", + "2025-04-07", + "2025-05-13", + "2025-05-30", + "2025-06-09", + "2025-12-26", + ) + dt_observed = ("2020-12-31",) + self.assertHoliday(Indonesia(categories=GOVERNMENT), dt, dt_observed) + self.assertNoNonObservedHoliday( + Indonesia(categories=GOVERNMENT, observed=False), + dt_observed, ) def test_new_years_day(self): @@ -78,10 +220,8 @@ def test_lunar_new_year(self): "2022-02-01", ) years_found = {dt.year for dt in self.holidays.get_named(name, lookup="startswith")} - self.assertTrue( - set(range(1946, 2050)).difference(set(range(1968, 2003))).issubset(years_found) - ) - self.assertFalse(set(range(1968, 2003)).intersection(years_found)) + self.assertTrue(set(range(2003, 2050)).issubset(years_found)) + self.assertFalse(set(range(1946, 2003)).intersection(years_found)) def test_day_of_silence(self): name = "Hari Suci Nyepi" @@ -108,8 +248,23 @@ def test_good_friday(self): "2022-04-15", "2023-04-07", ) - self.assertHolidayName(name, range(1953, 1963), range(1971, 2050)) - self.assertNoHolidayName(name, range(1946, 1953), range(1963, 1971)) + self.assertHolidayName(name, range(1953, 1964), range(1971, 2050)) + self.assertNoHolidayName(name, range(1946, 1953), range(1964, 1971)) + + def test_easter_sunday(self): + name = "Kebangkitan Yesus Kristus" + self.assertHolidayName( + name, + "2024-03-31", + "2025-04-20", + "2026-04-05", + "2027-03-28", + "2028-04-16", + "2029-04-01", + "2030-04-21", + ) + self.assertHolidayName(name, range(2024, 2050)) + self.assertNoHolidayName(name, range(1946, 2024)) def test_easter_monday(self): name = "Hari kedua Paskah" @@ -126,10 +281,10 @@ def test_easter_monday(self): "1961-04-03", "1962-04-23", ) - self.assertHolidayName(name, range(1953, 1963)) - self.assertNoHolidayName(name, range(1946, 1953), range(1963, 2050)) + self.assertHolidayName(name, range(1953, 1964)) + self.assertNoHolidayName(name, range(1946, 1953), range(1964, 2050)) - def test_buddhas_birthday(self): + def test_vesak_day(self): name = "Hari Raya Waisak" self.assertHolidayName( name, @@ -146,12 +301,12 @@ def test_buddhas_birthday(self): def test_labor_day(self): name = "Hari Buruh Internasional" - self.assertHolidayName(name, (f"{year}-05-01" for year in range(1953, 1969))) + self.assertHolidayName(name, (f"{year}-05-01" for year in range(1953, 1968))) self.assertHolidayName(name, (f"{year}-05-01" for year in range(2014, 2050))) self.assertNoHoliday( - f"{year}-05-01" for year in set(range(1969, 2014)).difference({2004, 2008}) + f"{year}-05-01" for year in set(range(1968, 2014)).difference({2004, 2008}) ) - self.assertNoHolidayName(name, range(1969, 2014)) + self.assertNoHolidayName(name, range(1968, 2014)) def test_ascension_day(self): name = "Kenaikan Yesus Kristus" @@ -164,8 +319,8 @@ def test_ascension_day(self): "2022-05-26", "2023-05-18", ) - self.assertHolidayName(name, range(1953, 1963), range(1968, 2050)) - self.assertNoHolidayName(name, range(1946, 1953), range(1963, 1968)) + self.assertHolidayName(name, range(1953, 1964), range(1968, 2050)) + self.assertNoHolidayName(name, range(1946, 1953), range(1964, 1968)) def test_whit_monday(self): name = "Hari kedua Pentakosta" @@ -182,8 +337,8 @@ def test_whit_monday(self): "1961-05-22", "1962-06-11", ) - self.assertHolidayName(name, range(1953, 1963)) - self.assertNoHolidayName(name, range(1946, 1953), range(1963, 2050)) + self.assertHolidayName(name, range(1953, 1964)) + self.assertNoHolidayName(name, range(1946, 1953), range(1964, 2050)) def test_pancasila_day(self): name = "Hari Lahir Pancasila" @@ -228,11 +383,10 @@ def test_heroes_day(self): def test_christmas_day(self): name = "Hari Raya Natal" self.assertHolidayName(name, (f"{year}-12-25" for year in range(1953, 2050))) - self.assertNoHoliday(f"{year}-12-25" for year in range(1946, 1953)) - self.assertNoHolidayName(name, range(1946, 1953)) + self.assertNoHolidayName(name, (f"{year}-12-25" for year in range(1946, 1953))) def test_eid_al_fitr(self): - name = "Hari Raya Idulfitri" + name = "Hari Raya Idul Fitri" self.assertHolidayName( name, "2018-06-15", @@ -247,7 +401,7 @@ def test_eid_al_fitr(self): self.assertFalse(set(range(1946, 1953)).intersection(years_found)) def test_eid_al_fitr_second_day(self): - name = "Hari kedua dari Hari Raya Idulfitri" + name = "Hari kedua dari Hari Raya Idul Fitri" self.assertHolidayName( name, "2018-06-16", @@ -262,7 +416,7 @@ def test_eid_al_fitr_second_day(self): self.assertFalse(set(range(1946, 1953)).intersection(years_found)) def test_eid_al_adha(self): - name = "Hari Raya Iduladha" + name = "Hari Raya Idul Adha" self.assertHolidayName( name, "2018-08-22", @@ -290,10 +444,10 @@ def test_islamic_new_year(self): "2023-07-19", ) years_found = {dt.year for dt in self.holidays.get_named(name, lookup="startswith")} - self.assertTrue(set(range(1953, 1963)).issubset(years_found)) + self.assertTrue(set(range(1953, 1964)).issubset(years_found)) self.assertTrue(set(range(1968, 2050)).issubset(years_found)) self.assertFalse(set(range(1946, 1953)).intersection(years_found)) - self.assertFalse(set(range(1963, 1968)).intersection(years_found)) + self.assertFalse(set(range(1964, 1968)).intersection(years_found)) def test_prophets_birthday(self): name = "Maulid Nabi Muhammad" @@ -306,12 +460,12 @@ def test_prophets_birthday(self): "2022-10-08", ) years_found = {dt.year for dt in self.holidays.get_named(name, lookup="startswith")} - self.assertTrue(set(range(1953, 1963)).issubset(years_found)) + self.assertTrue(set(range(1953, 1964)).issubset(years_found)) self.assertTrue(set(range(1968, 2050)).issubset(years_found)) self.assertFalse(set(range(1946, 1953)).intersection(years_found)) - self.assertFalse(set(range(1963, 1968)).intersection(years_found)) + self.assertFalse(set(range(1964, 1968)).intersection(years_found)) - def test_prophets_ascension(self): + def test_isra_and_miraj(self): name = "Isra Mikraj Nabi Muhammad" self.assertHolidayName( name, @@ -343,9 +497,9 @@ def test_nuzul_al_quran(self): "1962-02-21", ) years_found = {dt.year for dt in self.holidays.get_named(name, lookup="startswith")} - self.assertTrue(set(range(1953, 1963)).issubset(years_found)) + self.assertTrue(set(range(1953, 1964)).issubset(years_found)) self.assertFalse(set(range(1946, 1953)).intersection(years_found)) - self.assertFalse(set(range(1963, 2050)).intersection(years_found)) + self.assertFalse(set(range(1964, 2050)).intersection(years_found)) def test_2021(self): self.assertHolidays( @@ -356,11 +510,11 @@ def test_2021(self): ("2021-03-14", "Hari Suci Nyepi"), ("2021-04-02", "Wafat Yesus Kristus"), ("2021-05-01", "Hari Buruh Internasional"), - ("2021-05-13", "Hari Raya Idulfitri; Kenaikan Yesus Kristus"), - ("2021-05-14", "Hari kedua dari Hari Raya Idulfitri"), + ("2021-05-13", "Hari Raya Idul Fitri; Kenaikan Yesus Kristus"), + ("2021-05-14", "Hari kedua dari Hari Raya Idul Fitri"), ("2021-05-26", "Hari Raya Waisak"), ("2021-06-01", "Hari Lahir Pancasila"), - ("2021-07-20", "Hari Raya Iduladha"), + ("2021-07-20", "Hari Raya Idul Adha"), ("2021-08-11", "Tahun Baru Islam"), ("2021-08-17", "Hari Kemerdekaan Republik Indonesia"), ("2021-10-19", "Maulid Nabi Muhammad"), @@ -376,12 +530,12 @@ def test_2022(self): ("2022-03-03", "Hari Suci Nyepi"), ("2022-04-15", "Wafat Yesus Kristus"), ("2022-05-01", "Hari Buruh Internasional"), - ("2022-05-02", "Hari Raya Idulfitri"), - ("2022-05-03", "Hari kedua dari Hari Raya Idulfitri"), + ("2022-05-02", "Hari Raya Idul Fitri"), + ("2022-05-03", "Hari kedua dari Hari Raya Idul Fitri"), ("2022-05-16", "Hari Raya Waisak"), ("2022-05-26", "Kenaikan Yesus Kristus"), ("2022-06-01", "Hari Lahir Pancasila"), - ("2022-07-10", "Hari Raya Iduladha"), + ("2022-07-10", "Hari Raya Idul Adha"), ("2022-07-30", "Tahun Baru Islam"), ("2022-08-17", "Hari Kemerdekaan Republik Indonesia"), ("2022-10-08", "Maulid Nabi Muhammad"), @@ -395,22 +549,21 @@ def test_l10n_default(self): ("2022-02-28", "Isra Mikraj Nabi Muhammad"), ("2022-03-03", "Hari Suci Nyepi"), ("2022-04-15", "Wafat Yesus Kristus"), - ("2022-04-29", "Cuti Bersama Hari Raya Idulfitri"), + ("2022-04-29", "Cuti Bersama Hari Raya Idul Fitri"), ("2022-05-01", "Hari Buruh Internasional"), - ("2022-05-02", "Hari Raya Idulfitri"), - ("2022-05-03", "Hari kedua dari Hari Raya Idulfitri"), - ("2022-05-04", "Cuti Bersama Hari Raya Idulfitri"), - ("2022-05-05", "Cuti Bersama Hari Raya Idulfitri"), - ("2022-05-06", "Cuti Bersama Hari Raya Idulfitri"), + ("2022-05-02", "Hari Raya Idul Fitri"), + ("2022-05-03", "Hari kedua dari Hari Raya Idul Fitri"), + ("2022-05-04", "Cuti Bersama Hari Raya Idul Fitri"), + ("2022-05-05", "Cuti Bersama Hari Raya Idul Fitri"), + ("2022-05-06", "Cuti Bersama Hari Raya Idul Fitri"), ("2022-05-16", "Hari Raya Waisak"), ("2022-05-26", "Kenaikan Yesus Kristus"), ("2022-06-01", "Hari Lahir Pancasila"), - ("2022-07-10", "Hari Raya Iduladha"), + ("2022-07-10", "Hari Raya Idul Adha"), ("2022-07-30", "Tahun Baru Islam"), ("2022-08-17", "Hari Kemerdekaan Republik Indonesia"), ("2022-10-08", "Maulid Nabi Muhammad"), ("2022-12-25", "Hari Raya Natal"), - ("2022-12-26", "Cuti Bersama Hari Raya Natal"), ) def test_l10n_en_us(self): @@ -428,7 +581,7 @@ def test_l10n_en_us(self): ("2022-05-04", "Eid al-Fitr Joint Holiday"), ("2022-05-05", "Eid al-Fitr Joint Holiday"), ("2022-05-06", "Eid al-Fitr Joint Holiday"), - ("2022-05-16", "Buddha's Birthday"), + ("2022-05-16", "Vesak Day"), ("2022-05-26", "Ascension Day"), ("2022-06-01", "Pancasila Day"), ("2022-07-10", "Eid al-Adha"), @@ -436,7 +589,31 @@ def test_l10n_en_us(self): ("2022-08-17", "Independence Day"), ("2022-10-08", "Prophet's Birthday"), ("2022-12-25", "Christmas Day"), - ("2022-12-26", "Christmas Joint Holiday"), + ) + + def test_l10n_th(self): + self.assertLocalizedHolidays( + "th", + ("2022-01-01", "วันขึ้นปีใหม่"), + ("2022-02-01", "วันตรุษจีน"), + ("2022-02-28", "วันเมี๊ยะราจ"), + ("2022-03-03", "วันแห่งความเงียบ"), + ("2022-04-15", "วันศุกร์ประเสริฐ"), + ("2022-04-29", "หยุดร่วมพิเศษวันอีฎิ้ลฟิตริ"), + ("2022-05-01", "วันแรงงานสากล"), + ("2022-05-02", "วันอีฎิ้ลฟิตริ"), + ("2022-05-03", "วันอีฎิ้ลฟิตริวันที่สอง"), + ("2022-05-04", "หยุดร่วมพิเศษวันอีฎิ้ลฟิตริ"), + ("2022-05-05", "หยุดร่วมพิเศษวันอีฎิ้ลฟิตริ"), + ("2022-05-06", "หยุดร่วมพิเศษวันอีฎิ้ลฟิตริ"), + ("2022-05-16", "วันวิสาขบูชา"), + ("2022-05-26", "วันสมโภชพระเยซูเจ้าเสด็จขึ้นสวรรค์"), + ("2022-06-01", "วันปัญจศีล"), + ("2022-07-10", "วันอีดิ้ลอัฎฮา"), + ("2022-07-30", "วันขึ้นปีใหม่อิสลาม"), + ("2022-08-17", "วันประกาศอิสรภาพสาธารณรัฐอินโดนีเซีย"), + ("2022-10-08", "วันเมาลิดนบี"), + ("2022-12-25", "วันคริสต์มาส"), ) def test_l10n_uk(self): @@ -462,5 +639,4 @@ def test_l10n_uk(self): ("2022-08-17", "День незалежності Республіки Індонезія"), ("2022-10-08", "День народження пророка Мухаммада"), ("2022-12-25", "Різдво Христове"), - ("2022-12-26", "Додатковий вихідний на Різдво Христове"), ) From e61c6edf7e9e23cc598bbdbba1f7842144f8d09c Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com> Date: Fri, 1 Nov 2024 09:25:58 -0700 Subject: [PATCH 25/32] Simplify PR template (#2099) --- .github/PULL_REQUEST_TEMPLATE.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1e8a46816..11de1c523 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -34,8 +34,7 @@ Your PR description goes here. --> - [ ] I've followed the [contributing guidelines][contributing-guidelines] -- [ ] I've run `make pre-commit`, it didn't generate any changes -- [ ] I've run `make test`, all tests passed locally +- [ ] I've successfully run `make check`, all checks and tests are green