Repository: vacanza/holidays
Pull request #2145 (2024-11-27 06:14:27)

Update Finland holidays: fix Independence Day appearing pre-1917
<!--
  Thanks for contributing to holidays!
-->

## Proposed change

<!--
  Describe the big picture of your changes.
  Don't forget to link your PR to an existing issue if any.
-->

Fixing Finland's Independence Day appearing pre-1917, also standardized the test cases end date to 2049 as other entries.

## Type of change

<!--
  Type of change you want to introduce. Please, check one (1) box only!
  If your PR requires multiple boxes to be checked, most likely it needs to
  be split into multiple PRs.
-->

- [ ] New country/market holidays support (thank you!)
- [x] Supported country/market holidays update (calendar discrepancy fix, localization)
- [ ] Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
- [ ] Dependency update (version deprecation/pin/upgrade)
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] Breaking change (a code change causing existing functionality to break)
- [ ] New feature (new `holidays` functionality in general)

## Checklist

<!--
  Put an `x` in the boxes that apply. You can change them after PR is created.
-->

- [x] I've followed the [contributing guidelines][contributing-guidelines]
- [x] I've successfully run `make check`, all checks and tests are green

<!--
  Thanks again for your contribution!
-->

[contributing-guidelines]: https://github.com/vacanza/holidays/blob/dev/CONTRIBUTING.rst
[docs]: https://github.com/vacanza/holidays/tree/dev/docs/source


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/vacanza/holidays/pull/2145?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza) Report
Attention: Patch coverage is `50.00000%` with `1 line` in your changes missing coverage. Please review.
> Project coverage is 99.99%. Comparing base [(`2922431`)](https://app.codecov.io/gh/vacanza/holidays/commit/29224319c4972699d31bd8439969be87ee9983c3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza) to head [(`beea886`)](https://app.codecov.io/gh/vacanza/holidays/commit/beea88606be4837399cc41ede87ef4558775c7c3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza).

| [Files with missing lines](https://app.codecov.io/gh/vacanza/holidays/pull/2145?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza) | Patch % | Lines |
|---|---|---|
| [holidays/countries/finland.py](https://app.codecov.io/gh/vacanza/holidays/pull/2145?src=pr&el=tree&filepath=holidays%2Fcountries%2Ffinland.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza#diff-aG9saWRheXMvY291bnRyaWVzL2ZpbmxhbmQucHk=) | 50.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/vacanza/holidays/pull/2145?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza) |

<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff             @@
##               dev    #2145      +/-   ##
===========================================
- Coverage   100.00%   99.99%   -0.01%     
===========================================
  Files          194      194              
  Lines        11716    11717       +1     
  Branches      1771     1772       +1     
===========================================
  Hits         11716    11716              
- Partials         0        1       +1     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/vacanza/holidays/pull/2145?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza).


Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e4ed1ee6..8bef7edb 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -39,7 +39,7 @@ repos:
           - docs/file_header.txt
 
   - repo: https://github.com/pycqa/bandit
-    rev: 1.7.10
+    rev: 1.8.0
     hooks:
       - id: bandit
         additional_dependencies:
diff --git a/holidays/countries/argentina.py b/holidays/countries/argentina.py
index c1e34e0e..4758b10e 100644
--- a/holidays/countries/argentina.py
+++ b/holidays/countries/argentina.py
@@ -33,16 +33,31 @@ class Argentina(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
     - Based on:
         https://es.wikipedia.org/wiki/Anexo:D%C3%ADas_feriados_en_Argentina
     - [Ley 24455] Belgrano and San Martin Day as third Monday
+        https://servicios.infoleg.gob.ar/infolegInternet/anexos/0-4999/782/norma.htm
     - [Ley 27399] - For 2018++
         https://www.argentina.gob.ar/normativa/nacional/ley-27399-281835/texto
     - [Decreto 1585/2010] - 2011-2013 Bridge Holidays, Movable Holidays Law
+        https://www.argentina.gob.ar/normativa/nacional/decreto-1585-2010-174391/texto
     - [Decreto 1768/2013] - 2014-2016 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-1768-2013-222021/texto
     - [Decretos 52-80-923/2017] - 2017-2019 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-52-2017-271094/texto
+        https://www.argentina.gob.ar/normativa/nacional/decreto-80-2017-271382/texto
+        https://www.argentina.gob.ar/normativa/nacional/decreto-923-2017-287145
     - [Decreto 717/2019] - 2020 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-717-2019-330204/texto
     - [Decreto 297/2020] - Veteran Day moved due to Covid-19
+        https://www.argentina.gob.ar/normativa/nacional/decreto-297-2020-335741/texto
     - [Decreto 947/2020] - 2021 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-947-2020-344620/texto
     - [Decreto 789/2021] - 2022 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-789-2021-356678/texto
     - [Decreto 764/2022] - 2023 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-764-2022-375264/texto
+    - [Decreto 106/2023] - 2024 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-106-2023-395689/texto
+    - [Decreto 1017/2024] - 2025 Bridge Holidays
+        https://www.argentina.gob.ar/normativa/nacional/decreto-1027-2024-406417/texto
     - [Always Update Calendar Year Link]
         https://www.argentina.gob.ar/interior/feriados
         http://servicios.lanacion.com.ar/feriados
@@ -60,7 +75,8 @@ class Argentina(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
         https://servicios.lanacion.com.ar/app-mobile/feriados/2016
         https://servicios.lanacion.com.ar/app-mobile/feriados/2015
 
-        Movable Holidays Laws:
+    Movable Holidays Laws:
+
     - Decreto 1584/2010: 2010-11-03
         - AUG 17, OCT 12, NOV 20 Holidays will always be on MON
     - Decreto 52/2017: 2017-01-23 (Reconfirmed in Ley 27399)
@@ -345,4 +361,9 @@ class ArgentinaStaticHolidays:
             (JUN, 21, arg_bridge_public_holiday),
             (OCT, 11, arg_bridge_public_holiday),
         ),
+        2025: (
+            (MAY, 2, arg_bridge_public_holiday),
+            (AUG, 15, arg_bridge_public_holiday),
+            (NOV, 21, arg_bridge_public_holiday),
+        ),
     }
diff --git a/holidays/countries/canada.py b/holidays/countries/canada.py
index ae62cafe..e0379f6a 100644
--- a/holidays/countries/canada.py
+++ b/holidays/countries/canada.py
@@ -37,6 +37,7 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
         - http://web2.gov.mb.ca/laws/statutes/ccsm/r120e.php
         - https://www2.gnb.ca/content/gnb/en/departments/elg/local_government/content/governance/content/days_of_rest_act.html
         - https://www.ontario.ca/document/your-guide-employment-standards-act-0/public-holidays
+        - https://www.gov.nu.ca/en/print/pdf/node/52266
         - https://www.officeholidays.com/countries/canada/
         - https://www.timeanddate.com/holidays/canada/
     """
@@ -361,6 +362,10 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
             # Victoria Day.
             self._add_holiday_1st_mon_before_may_24(tr("Victoria Day"))
 
+        if self._year >= 2020:
+            # Nunavut Day.
+            self._add_holiday_jul_9(tr("Nunavut Day"))
+
         if self._year >= 1900:
             # Civic Holiday.
             self._add_holiday_1st_mon_of_aug(tr("Civic Holiday"))
@@ -376,8 +381,7 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
             self._add_remembrance_day(tr("Remembrance Day"))
 
     def _populate_subdiv_nu_optional_holidays(self):
-        if self._year >= 2000:
-            # Nunavut Day.
+        if 2000 <= self._year <= 2019:
             name = tr("Nunavut Day")
             if self._year == 2000:
                 self._add_holiday_apr_1(name)
diff --git a/holidays/countries/finland.py b/holidays/countries/finland.py
index 40ae4359..b40e0788 100644
--- a/holidays/countries/finland.py
+++ b/holidays/countries/finland.py
@@ -28,6 +28,7 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
         - https://en.wikipedia.org/wiki/Flag_flying_days_in_Finland#Customary_flag_days
         - https://intermin.fi/en/flag-and-arms/flag-flying-days
         - https://intermin.fi/en/flag-and-arms/flag-days/2024
+        - https://en.wikipedia.org/wiki/Independence_Day_(Finland)
     """
 
     country = "FI"
@@ -90,8 +91,9 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
         else:
             self._add_holiday_nov_1(name)
 
-        # Independence Day.
-        self._add_holiday_dec_6(tr("Itsenäisyyspäivä"))
+        if self._year >= 1917:
+            # Independence Day.
+            self._add_holiday_dec_6(tr("Itsenäisyyspäivä"))
 
         # Christmas Eve.
         self._add_christmas_eve(tr("Jouluaatto"))
diff --git a/holidays/countries/timor_leste.py b/holidays/countries/timor_leste.py
index 38b27999..6aef1231 100644
--- a/holidays/countries/timor_leste.py
+++ b/holidays/countries/timor_leste.py
@@ -486,5 +486,7 @@ class TimorLesteStaticHolidays:
             (SEP, 11, pope_francis_visit),
             # https://timor-leste.gov.tl/?p=40592&lang=en
             (OCT, 31, special_national_holidays),
+            # https://timor-leste.gov.tl/?p=40955&lang=en
+            (NOV, 29, special_national_holidays),
         ),
     }
diff --git a/requirements/dev.txt b/requirements/dev.txt
index 9caa3f9d..8ebd4d5d 100644
--- a/requirements/dev.txt
+++ b/requirements/dev.txt
@@ -7,7 +7,7 @@ hijridate==2.5.0
 lingva==5.0.4
 pre-commit==4.0.1
 pygithub==2.5.0
-ruff==0.7.4
+ruff==0.8.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
diff --git a/snapshots/countries/AR_COMMON.json b/snapshots/countries/AR_COMMON.json
index 1a0eda8b..9f7d7e8e 100644
--- a/snapshots/countries/AR_COMMON.json
+++ b/snapshots/countries/AR_COMMON.json
@@ -952,12 +952,15 @@
     "2025-04-02": "Veterans Day and the Fallen in the Malvinas War",
     "2025-04-18": "Good Friday",
     "2025-05-01": "Labor Day",
+    "2025-05-02": "Bridge Public Holiday",
     "2025-05-25": "May Revolution Day",
     "2025-06-16": "Pass to the Immortality of General Don Mart\u00edn Miguel de G\u00fcemes (observed)",
     "2025-06-20": "Pass to the Immortality of General Don Manuel Belgrano",
     "2025-07-09": "Independence Day",
+    "2025-08-15": "Bridge Public Holiday",
     "2025-08-17": "Pass to the Immortality of General Don Jos\u00e9 de San Martin",
     "2025-10-12": "Respect for Cultural Diversity Day",
+    "2025-11-21": "Bridge Public Holiday",
     "2025-11-24": "National Sovereignty Day (observed)",
     "2025-12-08": "Immaculate Conception",
     "2025-12-25": "Christmas Day",
diff --git a/snapshots/countries/TL_COMMON.json b/snapshots/countries/TL_COMMON.json
index 45724837..74cf769c 100644
--- a/snapshots/countries/TL_COMMON.json
+++ b/snapshots/countries/TL_COMMON.json
@@ -508,6 +508,7 @@
     "2024-11-03": "National Women's Day",
     "2024-11-12": "National Youth Day",
     "2024-11-28": "Proclamation of Independence Day",
+    "2024-11-29": "National Holidays (Special)",
     "2024-12-07": "Memorial Day",
     "2024-12-08": "Day of Our Lady of Immaculate Conception and Timor-Leste Patroness",
     "2024-12-10": "World Human Rights Day",


Test patch:
diff --git a/requirements/tests.txt b/requirements/tests.txt
index eca17354..77ad1355 100644
--- a/requirements/tests.txt
+++ b/requirements/tests.txt
@@ -1,6 +1,6 @@
 # Test requirements.
 
-coverage==7.6.7
+coverage==7.6.8
 importlib-metadata==8.5.0
 numpy<2.1.0; python_version < '3.10'
 numpy==2.1.2; python_version >= '3.10'
diff --git a/tests/countries/test_argentina.py b/tests/countries/test_argentina.py
index d87207c7..8c874045 100644
--- a/tests/countries/test_argentina.py
+++ b/tests/countries/test_argentina.py
@@ -26,6 +26,52 @@ class TestArgentina(CommonCountryTests, TestCase):
     def test_country_aliases(self):
         self.assertAliases(Argentina, AR, ARG)
 
+    def test_special_holidays(self):
+        dt = (
+            "2011-03-25",
+            "2011-12-09",
+            "2012-02-27",
+            "2012-04-30",
+            "2012-09-24",
+            "2012-12-24",
+            "2013-01-31",
+            "2013-02-20",
+            "2013-04-01",
+            "2013-06-21",
+            "2014-05-02",
+            "2014-12-26",
+            "2015-03-23",
+            "2015-12-07",
+            "2016-07-08",
+            "2016-12-09",
+            "2018-04-30",
+            "2018-12-24",
+            "2018-12-31",
+            "2019-07-08",
+            "2019-08-19",
+            "2019-10-14",
+            "2020-03-23",
+            "2020-07-10",
+            "2020-12-07",
+            "2021-05-24",
+            "2021-10-08",
+            "2021-11-22",
+            "2022-05-18",
+            "2022-10-07",
+            "2022-11-21",
+            "2022-12-09",
+            "2023-05-26",
+            "2023-06-19",
+            "2023-10-13",
+            "2024-04-01",
+            "2024-06-21",
+            "2024-10-11",
+            "2025-05-02",
+            "2025-08-15",
+            "2025-11-21",
+        )
+        self.assertHoliday(dt)
+
     def test_new_years_day(self):
         self.assertHoliday(f"{year}-01-01" for year in range(1950, 2050))
 
diff --git a/tests/countries/test_canada.py b/tests/countries/test_canada.py
index d7d2b44e..5090994c 100644
--- a/tests/countries/test_canada.py
+++ b/tests/countries/test_canada.py
@@ -695,13 +695,17 @@ class TestCanada(CommonCountryTests, TestCase):
 
     def test_nunavut_day(self):
         name = "Nunavut Day"
+        nu_holidays = self.prov_hols["NU"]
+        nu_opt_holidays = self.prov_opt_hols["NU"]
         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 = 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)))
+        self.assertHolidayName(name, nu_holidays, (f"{year}-07-09" for year in range(2020, 2050)))
+        self.assertNoHolidayName(name, nu_holidays, range(1867, 2020))
+        self.assertNoHoliday(nu_opt_holidays, "1999-07-09", "2000-07-09", "2020-07-09")
+        self.assertHolidayName(
+            name, nu_opt_holidays, "2000-04-01", (f"{year}-07-09" for year in range(2001, 2020))
+        )
+        self.assertNoHolidayName(name, nu_opt_holidays, range(1867, 2000), range(2020, 2050))
 
     def test_national_patriots_day(self):
         name = "National Patriots' Day"
@@ -803,6 +807,7 @@ class TestCanada(CommonCountryTests, TestCase):
             "Saint Jean Baptiste Day",
             "Canada Day",
             "Canada Day; Memorial Day",
+            "Nunavut Day",
             "British Columbia Day",
             "Civic Holiday",
             "New Brunswick Day",
diff --git a/tests/countries/test_finland.py b/tests/countries/test_finland.py
index c37494b6..a9762204 100644
--- a/tests/countries/test_finland.py
+++ b/tests/countries/test_finland.py
@@ -21,13 +21,13 @@ class TestFinland(CommonCountryTests, TestCase):
     @classmethod
     def setUpClass(cls):
         super().setUpClass(Finland)
-        cls.unofficial_holidays = Finland(categories=UNOFFICIAL, years=range(1853, 2031))
+        cls.unofficial_holidays = Finland(categories=UNOFFICIAL, years=range(1853, 2050))
 
     def test_country_aliases(self):
         self.assertAliases(Finland, FI, FIN)
 
     def test_fixed_holidays(self):
-        for year in range(2010, 2030):
+        for year in range(2010, 2050):
             self.assertHoliday(
                 f"{year}-01-01",
                 f"{year}-01-06",
@@ -167,12 +167,18 @@ class TestFinland(CommonCountryTests, TestCase):
             "1957-11-01",
         )
 
+    def test_independence_day(self):
+        name = "Itsenäisyyspäivä"
+        self.assertHolidayName(name, (f"{year}-12-06" for year in range(1917, 2050)))
+        self.assertNoHoliday(f"{year}-12-06" for year in range(1853, 1917))
+        self.assertNoHolidayName(name, range(1853, 1917))
+
     def _test_unofficial_holiday(self, name, since):
         start_year, month, day = (int(part) for part in since.split("-"))
         self.assertHolidayName(
             name,
             self.unofficial_holidays,
-            (f"{year}-{month}-{day}" for year in range(start_year, 2031)),
+            (f"{year}-{month}-{day}" for year in range(start_year, 2050)),
         )
         self.assertNoHolidayName(name, self.unofficial_holidays, start_year - 1)
 
diff --git a/tests/countries/test_timor_leste.py b/tests/countries/test_timor_leste.py
index 48c3d311..850891bb 100644
--- a/tests/countries/test_timor_leste.py
+++ b/tests/countries/test_timor_leste.py
@@ -147,6 +147,7 @@ class TestTimorLeste(CommonCountryTests, TestCase):
             "2024-09-10",
             "2024-09-11",
             "2024-10-31",
+            "2024-11-29",
         )
 
     def test_2011_public(self):