Skip to content

Commit 948ce0f

Browse files
waqar2403coderabbitai[bot]PPsyriusKJhellicoarkid15r
authored
Add Saint Vincent and the Grenadines holidays (#2608)
Signed-off-by: Muhammad Waqar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Panpakorn Siripanich <[email protected]> Co-authored-by: ~Jhellico <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]>
1 parent b4403d8 commit 948ce0f

File tree

8 files changed

+1525
-1
lines changed

8 files changed

+1525
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ and detailed information.
105105

106106
## Available Countries
107107

108-
We currently support 208 country codes. The standard way to refer to a country is by using its [ISO
108+
We currently support 209 country codes. The standard way to refer to a country is by using its [ISO
109109
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
110110
for domain names, and for a subdivision its [ISO 3166-2
111111
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
@@ -1267,6 +1267,13 @@ any) in brackets, available languages and additional holiday categories. All cou
12671267
<td></td>
12681268
</tr>
12691269
<tr>
1270+
<td>Saint Vincent and the Grenadines</td>
1271+
<td>VC</td>
1272+
<td></td>
1273+
<td>en_US, <strong>en_VC</strong></td>
1274+
<td></td>
1275+
</tr>
1276+
<tr>
12701277
<td>Samoa</td>
12711278
<td>WS</td>
12721279
<td></td>

holidays/countries/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@
182182
SPM,
183183
HolidaysPM,
184184
)
185+
from holidays.countries.saint_vincent_and_the_grenadines import (
186+
SaintVincentAndTheGrenadines,
187+
VC,
188+
VCT,
189+
)
185190
from holidays.countries.samoa import Samoa, WS, WSM
186191
from holidays.countries.san_marino import SanMarino, SM, SMR
187192
from holidays.countries.sao_tome_and_principe import SaoTomeAndPrincipe, ST, STP
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# holidays
2+
# --------
3+
# A fast, efficient Python library for generating country, province and state
4+
# specific sets of holidays on the fly. It aims to make determining whether a
5+
# specific date is a holiday as fast and flexible as possible.
6+
#
7+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8+
# dr-prodigy <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
13+
from gettext import gettext as tr
14+
15+
from holidays.calendars.gregorian import JAN, JUL, AUG, SEP, _timedelta
16+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
17+
from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON, SUN_TO_NEXT_TUE
18+
19+
20+
class SaintVincentAndTheGrenadines(
21+
ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays
22+
):
23+
"""Saint Vincent and the Grenadines holidays.
24+
25+
References:
26+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Saint_Vincent_and_the_Grenadines>
27+
* [2013](https://web.archive.org/web/20240225145904/https://www.bosvg.com/wp-content/uploads/2021/10/bosvg_calendar2013-9x12_ver2-2.pdf)
28+
* [2014](https://web.archive.org/web/20250610053913/https://www.bosvg.com/wp-content/uploads/2021/10/BOSVG-Calendar-2014-5th-draft.pdf)
29+
* [2015](https://web.archive.org/web/20240225145904/https://www.bosvg.com/wp-content/uploads/2021/10/BOSVG-Bklet-Calendar-2015_21_11-3.pdf)
30+
* [2016](https://web.archive.org/web/20240225145903/https://www.bosvg.com/wp-content/uploads/2021/10/BOSVG-2016_pgs_sm_fin.pdf)
31+
* [2022](https://web.archive.org/web/20230426000952/https://www.bosvg.com/wp-content/uploads/2022/05/Tent-Calendar.pdf)
32+
* [2023](https://web.archive.org/web/20240225145904/https://www.bosvg.com/wp-content/uploads/2023/03/BOSVG-CALENDAR-TENT_F_REPRINT_TENT-EXCLUDED-FINAL.pdf)
33+
* [2019-2025](https://web.archive.org/web/20250214232128/https://pmoffice.gov.vc/pmoffice/index.php/public-holidays)
34+
* [2020 Carnival Monday](https://web.archive.org/web/20250607111242/https://www.stvincenttimes.com/august-3rd-and-4th-2020-declared-public-holidays-in-svg/)
35+
* [2025 National Spiritual Baptist Day](https://web.archive.org/web/20250513011200/https://www.gov.vc/images/pdf_documents/VINCENTIANS-PREPARE-FOR-MAY-21--SPIRITUAL-BAPTIST-LIBERATION-DAY-NATIONAL-HOLIDAY.pdf)
36+
"""
37+
38+
country = "VC"
39+
default_language = "en_VC"
40+
# %s (observed).
41+
observed_label = tr("%s (observed)")
42+
supported_languages = ("en_US", "en_VC")
43+
start_year = 1979
44+
45+
def __init__(self, *args, **kwargs):
46+
ChristianHolidays.__init__(self)
47+
InternationalHolidays.__init__(self)
48+
StaticHolidays.__init__(self, cls=SaintVincentAndTheGrenadinesStaticHolidays)
49+
kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
50+
super().__init__(*args, **kwargs)
51+
52+
def _populate_public_holidays(self):
53+
# New Year's Day.
54+
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
55+
56+
# National Heroes' Day.
57+
self._add_observed(self._add_holiday_mar_14(tr("National Heroes' Day")))
58+
59+
# Good Friday.
60+
self._add_good_friday(tr("Good Friday"))
61+
62+
# Easter Monday.
63+
self._add_easter_monday(tr("Easter Monday"))
64+
65+
# National Workers' Day.
66+
self._add_observed(self._add_labor_day(tr("National Workers' Day")))
67+
68+
if self._year >= 2025:
69+
# National Spiritual Baptist Day.
70+
self._add_holiday_may_21(tr("National Spiritual Baptist Day"))
71+
72+
# Whit Monday.
73+
self._add_whit_monday(tr("Whit Monday"))
74+
75+
# Carnival Monday.
76+
name = tr("Carnival Monday")
77+
carnival_monday_dates = {
78+
2013: (JUL, 8),
79+
2018: (JUL, 9),
80+
2019: (JUL, 8),
81+
2020: (AUG, 3),
82+
2021: (SEP, 6),
83+
2023: (JUL, 10),
84+
2024: (JUL, 8),
85+
}
86+
dt = (
87+
self._add_holiday(name, dt)
88+
if (dt := carnival_monday_dates.get(self._year))
89+
else self._add_holiday_1st_mon_of_jul(name)
90+
)
91+
92+
# Carnival Tuesday.
93+
self._add_holiday(tr("Carnival Tuesday"), _timedelta(dt, +1))
94+
95+
# Emancipation Day.
96+
self._add_observed(self._add_holiday_aug_1(tr("Emancipation Day")))
97+
98+
# Independence Day.
99+
self._add_observed(self._add_holiday_oct_27(tr("Independence Day")))
100+
101+
# Christmas Day.
102+
self._add_observed(self._add_christmas_day(tr("Christmas Day")), rule=SUN_TO_NEXT_TUE)
103+
104+
# Boxing Day.
105+
self._add_observed(self._add_christmas_day_two(tr("Boxing Day")))
106+
107+
108+
class VC(SaintVincentAndTheGrenadines):
109+
pass
110+
111+
112+
class VCT(SaintVincentAndTheGrenadines):
113+
pass
114+
115+
116+
class SaintVincentAndTheGrenadinesStaticHolidays:
117+
"""Saint Vincent and the Grenadines special holidays.
118+
119+
References:
120+
* [Statutory Rules and Orders 2021 No.1](https://web.archive.org/web/20250613051716/https://pmoffice.gov.vc/pmoffice/images/PDF/Gazettes/No_1_Proclamation_Delcaring_Friday_the_22nd_and_Monday_25th_day_of_January_2021_to_be_Public_Holidays_in_Saint_Vincent_and_the_Grenadines_19th_January_2021.pdf)
121+
"""
122+
123+
# Public Health Holiday.
124+
name = tr("Public Health Holiday")
125+
special_public_holidays = {
126+
2021: (
127+
(JAN, 22, name),
128+
(JAN, 25, name),
129+
),
130+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# holidays
2+
# --------
3+
# A fast, efficient Python library for generating country, province and state
4+
# specific sets of holidays on the fly. It aims to make determining whether a
5+
# specific date is a holiday as fast and flexible as possible.
6+
#
7+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8+
# dr-prodigy <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
#
13+
# Saint Vincent and the Grenadines holidays en_US localization.
14+
#
15+
msgid ""
16+
msgstr ""
17+
"Project-Id-Version: Holidays 0.77\n"
18+
"POT-Creation-Date: 2025-06-05 14:06+0300\n"
19+
"PO-Revision-Date: 2025-06-30 11:50+0700\n"
20+
"Last-Translator: Muhammad Waqar <[email protected]>\n"
21+
"Language-Team: Holidays Localization Team\n"
22+
"Language: en_US\n"
23+
"MIME-Version: 1.0\n"
24+
"Content-Type: text/plain; charset=UTF-8\n"
25+
"Content-Transfer-Encoding: 8bit\n"
26+
"Generated-By: pygettext.py 1.5\n"
27+
"X-Generator: Poedit 3.6\n"
28+
"X-Source-Language: en_VC\n"
29+
30+
#. %s (observed).
31+
#, c-format
32+
msgid "%s (observed)"
33+
msgstr "%s (observed)"
34+
35+
#. New Year's Day.
36+
msgid "New Year's Day"
37+
msgstr "New Year's Day"
38+
39+
#. National Heroes' Day.
40+
msgid "National Heroes' Day"
41+
msgstr "National Heroes' Day"
42+
43+
#. Good Friday.
44+
msgid "Good Friday"
45+
msgstr "Good Friday"
46+
47+
#. Easter Monday.
48+
msgid "Easter Monday"
49+
msgstr "Easter Monday"
50+
51+
#. National Workers' Day.
52+
msgid "National Workers' Day"
53+
msgstr "National Workers' Day"
54+
55+
#. National Spiritual Baptist Day.
56+
msgid "National Spiritual Baptist Day"
57+
msgstr "National Spiritual Baptist Day"
58+
59+
#. Whit Monday.
60+
msgid "Whit Monday"
61+
msgstr "Whit Monday"
62+
63+
#. Carnival Monday.
64+
msgid "Carnival Monday"
65+
msgstr "Carnival Monday"
66+
67+
#. Carnival Tuesday.
68+
msgid "Carnival Tuesday"
69+
msgstr "Carnival Tuesday"
70+
71+
#. Emancipation Day.
72+
msgid "Emancipation Day"
73+
msgstr "Emancipation Day"
74+
75+
#. Independence Day.
76+
msgid "Independence Day"
77+
msgstr "Independence Day"
78+
79+
#. Christmas Day.
80+
msgid "Christmas Day"
81+
msgstr "Christmas Day"
82+
83+
#. Boxing Day.
84+
msgid "Boxing Day"
85+
msgstr "Boxing Day"
86+
87+
#. Public Health Holiday.
88+
msgid "Public Health Holiday"
89+
msgstr "Public Health Holiday"
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# holidays
2+
# --------
3+
# A fast, efficient Python library for generating country, province and state
4+
# specific sets of holidays on the fly. It aims to make determining whether a
5+
# specific date is a holiday as fast and flexible as possible.
6+
#
7+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8+
# dr-prodigy <[email protected]> (c) 2017-2023
9+
# ryanss <[email protected]> (c) 2014-2017
10+
# Website: https://github.com/vacanza/holidays
11+
# License: MIT (see LICENSE file)
12+
#
13+
# Saint Vincent and the Grenadines holidays.
14+
#
15+
msgid ""
16+
msgstr ""
17+
"Project-Id-Version: Holidays 0.77\n"
18+
"POT-Creation-Date: 2025-06-04 23:49+0500\n"
19+
"PO-Revision-Date: 2025-06-30 11:50+0700\n"
20+
"Last-Translator: Muhammad Waqar <[email protected]>\n"
21+
"Language-Team: Holidays Localization Team\n"
22+
"Language: en_VC\n"
23+
"MIME-Version: 1.0\n"
24+
"Content-Type: text/plain; charset=UTF-8\n"
25+
"Content-Transfer-Encoding: 8bit\n"
26+
"Generated-By: Lingva 5.0.6\n"
27+
"X-Generator: Poedit 3.6\n"
28+
"X-Source-Language: en_VC\n"
29+
30+
#. %s (observed).
31+
#, c-format
32+
msgid "%s (observed)"
33+
msgstr ""
34+
35+
#. New Year's Day.
36+
msgid "New Year's Day"
37+
msgstr ""
38+
39+
#. National Heroes' Day.
40+
msgid "National Heroes' Day"
41+
msgstr ""
42+
43+
#. Good Friday.
44+
msgid "Good Friday"
45+
msgstr ""
46+
47+
#. Easter Monday.
48+
msgid "Easter Monday"
49+
msgstr ""
50+
51+
#. National Workers' Day.
52+
msgid "National Workers' Day"
53+
msgstr ""
54+
55+
#. National Spiritual Baptist Day.
56+
msgid "National Spiritual Baptist Day"
57+
msgstr ""
58+
59+
#. Whit Monday.
60+
msgid "Whit Monday"
61+
msgstr ""
62+
63+
#. Carnival Monday.
64+
msgid "Carnival Monday"
65+
msgstr ""
66+
67+
#. Carnival Tuesday.
68+
msgid "Carnival Tuesday"
69+
msgstr ""
70+
71+
#. Emancipation Day.
72+
msgid "Emancipation Day"
73+
msgstr ""
74+
75+
#. Independence Day.
76+
msgid "Independence Day"
77+
msgstr ""
78+
79+
#. Christmas Day.
80+
msgid "Christmas Day"
81+
msgstr ""
82+
83+
#. Boxing Day.
84+
msgid "Boxing Day"
85+
msgstr ""
86+
87+
#. Public Health Holiday.
88+
msgid "Public Health Holiday"
89+
msgstr ""

holidays/registry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"saint_lucia": ("SaintLucia", "LC", "LCA"),
181181
"saint_martin": ("SaintMartin", "MF", "MAF", "HolidaysMF"),
182182
"saint_pierre_and_miquelon": ("SaintPierreAndMiquelon", "PM", "SPM", "HolidaysPM"),
183+
"saint_vincent_and_the_grenadines": ("SaintVincentAndTheGrenadines", "VC", "VCT"),
183184
"samoa": ("Samoa", "WS", "WSM"),
184185
"san_marino": ("SanMarino", "SM", "SMR"),
185186
"sao_tome_and_principe": ("SaoTomeAndPrincipe", "ST", "STP"),

0 commit comments

Comments
 (0)