Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d1ac06b
Add Sint Maarten (SX) holiday support
psupra22 Jun 13, 2025
7c0cb02
Added Tests
psupra22 Jun 13, 2025
37ad1c5
Added Tests
psupra22 Jun 13, 2025
be1bed6
Updated README and registry.py, fixed Sint Maarten test file name
psupra22 Jun 13, 2025
711facc
Delete tests/countries/test_sint_marten.py
psupra22 Jun 13, 2025
b79c6dd
Merge branch 'vacanza:dev' into dev
psupra22 Jun 13, 2025
b14fe00
Update sint_maarten.py
psupra22 Jun 13, 2025
c2ba48c
Update test_sint_maarten.py
psupra22 Jun 13, 2025
c64f5d9
Update registry.py
psupra22 Jun 13, 2025
a807d84
Update __init__.py
psupra22 Jun 13, 2025
8dcfe6e
Update README.md
psupra22 Jun 13, 2025
e3d1b25
Update test_sint_maarten.py
psupra22 Jun 14, 2025
18f97a1
Update test_sint_maarten.py
psupra22 Jun 14, 2025
8141854
Update test_sint_maarten.py
psupra22 Jun 14, 2025
6a1baf9
Update sint_maarten.py
psupra22 Jun 14, 2025
55a2a97
Added .po file
psupra22 Jun 14, 2025
3df7139
Update CONTRIBUTORS
psupra22 Jun 14, 2025
48391ae
Merge branch 'dev' into dev
arkid15r Jun 14, 2025
bdff7e7
Update README.md
psupra22 Jun 18, 2025
8c252ac
Update sint_maarten.py
psupra22 Jun 18, 2025
e76e137
Update SX.po
psupra22 Jun 18, 2025
bab87f0
Update observed_holiday_base.py
psupra22 Jun 18, 2025
0a096a2
Update test_sint_maarten.py
psupra22 Jun 18, 2025
da13f7d
Update SX.po
psupra22 Jun 18, 2025
f2bd4e2
Merge branch 'dev' into dev
arkid15r Jun 18, 2025
a88d64c
Update SX.po
psupra22 Jun 19, 2025
d1a5979
Update sint_maarten.py
psupra22 Jun 19, 2025
334839a
Update test_sint_maarten.py
psupra22 Jun 19, 2025
f204963
Merge branch 'dev' into dev
psupra22 Jun 19, 2025
7d7c7db
Update SX.po
psupra22 Jun 20, 2025
d737e1d
Update sint_maarten.py
psupra22 Jun 20, 2025
bf69dbf
Update test_sint_maarten.py
psupra22 Jun 20, 2025
0f0f82c
Update sint_maarten.py
psupra22 Jun 20, 2025
6211e7f
Merge branch 'dev' into dev
psupra22 Jun 20, 2025
3cfadd2
Removed All Saints Day
psupra22 Jun 20, 2025
0f9d9f5
Cleaned up tests
psupra22 Jun 21, 2025
0bac177
Cleaned up tests
psupra22 Jun 21, 2025
e6d67e3
Update SX.po
psupra22 Jun 21, 2025
4e8b5f1
Update sint_maarten.py
psupra22 Jun 21, 2025
dffbc70
Update test_sint_maarten.py
psupra22 Jun 21, 2025
8121bbe
Merge branch 'dev' of https://github.com/psupra22/holidays into dev
psupra22 Jun 21, 2025
6fdcb42
Updated Carnival Day and Test
psupra22 Jun 22, 2025
000b5ac
Merge branch 'dev' into dev
psupra22 Jun 22, 2025
373a5d8
Update SX.po
psupra22 Jun 23, 2025
4500234
Create SX.po
psupra22 Jun 23, 2025
f84e4c1
Update sint_maarten.py
psupra22 Jun 23, 2025
1d50c50
Update test_sint_maarten.py
psupra22 Jun 23, 2025
5feabf4
Update README.md
psupra22 Jun 23, 2025
e049107
Update test_sint_maarten.py
psupra22 Jun 23, 2025
1fa4c4a
Update SX.po
psupra22 Jun 23, 2025
4f7a759
Update SX.po
psupra22 Jun 23, 2025
fb4c7cf
Update sint_maarten.py
psupra22 Jun 23, 2025
895148f
Update test_sint_maarten.py
psupra22 Jun 23, 2025
841a4c5
Update sint_maarten.py
psupra22 Jun 24, 2025
20bb16b
Update sint_maarten.py
psupra22 Jun 24, 2025
dbcfc91
Update test_sint_maarten.py
psupra22 Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ Pedro Baptista
Peter Zsak
Pieter van der Westhuizen
Piotr Staniów
Platon Supranovich
Prateekshit Jaiswal
Raphael Borg Ellul Vincenti
Raychel Mattheeuw
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ and detailed information.

## Available Countries

We currently support 203 country codes. The standard way to refer to a country is by using its [ISO
We currently support 204 country codes. The standard way to refer to a country is by using its [ISO
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
for domain names, and for a subdivision its [ISO 3166-2
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
Expand Down Expand Up @@ -1302,6 +1302,13 @@ any) in brackets, available languages and additional holiday categories. All cou
<td></td>
</tr>
<tr>
<td>Sint Maarten</td>
<td>SX</td>
<td></td>
<td>en_US, <strong>nl</strong></td>
<td></td>
</tr>
<tr>
<td>Slovakia</td>
<td>SK</td>
<td></td>
Expand Down
1 change: 1 addition & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
from holidays.countries.seychelles import Seychelles, SC, SYC
from holidays.countries.sierra_leone import SierraLeone, SL, SLE
from holidays.countries.singapore import Singapore, SG, SGP
from holidays.countries.sint_maarten import SintMaarten, SX, SXM
from holidays.countries.slovakia import Slovakia, SK, SVK
from holidays.countries.slovenia import Slovenia, SI, SVN
from holidays.countries.solomon_islands import SolomonIslands, SB, SLB
Expand Down
118 changes: 118 additions & 0 deletions holidays/countries/sint_maarten.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# 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 CONTRIBUTORS 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)

Comment thread
KJhellico marked this conversation as resolved.
from gettext import gettext as tr

from holidays.groups import ChristianHolidays, InternationalHolidays
from holidays.observed_holiday_base import (
ObservedHolidayBase,
SAT_TO_PREV_FRI,
SUN_TO_PREV_SAT,
SUN_TO_NEXT_MON,
SUN_TO_NEXT_TUE,
)


class SintMaarten(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
"""Sint Maarten holidays.

References:
* <https://en.wikipedia.org/wiki/Public_holidays_in_Sint_Maarten>
* [AB 2012 no. 19](https://web.archive.org/web/20250615040244/https://www.sintmaartengov.org/Documents/Official%20Publications/AB%2019%20Lvo%20Dag%20van%20Bevrijding.pdf)
* [AB 2015 no. 24](https://web.archive.org/web/20250615035932/https://www.sintmaartengov.org/Documents/Official%20Publications/AB%2024%20Landsverordening%20Constitution%20Day.pdf)
* [2014-2023](https://web.archive.org/web/20230307083630/https://www.sintmaartengov.org/government/VSA/labour/Pages/Public-Holiday-Schedule.aspx)
* [2024-Present](https://web.archive.org/web/20250212071023/https://www.sintmaartengov.org/Pages/Public-Holiday-Schedule.aspx)
"""

country = "SX"
default_language = "nl"
supported_languages = ("en_US", "nl")
# Sint Maarten became a constituent country on October 10th, 2010.
start_year = 2011

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
InternationalHolidays.__init__(self)
kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
super().__init__(*args, **kwargs)
Comment thread
PPsyrius marked this conversation as resolved.

def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("Nieuwjaarsdag"))

# Good Friday.
self._add_good_friday(tr("Goede Vrijdag"))

# Easter Sunday.
self._add_easter_sunday(tr("Eerste paasdag"))

# Easter Monday.
self._add_easter_monday(tr("Tweede paasdag"))

self._move_holiday(
# King's Day.
self._add_holiday_apr_27(tr("Koningsdag"))
if self._year >= 2014
# Queen's Day.
else self._add_holiday_apr_30(tr("Koninginnedag")),
rule=SUN_TO_PREV_SAT,
)

# Carnival Day.
name = tr("Carnavalsdag")
if self._year >= 2014:
self._move_holiday(
self._add_holiday_apr_30(name), rule=SAT_TO_PREV_FRI + SUN_TO_NEXT_TUE
)
else:
self._add_holiday_apr_29(name)

# Labor Day.
self._add_labor_day(tr("Dag van de Arbeid"))

# Ascension Day.
self._add_ascension_thursday(tr("Hemelvaartsdag"))

# Whit Sunday.
self._add_whit_sunday(tr("Eerste Pinksterdag"))

# Established on June 13th, 2012.
if self._year >= 2012:
# Emancipation Day.
self._move_holiday(self._add_holiday_jul_1(tr("Dag van de Bevrijding")))

# Established on September 28th, 2015.
if self._year >= 2015:
# Constitution Day.
self._add_holiday_2nd_mon_of_oct(tr("Dag van de Constitutie"))

# Sint Maarten Day.
self._add_holiday_nov_11(tr("Sint-Maartensdag"))

# Replaced by Constitution Day on October 2nd, 2015.
if self._year <= 2014:
# Kingdom Day.
self._move_holiday(self._add_holiday_dec_15(tr("Koninkrijksdag")))

# Christmas Day.
self._add_christmas_day(tr("Eerste Kerstdag"))

# Second Day of Christmas.
self._add_christmas_day_two(tr("Tweede Kerstdag"))


class SX(SintMaarten):
pass


class SXM(SintMaarten):
pass
Comment thread
PPsyrius marked this conversation as resolved.
91 changes: 91 additions & 0 deletions holidays/locale/en_US/LC_MESSAGES/SX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# 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 CONTRIBUTORS 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)
#
# Sint Maarten holidays en_US localization.
Comment thread
KJhellico marked this conversation as resolved.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.76\n"
"POT-Creation-Date: 2025-06-14 14:20-0400\n"
"PO-Revision-Date: 2025-06-14 14:20-0400\n"
"Last-Translator: Platon Supranovich <psupra521@gmail.com>\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"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: nl\n"

#. New Year's Day.
msgid "Nieuwjaarsdag"
msgstr "New Year's Day"

#. Good Friday.
msgid "Goede Vrijdag"
msgstr "Good Friday"

#. Easter Sunday.
msgid "Eerste paasdag"
msgstr "Easter Sunday"

#. Easter Monday.
msgid "Tweede paasdag"
msgstr "Easter Monday"

#. King's Day.
msgid "Koningsdag"
msgstr "King's Day"

#. Queen's Day.
msgid "Koninginnedag"
msgstr "Queen's Day"

#. Carnival Day.
msgid "Carnavalsdag"
msgstr "Carnival Day"

#. Labor Day.
msgid "Dag van de Arbeid"
msgstr "Labor Day"

#. Ascension Day.
msgid "Hemelvaartsdag"
msgstr "Ascension Day"

#. Whit Sunday.
msgid "Eerste Pinksterdag"
msgstr "Whit Sunday"

Comment thread
KJhellico marked this conversation as resolved.
#. Emancipation Day.
msgid "Dag van de Bevrijding"
msgstr "Emancipation Day"

#. Constitution Day.
msgid "Dag van de Constitutie"
msgstr "Constitution Day"

#. Sint Maarten Day.
msgid "Sint-Maartensdag"
msgstr "Sint Maarten Day"

#. Kingdom Day.
msgid "Koninkrijksdag"
msgstr "Kingdom Day"

#. Christmas Day.
msgid "Eerste Kerstdag"
msgstr "Christmas Day"

#. Second Day of Christmas.
msgid "Tweede Kerstdag"
msgstr "Second Day of Christmas"
91 changes: 91 additions & 0 deletions holidays/locale/nl/LC_MESSAGES/SX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# 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 CONTRIBUTORS 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)
#
# Sint Maarten holidays.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.76\n"
"POT-Creation-Date: 2025-06-23 12:56-0400\n"
"PO-Revision-Date: 2025-06-23 12:56-0400\n"
"Last-Translator: Platon Supranovich <psupra521@gmail.com>\n"
"Language-Team: 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"
"Generated-By: Lingva 5.0.6\n"
"X-Source-Language: nl\n"

Comment thread
KJhellico marked this conversation as resolved.
#. New Year's Day.
msgid "Nieuwjaarsdag"
msgstr ""

#. Good Friday.
msgid "Goede Vrijdag"
msgstr ""

#. Easter Sunday.
msgid "Eerste paasdag"
msgstr ""

#. Easter Monday.
msgid "Tweede paasdag"
msgstr ""

#. King's Day.
msgid "Koningsdag"
msgstr ""

#. Queen's Day.
msgid "Koninginnedag"
msgstr ""

#. Carnival Day.
msgid "Carnavalsdag"
msgstr ""

#. Labor Day.
msgid "Dag van de Arbeid"
msgstr ""

#. Ascension Day.
msgid "Hemelvaartsdag"
msgstr ""

#. Whit Sunday.
msgid "Eerste Pinksterdag"
msgstr ""

#. Emancipation Day.
msgid "Dag van de Bevrijding"
msgstr ""

#. Constitution Day.
msgid "Dag van de Constitutie"
msgstr ""

#. Sint Maarten Day.
msgid "Sint-Maartensdag"
msgstr ""

#. Kingdom Day.
msgid "Koninkrijksdag"
msgstr ""

#. Christmas Day.
msgid "Eerste Kerstdag"
msgstr ""

#. Second Day of Christmas.
msgid "Tweede Kerstdag"
msgstr ""
1 change: 1 addition & 0 deletions holidays/observed_holiday_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __add__(self, other):
SAT_TO_NEXT_WORKDAY = ObservedRule({SAT: +7})
SAT_TO_NONE = ObservedRule({SAT: None})

SUN_TO_PREV_SAT = ObservedRule({SUN: -1})
Comment thread
PPsyrius marked this conversation as resolved.
SUN_TO_NEXT_MON = ObservedRule({SUN: +1})
SUN_TO_NEXT_TUE = ObservedRule({SUN: +2})
SUN_TO_NEXT_WED = ObservedRule({SUN: +3})
Expand Down
1 change: 1 addition & 0 deletions holidays/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
"seychelles": ("Seychelles", "SC", "SYC"),
"sierra_leone": ("SierraLeone", "SL", "SLE"),
"singapore": ("Singapore", "SG", "SGP"),
"sint_maarten": ("SintMaarten", "SX", "SXM"),
"slovakia": ("Slovakia", "SK", "SVK"),
"slovenia": ("Slovenia", "SI", "SVN"),
"solomon_islands": ("SolomonIslands", "SB", "SLB"),
Expand Down
Loading