Skip to content

Commit

Permalink
Update Curaçao holidays: add HALF_DAY holidays (#2039)
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico authored Oct 6, 2024
1 parent 34b8206 commit ab5816a
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ All other default values are highlighted with bold:
- CW
-
- en_US, nl, **pap_CW**, uk
-
- HALF_DAY
* - Cyprus
- CY
-
Expand Down
12 changes: 9 additions & 3 deletions holidays/countries/curacao.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from gettext import gettext as tr

from holidays.calendars.gregorian import APR, MAY, _timedelta
from holidays.constants import HALF_DAY, PUBLIC
from holidays.groups import ChristianHolidays, InternationalHolidays
from holidays.holiday_base import HolidayBase

Expand All @@ -22,13 +23,11 @@ class Curacao(HolidayBase, ChristianHolidays, InternationalHolidays):
"""
https://loketdigital.gobiernu.cw/Loket/product/571960bbe1e5fe8712b10a1323630e70
https://en.wikipedia.org/wiki/Public_holidays_in_Cura%C3%A7ao
New Year's Eve (Vispu di Aña Nobo) is a half-day public holiday, though
this isn't supported by Python Holidays so it won't be implemented.
"""

country = "CW"
default_language = "pap_CW"
supported_categories = (HALF_DAY, PUBLIC)
supported_languages = ("en_US", "nl", "pap_CW", "uk")

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -136,6 +135,13 @@ def _populate_public_holidays(self):
# Second Day of Christmas
self._add_christmas_day_two(tr("Di dos dia di Pasku di Nasementu"))

def _populate_half_day_holidays(self):
if self._year <= 1953:
return None

# New Year's Eve.
self._add_new_years_eve(tr("Vispu di Aña Nobo"))


class CW(Curacao):
pass
Expand Down
12 changes: 8 additions & 4 deletions holidays/locale/en_US/LC_MESSAGES/CW.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.27\n"
"Project-Id-Version: Python Holidays 0.58\n"
"POT-Creation-Date: 2023-06-13 16:35+0700\n"
"PO-Revision-Date: \n"
"Last-Translator: PPsyrius <ppsyrius@ppsyrius.dev>\n"
"PO-Revision-Date: 2024-10-05 22:08+0300\n"
"Last-Translator: ~Jhellico <jhellico@gmail.com>\n"
"Language-Team: Python 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: pygettext.py 1.5\n"
"X-Generator: Poedit 3.3.1\n"
"X-Generator: Poedit 3.5\n"

#. New Year's Day
msgid "Aña Nobo"
Expand Down Expand Up @@ -78,3 +78,7 @@ msgstr "Christmas Day"
#. Second Day of Christmas
msgid "Di dos dia di Pasku di Nasementu"
msgstr "Second Day of Christmas"

#. New Year's Eve.
msgid "Vispu di Aña Nobo"
msgstr "New Year's Eve"
12 changes: 8 additions & 4 deletions holidays/locale/nl/LC_MESSAGES/CW.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.27\n"
"Project-Id-Version: Python Holidays 0.58\n"
"POT-Creation-Date: 2023-06-13 16:35+0700\n"
"PO-Revision-Date: \n"
"Last-Translator: PPsyrius <ppsyrius@ppsyrius.dev>\n"
"PO-Revision-Date: 2024-10-05 22:08+0300\n"
"Last-Translator: ~Jhellico <jhellico@gmail.com>\n"
"Language-Team: Python Holidays localization team\n"
"Language: nl\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.3.1\n"
"X-Generator: Poedit 3.5\n"

#. New Year's Day
msgid "Aña Nobo"
Expand Down Expand Up @@ -78,3 +78,7 @@ msgstr "Kerst"
#. Second Day of Christmas
msgid "Di dos dia di Pasku di Nasementu"
msgstr "Tweede kerstdag"

#. New Year's Eve.
msgid "Vispu di Aña Nobo"
msgstr "Oudejaarsavond"
12 changes: 8 additions & 4 deletions holidays/locale/pap_CW/LC_MESSAGES/CW.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.27\n"
"Project-Id-Version: Python Holidays 0.58\n"
"POT-Creation-Date: 2023-06-13 16:35+0700\n"
"PO-Revision-Date: \n"
"Last-Translator: PPsyrius <ppsyrius@ppsyrius.dev>\n"
"PO-Revision-Date: 2024-10-05 22:07+0300\n"
"Last-Translator: ~Jhellico <jhellico@gmail.com>\n"
"Language-Team: Python Holidays localization team\n"
"Language: pap_CW\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.3.1\n"
"X-Generator: Poedit 3.5\n"

#. New Year's Day
msgid "Aña Nobo"
Expand Down Expand Up @@ -78,3 +78,7 @@ msgstr ""
#. Second Day of Christmas
msgid "Di dos dia di Pasku di Nasementu"
msgstr ""

#. New Year's Eve.
msgid "Vispu di Aña Nobo"
msgstr ""
10 changes: 7 additions & 3 deletions holidays/locale/uk/LC_MESSAGES/CW.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-06-13 16:35+0700\n"
"PO-Revision-Date: \n"
"PO-Revision-Date: 2024-10-05 22:09+0300\n"
"Last-Translator: ~Jhellico <jhellico@gmail.com>\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.3.1\n"
"X-Generator: Poedit 3.5\n"

#. New Year's Day
msgid "Aña Nobo"
Expand Down Expand Up @@ -78,3 +78,7 @@ msgstr "Різдво Христове"
#. Second Day of Christmas
msgid "Di dos dia di Pasku di Nasementu"
msgstr "Другий день Різдва"

#. New Year's Eve.
msgid "Vispu di Aña Nobo"
msgstr "Переддень Нового року"
Loading

0 comments on commit ab5816a

Please sign in to comment.