Skip to content

Commit

Permalink
Update Nicaragua holidays (#2011)
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico committed Sep 23, 2024
1 parent f4a4195 commit f12e3da
Show file tree
Hide file tree
Showing 24 changed files with 665 additions and 250 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ All other default values are highlighted with bold:
-
* - Nicaragua
- NI
- Departments: AN, AS, BO, CA, CI, CO, ES, GR, JI, LE, MD, **MN**, MS, MT, NS, RI, SJ
- Subdivisions: AN (Costa Caribe Norte), AS (Costa Caribe Sur), BO (Boaco), CA (Carazo), CI (Chinandega), CO (Chontales), ES (Estelí), GR (Granada), JI (Jinotega), LE (León), MD (Madriz), MN (Managua), MS (Masaya), MT (Matagalpa), NS (Nueva Segovia), RI (Rivas), SJ (Río San Juan)
- en_US, **es**, uk
-
* - Nigeria
Expand Down
33 changes: 30 additions & 3 deletions holidays/countries/nicaragua.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@


class Nicaragua(HolidayBase, ChristianHolidays, InternationalHolidays):
"""
References:
- https://en.wikipedia.org/wiki/Public_holidays_in_Nicaragua
- http://legislacion.asamblea.gob.ni/Normaweb.nsf/($All)/FA251B3C54F5BAEF062571C40055736C?OpenDocument
- http://legislacion.asamblea.gob.ni/normaweb.nsf/($All)/3B28EC51ABE2787706258848005ADBB0?OpenDocument
"""

country = "NI"
default_language = "es"
subdivisions = (
Expand All @@ -38,14 +45,30 @@ class Nicaragua(HolidayBase, ChristianHolidays, InternationalHolidays):
"RI",
"SJ",
)
subdivisions_aliases = {
"Costa Caribe Norte": "AN",
"Costa Caribe Sur": "AS",
"Boaco": "BO",
"Carazo": "CA",
"Chinandega": "CI",
"Chontales": "CO",
"Estelí": "ES",
"Granada": "GR",
"Jinotega": "JI",
"León": "LE",
"Madriz": "MD",
"Managua": "MN",
"Masaya": "MS",
"Matagalpa": "MT",
"Nueva Segovia": "NS",
"Río San Juan": "SJ",
"Rivas": "RI",
}
supported_languages = ("en_US", "es", "uk")

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
InternationalHolidays.__init__(self)
# Default subdivision to MN; prov for backwards compatibility
if not kwargs.get("subdiv", kwargs.get("prov")):
kwargs["subdiv"] = "MN"
super().__init__(*args, **kwargs)

def _populate_public_holidays(self):
Expand All @@ -61,6 +84,10 @@ def _populate_public_holidays(self):
# Labor Day.
self._add_labor_day(tr("Día del Trabajo"))

if self._year >= 2022:
# Mother's Day.
self._add_holiday_may_30(tr("Día de la Madre"))

if self._year >= 1979:
# Revolution Day.
self._add_holiday_jul_19(tr("Día de la Revolución"))
Expand Down
10 changes: 7 additions & 3 deletions holidays/locale/en_US/LC_MESSAGES/NI.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.27\n"
"Project-Id-Version: Python Holidays 0.58\n"
"POT-Creation-Date: 2023-03-05 12:23+0200\n"
"PO-Revision-Date: 2024-01-05 12:43+0200\n"
"PO-Revision-Date: 2024-09-21 17:40+0300\n"
"Last-Translator: ~Jhellico <[email protected]>\n"
"Language-Team: Python Holidays localization team\n"
"Language: en_US\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.4\n"
"X-Generator: Poedit 3.5\n"

#. New Year's Day.
msgid "Año Nuevo"
Expand All @@ -43,6 +43,10 @@ msgstr "Good Friday"
msgid "Día del Trabajo"
msgstr "Labor Day"

#. Mother's Day.
msgid "Día de la Madre"
msgstr "Mother's Day"

#. Revolution Day.
msgid "Día de la Revolución"
msgstr "Revolution Day"
Expand Down
10 changes: 7 additions & 3 deletions holidays/locale/es/LC_MESSAGES/NI.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.22\n"
"Project-Id-Version: Python Holidays 0.58\n"
"POT-Creation-Date: 2023-03-05 12:23+0200\n"
"PO-Revision-Date: 2023-03-05 12:43+0200\n"
"PO-Revision-Date: 2024-09-21 17:40+0300\n"
"Last-Translator: ~Jhellico <[email protected]>\n"
"Language-Team: Python Holidays localization team\n"
"Language: es\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
"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"
"X-Generator: Poedit 3.5\n"

#. New Year's Day.
msgid "Año Nuevo"
Expand All @@ -43,6 +43,10 @@ msgstr ""
msgid "Día del Trabajo"
msgstr ""

#. Mother's Day.
msgid "Día de la Madre"
msgstr ""

#. Revolution Day.
msgid "Día de la Revolución"
msgstr ""
Expand Down
10 changes: 7 additions & 3 deletions holidays/locale/uk/LC_MESSAGES/NI.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.27\n"
"Project-Id-Version: Python Holidays 0.58\n"
"POT-Creation-Date: 2023-03-05 12:23+0200\n"
"PO-Revision-Date: 2023-06-14 18:50+0300\n"
"PO-Revision-Date: 2024-09-21 17:40+0300\n"
"Last-Translator: ~Jhellico <[email protected]>\n"
"Language-Team: Python Holidays localization team\n"
"Language: uk\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
"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: pygettext.py 1.5\n"
"X-Generator: Poedit 3.2.2\n"
"X-Generator: Poedit 3.5\n"

#. New Year's Day.
msgid "Año Nuevo"
Expand All @@ -43,6 +43,10 @@ msgstr "Страсна пʼятниця"
msgid "Día del Trabajo"
msgstr "День праці"

#. Mother's Day.
msgid "Día de la Madre"
msgstr "День матері"

#. Revolution Day.
msgid "Día de la Revolución"
msgstr "День революції"
Expand Down
29 changes: 29 additions & 0 deletions snapshots/countries/NI_AN.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@
"2022-04-14": "Maundy Thursday",
"2022-04-15": "Good Friday",
"2022-05-01": "Labor Day",
"2022-05-30": "Mother's Day",
"2022-07-19": "Revolution Day",
"2022-09-14": "Battle of San Jacinto Day",
"2022-09-15": "Independence Day",
Expand All @@ -631,6 +632,7 @@
"2023-04-06": "Maundy Thursday",
"2023-04-07": "Good Friday",
"2023-05-01": "Labor Day",
"2023-05-30": "Mother's Day",
"2023-07-19": "Revolution Day",
"2023-09-14": "Battle of San Jacinto Day",
"2023-09-15": "Independence Day",
Expand All @@ -640,6 +642,7 @@
"2024-03-28": "Maundy Thursday",
"2024-03-29": "Good Friday",
"2024-05-01": "Labor Day",
"2024-05-30": "Mother's Day",
"2024-07-19": "Revolution Day",
"2024-09-14": "Battle of San Jacinto Day",
"2024-09-15": "Independence Day",
Expand All @@ -649,6 +652,7 @@
"2025-04-17": "Maundy Thursday",
"2025-04-18": "Good Friday",
"2025-05-01": "Labor Day",
"2025-05-30": "Mother's Day",
"2025-07-19": "Revolution Day",
"2025-09-14": "Battle of San Jacinto Day",
"2025-09-15": "Independence Day",
Expand All @@ -658,6 +662,7 @@
"2026-04-02": "Maundy Thursday",
"2026-04-03": "Good Friday",
"2026-05-01": "Labor Day",
"2026-05-30": "Mother's Day",
"2026-07-19": "Revolution Day",
"2026-09-14": "Battle of San Jacinto Day",
"2026-09-15": "Independence Day",
Expand All @@ -667,6 +672,7 @@
"2027-03-25": "Maundy Thursday",
"2027-03-26": "Good Friday",
"2027-05-01": "Labor Day",
"2027-05-30": "Mother's Day",
"2027-07-19": "Revolution Day",
"2027-09-14": "Battle of San Jacinto Day",
"2027-09-15": "Independence Day",
Expand All @@ -676,6 +682,7 @@
"2028-04-13": "Maundy Thursday",
"2028-04-14": "Good Friday",
"2028-05-01": "Labor Day",
"2028-05-30": "Mother's Day",
"2028-07-19": "Revolution Day",
"2028-09-14": "Battle of San Jacinto Day",
"2028-09-15": "Independence Day",
Expand All @@ -685,6 +692,7 @@
"2029-03-29": "Maundy Thursday",
"2029-03-30": "Good Friday",
"2029-05-01": "Labor Day",
"2029-05-30": "Mother's Day",
"2029-07-19": "Revolution Day",
"2029-09-14": "Battle of San Jacinto Day",
"2029-09-15": "Independence Day",
Expand All @@ -694,6 +702,7 @@
"2030-04-18": "Maundy Thursday",
"2030-04-19": "Good Friday",
"2030-05-01": "Labor Day",
"2030-05-30": "Mother's Day",
"2030-07-19": "Revolution Day",
"2030-09-14": "Battle of San Jacinto Day",
"2030-09-15": "Independence Day",
Expand All @@ -703,6 +712,7 @@
"2031-04-10": "Maundy Thursday",
"2031-04-11": "Good Friday",
"2031-05-01": "Labor Day",
"2031-05-30": "Mother's Day",
"2031-07-19": "Revolution Day",
"2031-09-14": "Battle of San Jacinto Day",
"2031-09-15": "Independence Day",
Expand All @@ -712,6 +722,7 @@
"2032-03-25": "Maundy Thursday",
"2032-03-26": "Good Friday",
"2032-05-01": "Labor Day",
"2032-05-30": "Mother's Day",
"2032-07-19": "Revolution Day",
"2032-09-14": "Battle of San Jacinto Day",
"2032-09-15": "Independence Day",
Expand All @@ -721,6 +732,7 @@
"2033-04-14": "Maundy Thursday",
"2033-04-15": "Good Friday",
"2033-05-01": "Labor Day",
"2033-05-30": "Mother's Day",
"2033-07-19": "Revolution Day",
"2033-09-14": "Battle of San Jacinto Day",
"2033-09-15": "Independence Day",
Expand All @@ -730,6 +742,7 @@
"2034-04-06": "Maundy Thursday",
"2034-04-07": "Good Friday",
"2034-05-01": "Labor Day",
"2034-05-30": "Mother's Day",
"2034-07-19": "Revolution Day",
"2034-09-14": "Battle of San Jacinto Day",
"2034-09-15": "Independence Day",
Expand All @@ -739,6 +752,7 @@
"2035-03-22": "Maundy Thursday",
"2035-03-23": "Good Friday",
"2035-05-01": "Labor Day",
"2035-05-30": "Mother's Day",
"2035-07-19": "Revolution Day",
"2035-09-14": "Battle of San Jacinto Day",
"2035-09-15": "Independence Day",
Expand All @@ -748,6 +762,7 @@
"2036-04-10": "Maundy Thursday",
"2036-04-11": "Good Friday",
"2036-05-01": "Labor Day",
"2036-05-30": "Mother's Day",
"2036-07-19": "Revolution Day",
"2036-09-14": "Battle of San Jacinto Day",
"2036-09-15": "Independence Day",
Expand All @@ -757,6 +772,7 @@
"2037-04-02": "Maundy Thursday",
"2037-04-03": "Good Friday",
"2037-05-01": "Labor Day",
"2037-05-30": "Mother's Day",
"2037-07-19": "Revolution Day",
"2037-09-14": "Battle of San Jacinto Day",
"2037-09-15": "Independence Day",
Expand All @@ -766,6 +782,7 @@
"2038-04-22": "Maundy Thursday",
"2038-04-23": "Good Friday",
"2038-05-01": "Labor Day",
"2038-05-30": "Mother's Day",
"2038-07-19": "Revolution Day",
"2038-09-14": "Battle of San Jacinto Day",
"2038-09-15": "Independence Day",
Expand All @@ -775,6 +792,7 @@
"2039-04-07": "Maundy Thursday",
"2039-04-08": "Good Friday",
"2039-05-01": "Labor Day",
"2039-05-30": "Mother's Day",
"2039-07-19": "Revolution Day",
"2039-09-14": "Battle of San Jacinto Day",
"2039-09-15": "Independence Day",
Expand All @@ -784,6 +802,7 @@
"2040-03-29": "Maundy Thursday",
"2040-03-30": "Good Friday",
"2040-05-01": "Labor Day",
"2040-05-30": "Mother's Day",
"2040-07-19": "Revolution Day",
"2040-09-14": "Battle of San Jacinto Day",
"2040-09-15": "Independence Day",
Expand All @@ -793,6 +812,7 @@
"2041-04-18": "Maundy Thursday",
"2041-04-19": "Good Friday",
"2041-05-01": "Labor Day",
"2041-05-30": "Mother's Day",
"2041-07-19": "Revolution Day",
"2041-09-14": "Battle of San Jacinto Day",
"2041-09-15": "Independence Day",
Expand All @@ -802,6 +822,7 @@
"2042-04-03": "Maundy Thursday",
"2042-04-04": "Good Friday",
"2042-05-01": "Labor Day",
"2042-05-30": "Mother's Day",
"2042-07-19": "Revolution Day",
"2042-09-14": "Battle of San Jacinto Day",
"2042-09-15": "Independence Day",
Expand All @@ -811,6 +832,7 @@
"2043-03-26": "Maundy Thursday",
"2043-03-27": "Good Friday",
"2043-05-01": "Labor Day",
"2043-05-30": "Mother's Day",
"2043-07-19": "Revolution Day",
"2043-09-14": "Battle of San Jacinto Day",
"2043-09-15": "Independence Day",
Expand All @@ -820,6 +842,7 @@
"2044-04-14": "Maundy Thursday",
"2044-04-15": "Good Friday",
"2044-05-01": "Labor Day",
"2044-05-30": "Mother's Day",
"2044-07-19": "Revolution Day",
"2044-09-14": "Battle of San Jacinto Day",
"2044-09-15": "Independence Day",
Expand All @@ -829,6 +852,7 @@
"2045-04-06": "Maundy Thursday",
"2045-04-07": "Good Friday",
"2045-05-01": "Labor Day",
"2045-05-30": "Mother's Day",
"2045-07-19": "Revolution Day",
"2045-09-14": "Battle of San Jacinto Day",
"2045-09-15": "Independence Day",
Expand All @@ -838,6 +862,7 @@
"2046-03-22": "Maundy Thursday",
"2046-03-23": "Good Friday",
"2046-05-01": "Labor Day",
"2046-05-30": "Mother's Day",
"2046-07-19": "Revolution Day",
"2046-09-14": "Battle of San Jacinto Day",
"2046-09-15": "Independence Day",
Expand All @@ -847,6 +872,7 @@
"2047-04-11": "Maundy Thursday",
"2047-04-12": "Good Friday",
"2047-05-01": "Labor Day",
"2047-05-30": "Mother's Day",
"2047-07-19": "Revolution Day",
"2047-09-14": "Battle of San Jacinto Day",
"2047-09-15": "Independence Day",
Expand All @@ -856,6 +882,7 @@
"2048-04-02": "Maundy Thursday",
"2048-04-03": "Good Friday",
"2048-05-01": "Labor Day",
"2048-05-30": "Mother's Day",
"2048-07-19": "Revolution Day",
"2048-09-14": "Battle of San Jacinto Day",
"2048-09-15": "Independence Day",
Expand All @@ -865,6 +892,7 @@
"2049-04-15": "Maundy Thursday",
"2049-04-16": "Good Friday",
"2049-05-01": "Labor Day",
"2049-05-30": "Mother's Day",
"2049-07-19": "Revolution Day",
"2049-09-14": "Battle of San Jacinto Day",
"2049-09-15": "Independence Day",
Expand All @@ -874,6 +902,7 @@
"2050-04-07": "Maundy Thursday",
"2050-04-08": "Good Friday",
"2050-05-01": "Labor Day",
"2050-05-30": "Mother's Day",
"2050-07-19": "Revolution Day",
"2050-09-14": "Battle of San Jacinto Day",
"2050-09-15": "Independence Day",
Expand Down
Loading

0 comments on commit f12e3da

Please sign in to comment.