-
-
Notifications
You must be signed in to change notification settings - Fork 688
Add Sint Maarten holidays #2631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+564
−1
Merged
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 7c0cb02
Added Tests
psupra22 37ad1c5
Added Tests
psupra22 be1bed6
Updated README and registry.py, fixed Sint Maarten test file name
psupra22 711facc
Delete tests/countries/test_sint_marten.py
psupra22 b79c6dd
Merge branch 'vacanza:dev' into dev
psupra22 b14fe00
Update sint_maarten.py
psupra22 c2ba48c
Update test_sint_maarten.py
psupra22 c64f5d9
Update registry.py
psupra22 a807d84
Update __init__.py
psupra22 8dcfe6e
Update README.md
psupra22 e3d1b25
Update test_sint_maarten.py
psupra22 18f97a1
Update test_sint_maarten.py
psupra22 8141854
Update test_sint_maarten.py
psupra22 6a1baf9
Update sint_maarten.py
psupra22 55a2a97
Added .po file
psupra22 3df7139
Update CONTRIBUTORS
psupra22 48391ae
Merge branch 'dev' into dev
arkid15r bdff7e7
Update README.md
psupra22 8c252ac
Update sint_maarten.py
psupra22 e76e137
Update SX.po
psupra22 bab87f0
Update observed_holiday_base.py
psupra22 0a096a2
Update test_sint_maarten.py
psupra22 da13f7d
Update SX.po
psupra22 f2bd4e2
Merge branch 'dev' into dev
arkid15r a88d64c
Update SX.po
psupra22 d1a5979
Update sint_maarten.py
psupra22 334839a
Update test_sint_maarten.py
psupra22 f204963
Merge branch 'dev' into dev
psupra22 7d7c7db
Update SX.po
psupra22 d737e1d
Update sint_maarten.py
psupra22 bf69dbf
Update test_sint_maarten.py
psupra22 0f0f82c
Update sint_maarten.py
psupra22 6211e7f
Merge branch 'dev' into dev
psupra22 3cfadd2
Removed All Saints Day
psupra22 0f9d9f5
Cleaned up tests
psupra22 0bac177
Cleaned up tests
psupra22 e6d67e3
Update SX.po
psupra22 4e8b5f1
Update sint_maarten.py
psupra22 dffbc70
Update test_sint_maarten.py
psupra22 8121bbe
Merge branch 'dev' of https://github.com/psupra22/holidays into dev
psupra22 6fdcb42
Updated Carnival Day and Test
psupra22 000b5ac
Merge branch 'dev' into dev
psupra22 373a5d8
Update SX.po
psupra22 4500234
Create SX.po
psupra22 f84e4c1
Update sint_maarten.py
psupra22 1d50c50
Update test_sint_maarten.py
psupra22 5feabf4
Update README.md
psupra22 e049107
Update test_sint_maarten.py
psupra22 1fa4c4a
Update SX.po
psupra22 4f7a759
Update SX.po
psupra22 fb4c7cf
Update sint_maarten.py
psupra22 895148f
Update test_sint_maarten.py
psupra22 841a4c5
Update sint_maarten.py
psupra22 20bb16b
Update sint_maarten.py
psupra22 dbcfc91
Update test_sint_maarten.py
psupra22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
|
|
||
| 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) | ||
|
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 | ||
|
PPsyrius marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
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" | ||
|
|
||
|
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" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
|
|
||
|
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 "" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.