Repository: vacanza/holidays
Pull request #2201 (2024-12-31 20:58:41)

Update XNYS: add a Day of Mourning for President Jimmy Carter
<!--
  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.
-->

Add new holiday for US markets.  1/9/2025: Day of Mourning for President Jimmy Carter.
https://apnews.com/article/stock-exchange-closes-jan-9-carter-death-32fe7dcc8546ed98d2408abf8f498b08

## 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


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=vacanza_python-holidays&pullRequest=2201) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=vacanza_python-holidays&pullRequest=2201&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=vacanza_python-holidays&pullRequest=2201&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=vacanza_python-holidays&pullRequest=2201&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=vacanza_python-holidays&pullRequest=2201&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=vacanza_python-holidays&pullRequest=2201&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=vacanza_python-holidays&pullRequest=2201)


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/vacanza/holidays/pull/2201?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 100.00%. Comparing base [(`dc9877b`)](https://app.codecov.io/gh/vacanza/holidays/commit/dc9877b2a7573e1cf1c6b9f0a551339cdbd7f20d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza) to head [(`1500b66`)](https://app.codecov.io/gh/vacanza/holidays/commit/1500b66b675626a152d805f340bc5be8b1a70c14?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vacanza).
> Report is 1 commits behind head on dev.

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


```diff
@@            Coverage Diff            @@
##               dev     #2201   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          195       195           
  Lines        11763     11762    -1     
  Branches      1700      1699    -1     
=========================================
- Hits         11763     11762    -1     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/vacanza/holidays/pull/2201?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 83f80d49..031c9055 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.14.0
+    rev: v1.14.1
     hooks:
       - id: mypy
         additional_dependencies:
diff --git a/README.rst b/README.rst
index baeacb0e..60579974 100644
--- a/README.rst
+++ b/README.rst
@@ -718,7 +718,7 @@ All other default values are highlighted with bold:
    * - Norway
      - NO
      -
-     - en_US, **no**, uk
+     - en_US, **no**, th, uk
      -
    * - Pakistan
      - PK
diff --git a/holidays/countries/norway.py b/holidays/countries/norway.py
index 7c12f284..87c5c1ba 100644
--- a/holidays/countries/norway.py
+++ b/holidays/countries/norway.py
@@ -35,7 +35,7 @@ class Norway(HolidayBase, ChristianHolidays, InternationalHolidays):
 
     country = "NO"
     default_language = "no"
-    supported_languages = ("en_US", "no", "uk")
+    supported_languages = ("en_US", "no", "th", "uk")
 
     def __init__(self, include_sundays=False, *args, **kwargs):
         """
diff --git a/holidays/financial/ny_stock_exchange.py b/holidays/financial/ny_stock_exchange.py
index 3a1599b2..92213300 100644
--- a/holidays/financial/ny_stock_exchange.py
+++ b/holidays/financial/ny_stock_exchange.py
@@ -245,4 +245,5 @@ class NewYorkStockExchangeStaticHolidays:
             (OCT, 30, "Hurricane Sandy"),
         ),
         2018: (DEC, 5, "Day of Mourning for President George H.W. Bush"),
+        2025: (JAN, 9, "Day of Mourning for President Jimmy Carter"),
     }
diff --git a/holidays/locale/th/LC_MESSAGES/NO.po b/holidays/locale/th/LC_MESSAGES/NO.po
new file mode 100644
index 00000000..2043634b
--- /dev/null
+++ b/holidays/locale/th/LC_MESSAGES/NO.po
@@ -0,0 +1,80 @@
+#  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 <dr.prodigy.github@gmail.com> (c) 2017-2023
+#           ryanss <ryanssdev@icloud.com> (c) 2014-2017
+#  Website: https://github.com/vacanza/holidays
+#  License: MIT (see LICENSE file)
+#
+# Norway holidays th localization.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Holidays 0.64\n"
+"POT-Creation-Date: 2023-04-09 13:25+0300\n"
+"PO-Revision-Date: 2024-12-31 16:31+0300\n"
+"Last-Translator: ~ansntu <walk98@outlook.com>\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=2; plural=(n != 1);\n"
+"Generated-By: pygettext.py 1.5\n"
+"X-Generator: Poedit 3.2.2\n"
+
+#. New Year's Day.
+msgid "Første nyttårsdag"
+msgstr "วันขึ้นปีใหม่"
+
+#. Maundy Thursday.
+msgid "Skjærtorsdag"
+msgstr "วันพฤหัสศักดิสิทธิ์"
+
+#. Good Friday.
+msgid "Langfredag"
+msgstr "วันศุกร์ประเสริฐ"
+
+#. Easter Sunday.
+msgid "Første påskedag"
+msgstr "วันอาทิตย์อีสเตอร์"
+
+#. Easter Monday.
+msgid "Andre påskedag"
+msgstr "วันจันทร์อีสเตอร์"
+
+#. Labor Day.
+msgid "Arbeidernes dag"
+msgstr "วันแรงงาน"
+
+#. Constitution Day.
+msgid "Grunnlovsdag"
+msgstr "วันรัฐธรรมนูญ"
+
+#. Ascension Day.
+msgid "Kristi himmelfartsdag"
+msgstr "วันสมโภชพระเยซูเจ้าเสด็จขึ้นสวรรค์"
+
+#. Whit Sunday.
+msgid "Første pinsedag"
+msgstr "วันสมโภชพระจิตเจ้า"
+
+#. Whit Monday.
+msgid "Andre pinsedag"
+msgstr "วันจันทร์หลังวันสมโภชพระจิตเจ้า"
+
+#. Christmas Day.
+msgid "Første juledag"
+msgstr "วันคริสต์มาสวันแรก"
+
+#. Second Day of Christmas.
+msgid "Andre juledag"
+msgstr "วันคริสต์มาสวันที่สอง"
+
+#. Sunday.
+msgid "Søndag"
+msgstr "วันอาทิตย์"
diff --git a/snapshots/financial/XNYS.json b/snapshots/financial/XNYS.json
index 15f1e818..9ad02bad 100644
--- a/snapshots/financial/XNYS.json
+++ b/snapshots/financial/XNYS.json
@@ -710,6 +710,7 @@
     "2024-11-28": "Thanksgiving Day",
     "2024-12-25": "Christmas Day",
     "2025-01-01": "New Year's Day",
+    "2025-01-09": "Day of Mourning for President Jimmy Carter",
     "2025-01-20": "Martin Luther King Jr. Day",
     "2025-02-17": "Washington's Birthday",
     "2025-04-18": "Good Friday",


Test patch:
diff --git a/tests/countries/test_norway.py b/tests/countries/test_norway.py
index d0fd203f..9ef4e8e3 100644
--- a/tests/countries/test_norway.py
+++ b/tests/countries/test_norway.py
@@ -163,3 +163,20 @@ class TestNorway(CommonCountryTests, SundayHolidays, TestCase):
             ("2022-12-25", "Різдво Христове"),
             ("2022-12-26", "Другий день Різдва"),
         )
+
+    def test_l10n_th(self):
+        self.assertLocalizedHolidays(
+            "th",
+            ("2022-01-01", "วันขึ้นปีใหม่"),
+            ("2022-04-14", "วันพฤหัสศักดิสิทธิ์"),
+            ("2022-04-15", "วันศุกร์ประเสริฐ"),
+            ("2022-04-17", "วันอาทิตย์อีสเตอร์"),
+            ("2022-04-18", "วันจันทร์อีสเตอร์"),
+            ("2022-05-01", "วันแรงงาน"),
+            ("2022-05-17", "วันรัฐธรรมนูญ"),
+            ("2022-05-26", "วันสมโภชพระเยซูเจ้าเสด็จขึ้นสวรรค์"),
+            ("2022-06-05", "วันสมโภชพระจิตเจ้า"),
+            ("2022-06-06", "วันจันทร์หลังวันสมโภชพระจิตเจ้า"),
+            ("2022-12-25", "วันคริสต์มาสวันแรก"),
+            ("2022-12-26", "วันคริสต์มาสวันที่สอง"),
+        )
diff --git a/tests/financial/test_ny_stock_exchange.py b/tests/financial/test_ny_stock_exchange.py
index 31789982..c0fa0d1e 100644
--- a/tests/financial/test_ny_stock_exchange.py
+++ b/tests/financial/test_ny_stock_exchange.py
@@ -441,6 +441,7 @@ class TestNewYorkStockExchange(CommonFinancialTests, TestCase):
             date(2012, OCT, 29),  # Hurricane Sandy
             date(2012, OCT, 30),  # Hurricane Sandy
             date(2018, DEC, 5),  # Day of Mourning for President George H.W. Bush
+            date(2025, JAN, 9),  # Day of Mourning for President Jimmy Carter
         ]
 
         def _make_special_holiday_list(begin, end, days=None, weekends=False):