holidays 0.72__py3-none-any.whl → 0.73__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- holidays/calendars/hindu.py +147 -3
- holidays/countries/__init__.py +4 -0
- holidays/countries/andorra.py +130 -46
- holidays/countries/argentina.py +10 -0
- holidays/countries/cocos_islands.py +259 -0
- holidays/countries/grenada.py +143 -0
- holidays/countries/malaysia.py +0 -8
- holidays/countries/nepal.py +441 -0
- holidays/countries/philippines.py +2 -0
- holidays/countries/togo.py +182 -0
- holidays/countries/vatican_city.py +29 -31
- holidays/groups/christian.py +3 -3
- holidays/groups/hindu.py +121 -1
- holidays/locale/ca/LC_MESSAGES/AD.mo +0 -0
- holidays/locale/coa_CC/LC_MESSAGES/CC.mo +0 -0
- holidays/locale/en_CC/LC_MESSAGES/CC.mo +0 -0
- holidays/locale/en_GD/LC_MESSAGES/GD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CC.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TG.mo +0 -0
- holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/TG.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AD.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
- holidays/registry.py +4 -0
- holidays/version.py +1 -1
- {holidays-0.72.dist-info → holidays-0.73.dist-info}/METADATA +32 -4
- {holidays-0.72.dist-info → holidays-0.73.dist-info}/RECORD +34 -20
- {holidays-0.72.dist-info → holidays-0.73.dist-info}/WHEEL +1 -1
- {holidays-0.72.dist-info → holidays-0.73.dist-info}/licenses/CONTRIBUTORS +0 -0
- {holidays-0.72.dist-info → holidays-0.73.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.72.dist-info → holidays-0.73.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,259 @@
|
|
|
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 <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (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 import _CustomIslamicHolidays
|
|
16
|
+
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
|
|
17
|
+
from holidays.groups import (
|
|
18
|
+
ChristianHolidays,
|
|
19
|
+
InternationalHolidays,
|
|
20
|
+
IslamicHolidays,
|
|
21
|
+
StaticHolidays,
|
|
22
|
+
)
|
|
23
|
+
from holidays.observed_holiday_base import (
|
|
24
|
+
ObservedHolidayBase,
|
|
25
|
+
MON_TO_NEXT_TUE,
|
|
26
|
+
SAT_SUN_TO_NEXT_MON,
|
|
27
|
+
SAT_SUN_TO_NEXT_MON_TUE,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class CocosIslands(
|
|
32
|
+
ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays
|
|
33
|
+
):
|
|
34
|
+
"""Cocos (Keeling) Islands holidays.
|
|
35
|
+
|
|
36
|
+
References:
|
|
37
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Cocos_(Keeling)_Islands>
|
|
38
|
+
* <https://www.infrastructure.gov.au/territories-regions-cities/territories/indian-ocean-territories/community-bulletins>
|
|
39
|
+
* <https://www.infrastructure.gov.au/territories-regions-cities/territories/indian-ocean-territories/gazettes-bulletins>
|
|
40
|
+
|
|
41
|
+
* [2007](https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2006/02_2006_Public_Holidays_2007_CKI.doc)
|
|
42
|
+
* [2008](https://web.archive.org/web/20240718120923/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2007/06-2007_Public_Holidays_CKI.pdf)
|
|
43
|
+
* [2008 Eid al-Fitr](https://web.archive.org/web/20240331104649/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2008/03_2008_Observance_of_Hari_Raya_Puasa_2008.pdf)
|
|
44
|
+
* [2009](https://web.archive.org/web/20231208153529/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2008/01-2008-2009-public-holiday-CKI-gazette.pdf)
|
|
45
|
+
* [2010](https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2009/2009-Gazette_6-2009-CKI-Proclamation_of_2010_Special_Public_Bank_Holidays.pdf)
|
|
46
|
+
* [2013](https://web.archive.org/web/20240805055409/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2012/2012-Gazette_8-2012-CKI-Proclamation_of_2013_Public_Holidays_for_Cocos_(Keeling)_Islands.pdf)
|
|
47
|
+
* [2014](https://web.archive.org/web/20240718123844/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2013/2013-Gazette_3-2013-Cocos_K_Islands_2014_Public_Holidays.pdf)
|
|
48
|
+
* [2016](https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2015/2015-Gazette_4-2015-CKI-Proclamation_of_2016_Special_Public_Bank_Holidays.pdf)
|
|
49
|
+
* [2016 Eid al-Fitr](https://web.archive.org/web/20231208203746/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2016/2016-Gazette_3-2016-CKI-Proclamation_Special_Public_and_Bank_Holidays_2016.pdf)
|
|
50
|
+
* [2017](https://web.archive.org/web/20240303203132/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2016/2016-Gazette_2-2016-CKI-Proclamation_Special_Public_and_Bank_Holidays_2017.pdf)
|
|
51
|
+
* [2019](https://web.archive.org/web/20241123131420/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_bulletins/2018/files/A38-2018.pdf)
|
|
52
|
+
* [2019 Act of Self Determination Day](https://web.archive.org/web/20220518200522/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_bulletins/2019/files/A10-2019-bank-holidays.pdf)
|
|
53
|
+
* [2020](https://web.archive.org/web/20240521203357/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_bulletins/2019/files/A53-2019.pdf)
|
|
54
|
+
* [2021](https://web.archive.org/web/20250502204052/https://www.infrastructure.gov.au/territories-regions-cities/territories/indian_ocean/iot_bulletins/2020/A041-2020-cki-public-holidays)
|
|
55
|
+
* [2022](https://web.archive.org/web/20250429071240/https://www.infrastructure.gov.au/sites/default/files/documents/a33-2021-2022-public-holidays-cocos-keeling-islands.pdf)
|
|
56
|
+
* [2022 Eid al-Fitr](https://web.archive.org/web/20220810061351/https://www.infrastructure.gov.au/sites/default/files/documents/Gazette-Change-to-CKI-Hari-Raya-Puasa-2022.pdf)
|
|
57
|
+
* [2023](https://web.archive.org/web/20240711221156/https://www.infrastructure.gov.au/sites/default/files/documents/a19-2022-community-bulletin-2023-kings-birthday-cocos-keeling-islands.pdf)
|
|
58
|
+
* [2023 Eid al-Adha](https://web.archive.org/web/20240804112114/https://www.infrastructure.gov.au/sites/default/files/documents/a06-2023_community_bulletin_-_change_of_public_holiday_date_for_hari_raya_haji_2023.pdf)
|
|
59
|
+
* [2024](https://web.archive.org/web/20250207203100/https://www.infrastructure.gov.au/sites/default/files/documents/a12-2023-2024-public-holidays-cocos-k-islands.pdf)
|
|
60
|
+
* [2025](https://web.archive.org/web/20250413083314/https://www.infrastructure.gov.au/sites/default/files/documents/a21-2024-administrator-community-bulletin-cki-public-holidays-2025.pdf)
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
country = "CC"
|
|
64
|
+
default_language = "en_CC"
|
|
65
|
+
# %s (observed).
|
|
66
|
+
observed_label = tr("%s (observed)")
|
|
67
|
+
# %s (estimated).
|
|
68
|
+
estimated_label = tr("%s (estimated)")
|
|
69
|
+
# %s (observed, estimated).
|
|
70
|
+
observed_estimated_label = tr("%s (observed, estimated)")
|
|
71
|
+
supported_languages = ("coa_CC", "en_CC", "en_US")
|
|
72
|
+
# Act of Self Determination 1984.
|
|
73
|
+
start_year = 1985
|
|
74
|
+
|
|
75
|
+
def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
|
|
76
|
+
"""
|
|
77
|
+
Args:
|
|
78
|
+
islamic_show_estimated:
|
|
79
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
80
|
+
if holiday date is estimated.
|
|
81
|
+
"""
|
|
82
|
+
ChristianHolidays.__init__(self)
|
|
83
|
+
InternationalHolidays.__init__(self)
|
|
84
|
+
IslamicHolidays.__init__(
|
|
85
|
+
self, cls=CocosIslandsIslamicHolidays, show_estimated=islamic_show_estimated
|
|
86
|
+
)
|
|
87
|
+
StaticHolidays.__init__(self, CocosIslandsStaticHolidays)
|
|
88
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
89
|
+
super().__init__(*args, **kwargs)
|
|
90
|
+
|
|
91
|
+
def _populate_public_holidays(self):
|
|
92
|
+
# New Year's Day.
|
|
93
|
+
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
|
|
94
|
+
|
|
95
|
+
# Australia Day.
|
|
96
|
+
self._add_observed(self._add_holiday_jan_26(tr("Australia Day")))
|
|
97
|
+
|
|
98
|
+
act_of_self_determination_dates = {
|
|
99
|
+
2007: (APR, 5),
|
|
100
|
+
}
|
|
101
|
+
# Act of Self Determination Day.
|
|
102
|
+
name = tr("Act of Self Determination Day")
|
|
103
|
+
if self._year in act_of_self_determination_dates:
|
|
104
|
+
self._add_holiday(name, act_of_self_determination_dates[self._year])
|
|
105
|
+
else:
|
|
106
|
+
dt = self._add_holiday_apr_6(name)
|
|
107
|
+
if self._year != 2019:
|
|
108
|
+
self._add_observed(dt)
|
|
109
|
+
|
|
110
|
+
# Good Friday.
|
|
111
|
+
self._add_good_friday(tr("Good Friday"))
|
|
112
|
+
|
|
113
|
+
# Easter Monday.
|
|
114
|
+
self._add_easter_monday(tr("Easter Monday"))
|
|
115
|
+
|
|
116
|
+
# ANZAC Day.
|
|
117
|
+
self._add_observed(self._add_holiday_apr_25(tr("ANZAC Day")))
|
|
118
|
+
|
|
119
|
+
queens_kings_birthday_dates = {
|
|
120
|
+
2021: (JUN, 7),
|
|
121
|
+
2022: (JUN, 6),
|
|
122
|
+
2023: (JUN, 6),
|
|
123
|
+
2024: (JUN, 6),
|
|
124
|
+
}
|
|
125
|
+
name = (
|
|
126
|
+
# King's Birthday.
|
|
127
|
+
tr("King's Birthday")
|
|
128
|
+
if self._year >= 2023
|
|
129
|
+
# Queen's Birthday.
|
|
130
|
+
else tr("Queen's Birthday")
|
|
131
|
+
)
|
|
132
|
+
if self._year in queens_kings_birthday_dates:
|
|
133
|
+
self._add_holiday(name, queens_kings_birthday_dates[self._year])
|
|
134
|
+
else:
|
|
135
|
+
self._add_holiday_2nd_mon_of_jun(name)
|
|
136
|
+
|
|
137
|
+
# Placed before Christmas Day for proper observed calculation.
|
|
138
|
+
self._add_observed(
|
|
139
|
+
# Boxing Day.
|
|
140
|
+
self._add_christmas_day_two(tr("Boxing Day")),
|
|
141
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE + MON_TO_NEXT_TUE,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
# Christmas Day.
|
|
145
|
+
self._add_observed(self._add_christmas_day(tr("Christmas Day")))
|
|
146
|
+
|
|
147
|
+
# Islamic holidays.
|
|
148
|
+
|
|
149
|
+
if self._year <= 2019:
|
|
150
|
+
# Islamic New Year.
|
|
151
|
+
for dt in self._add_islamic_new_year_day(tr("Islamic New Year")):
|
|
152
|
+
self._add_observed(dt)
|
|
153
|
+
|
|
154
|
+
# Prophet's Birthday.
|
|
155
|
+
for dt in self._add_mawlid_day(tr("Prophet's Birthday")):
|
|
156
|
+
self._add_observed(dt)
|
|
157
|
+
|
|
158
|
+
# Eid al-Fitr.
|
|
159
|
+
for dt in self._add_eid_al_fitr_day(tr("Eid al-Fitr")):
|
|
160
|
+
self._add_observed(dt)
|
|
161
|
+
|
|
162
|
+
# Eid al-Adha.
|
|
163
|
+
for dt in self._add_eid_al_adha_day(tr("Eid al-Adha")):
|
|
164
|
+
if self._year != 2025:
|
|
165
|
+
self._add_observed(dt)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class CocosIslandsIslamicHolidays(_CustomIslamicHolidays):
|
|
169
|
+
EID_AL_ADHA_DATES = {
|
|
170
|
+
2007: (DEC, 20),
|
|
171
|
+
2008: (DEC, 8),
|
|
172
|
+
2009: (NOV, 30),
|
|
173
|
+
2010: (NOV, 16),
|
|
174
|
+
2013: (OCT, 15),
|
|
175
|
+
2014: (OCT, 4),
|
|
176
|
+
2016: (SEP, 13),
|
|
177
|
+
2017: (SEP, 1),
|
|
178
|
+
2019: (AUG, 11),
|
|
179
|
+
2020: (JUL, 31),
|
|
180
|
+
2021: (JUL, 20),
|
|
181
|
+
2022: (JUL, 9),
|
|
182
|
+
2023: (JUN, 28),
|
|
183
|
+
2024: (JUN, 17),
|
|
184
|
+
2025: (JUN, 7),
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
EID_AL_FITR_DATES = {
|
|
188
|
+
2007: (OCT, 15),
|
|
189
|
+
2008: (OCT, 1),
|
|
190
|
+
2009: (SEP, 21),
|
|
191
|
+
2010: (SEP, 10),
|
|
192
|
+
2013: (AUG, 8),
|
|
193
|
+
2014: (JUL, 28),
|
|
194
|
+
2016: (JUL, 6),
|
|
195
|
+
2017: (JUN, 24),
|
|
196
|
+
2019: (JUN, 5),
|
|
197
|
+
2020: (MAY, 24),
|
|
198
|
+
2021: (MAY, 13),
|
|
199
|
+
2022: (MAY, 3),
|
|
200
|
+
2023: (APR, 22),
|
|
201
|
+
2024: (APR, 10),
|
|
202
|
+
2025: (MAR, 31),
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
HIJRI_NEW_YEAR_DATES = {
|
|
206
|
+
2007: (JAN, 22),
|
|
207
|
+
2008: (JAN, 10),
|
|
208
|
+
2009: (DEC, 18),
|
|
209
|
+
2010: (DEC, 7),
|
|
210
|
+
2013: (NOV, 4),
|
|
211
|
+
2014: (OCT, 25),
|
|
212
|
+
2016: (OCT, 3),
|
|
213
|
+
2017: (SEP, 22),
|
|
214
|
+
2019: (SEP, 1),
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
MAWLID_DATES = {
|
|
218
|
+
2007: (APR, 2),
|
|
219
|
+
2008: (MAR, 20),
|
|
220
|
+
2009: (MAR, 9),
|
|
221
|
+
2010: (FEB, 26),
|
|
222
|
+
2013: (JAN, 24),
|
|
223
|
+
2014: (JAN, 13),
|
|
224
|
+
2016: (DEC, 12),
|
|
225
|
+
2017: (DEC, 1),
|
|
226
|
+
2019: (NOV, 9),
|
|
227
|
+
2020: (OCT, 29),
|
|
228
|
+
2021: (OCT, 19),
|
|
229
|
+
2022: (OCT, 8),
|
|
230
|
+
2023: (SEP, 27),
|
|
231
|
+
2024: (SEP, 16),
|
|
232
|
+
2025: (SEP, 5),
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
class CC(CocosIslands):
|
|
237
|
+
pass
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
class CCK(CocosIslands):
|
|
241
|
+
pass
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class CocosIslandsStaticHolidays:
|
|
245
|
+
"""Cocos (Keeling) Islands special holidays.
|
|
246
|
+
|
|
247
|
+
References:
|
|
248
|
+
* [National Day of Mourning 2022](https://web.archive.org/web/20240712213751/https://www.infrastructure.gov.au/sites/default/files/documents/04-2022-proclamation-cki-day-of-mourning.pdf)
|
|
249
|
+
"""
|
|
250
|
+
|
|
251
|
+
special_public_holidays = {
|
|
252
|
+
# National Day of Mourning for Queen Elizabeth II.
|
|
253
|
+
2022: (SEP, 22, tr("National Day of Mourning for Queen Elizabeth II")),
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
special_public_holidays_observed = {
|
|
257
|
+
2019: (APR, 10, tr("Act of Self Determination Day")),
|
|
258
|
+
2025: (JUN, 6, tr("Eid al-Adha")),
|
|
259
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
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 <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (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 FEB, MAR, JUN, JUL, DEC
|
|
16
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
17
|
+
from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Grenada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
21
|
+
"""Grenada holidays.
|
|
22
|
+
|
|
23
|
+
References:
|
|
24
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Grenada>
|
|
25
|
+
* [Bank Holidays Act](https://web.archive.org/web/20250504095840/https://laws.gov.gd/index.php/chapters/b-23-39/1042-cap25-bank-holidays-act-2/viewdocument/1042)
|
|
26
|
+
* <https://www.timeanddate.com/holidays/grenada/>
|
|
27
|
+
* [National Heroes' Day](https://web.archive.org/web/20250504095924/https://www.gov.gd/component/edocman/grenadas-first-national-heroes-day-and-october-19th-commemoration-events/viewdocument/576)
|
|
28
|
+
* [Emancipation Day](https://web.archive.org/web/20250504100015/https://nowgrenada.com/2025/01/gnrc-chairman-supports-1-august-as-national-holiday/)
|
|
29
|
+
|
|
30
|
+
Checked With:
|
|
31
|
+
* [2010](https://web.archive.org/web/20100108053101/http://www.gov.gd/holiday_events.html)
|
|
32
|
+
* [2011](https://web.archive.org/web/20111007094915/http://www.gov.gd/holiday_events.html)
|
|
33
|
+
* [2012](https://web.archive.org/web/20120623100105/http://www.gov.gd/holiday_events.html)
|
|
34
|
+
* [2013](https://web.archive.org/web/20130805181426/http://www.gov.gd/holiday_events.html)
|
|
35
|
+
* [2014](https://web.archive.org/web/20140424191452/http://www.gov.gd/holiday_events.html)
|
|
36
|
+
* [2015](https://web.archive.org/web/20150701045051/http://www.gov.gd/holiday_events.html)
|
|
37
|
+
* [2016](https://web.archive.org/web/20160518030722/http://www.gov.gd/holiday_events.html)
|
|
38
|
+
* [2017](https://web.archive.org/web/20170505034606/http://www.gov.gd/holiday_events.html)
|
|
39
|
+
* [2018](https://web.archive.org/web/20180424025139/http://www.gov.gd/holiday_events.html)
|
|
40
|
+
* [2023](https://web.archive.org/web/20230329094946/https://www.gov.gd/pdf/Public%20Holidays%202023.pdf)
|
|
41
|
+
* [2025](https://web.archive.org/web/20250130143152/https://www.gov.gd/component/edocman/grenadas-public-holidays-2025/viewdocument/1386)
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
country = "GD"
|
|
45
|
+
default_language = "en_GD"
|
|
46
|
+
# %s (observed).
|
|
47
|
+
observed_label = tr("%s (observed)")
|
|
48
|
+
# First available revision of Bank Holidays Act.
|
|
49
|
+
start_year = 2000
|
|
50
|
+
supported_languages = ("en_GD", "en_US")
|
|
51
|
+
|
|
52
|
+
def __init__(self, *args, **kwargs):
|
|
53
|
+
ChristianHolidays.__init__(self)
|
|
54
|
+
InternationalHolidays.__init__(self)
|
|
55
|
+
StaticHolidays.__init__(self, GrenadaStaticHolidays)
|
|
56
|
+
kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
|
|
57
|
+
super().__init__(*args, **kwargs)
|
|
58
|
+
|
|
59
|
+
def _populate_public_holidays(self):
|
|
60
|
+
# New Year's Day.
|
|
61
|
+
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
|
|
62
|
+
|
|
63
|
+
# Independence Day.
|
|
64
|
+
self._add_observed(self._add_holiday_feb_7(tr("Independence Day")))
|
|
65
|
+
|
|
66
|
+
# Good Friday.
|
|
67
|
+
self._add_good_friday(tr("Good Friday"))
|
|
68
|
+
|
|
69
|
+
# Easter Monday.
|
|
70
|
+
self._add_easter_monday(tr("Easter Monday"))
|
|
71
|
+
|
|
72
|
+
# Labor Day.
|
|
73
|
+
self._add_observed(self._add_labor_day(tr("Labour Day")))
|
|
74
|
+
|
|
75
|
+
# Whit Monday.
|
|
76
|
+
self._add_whit_monday(tr("Whit Monday"))
|
|
77
|
+
|
|
78
|
+
# Corpus Christi.
|
|
79
|
+
self._add_corpus_christi_day(tr("Corpus Christi"))
|
|
80
|
+
|
|
81
|
+
# Emancipation Day.
|
|
82
|
+
name = tr("Emancipation Day")
|
|
83
|
+
if self._year >= 2025:
|
|
84
|
+
self._add_observed(self._add_holiday_aug_1(name))
|
|
85
|
+
else:
|
|
86
|
+
self._add_holiday_1st_mon_of_aug(name)
|
|
87
|
+
|
|
88
|
+
# Carnival Monday.
|
|
89
|
+
self._add_holiday_2nd_mon_of_aug(tr("Carnival Monday"))
|
|
90
|
+
|
|
91
|
+
# Carnival Tuesday.
|
|
92
|
+
self._add_holiday_1_day_past_2nd_mon_of_aug(tr("Carnival Tuesday"))
|
|
93
|
+
|
|
94
|
+
if self._year >= 2023:
|
|
95
|
+
# National Heroes' Day.
|
|
96
|
+
self._add_observed(self._add_holiday_oct_19(tr("National Heroes' Day")))
|
|
97
|
+
|
|
98
|
+
# Thanksgiving Day.
|
|
99
|
+
self._add_observed(self._add_holiday_oct_25(tr("Thanksgiving Day")))
|
|
100
|
+
|
|
101
|
+
# Christmas Day.
|
|
102
|
+
self._add_observed(self._add_christmas_day(tr("Christmas Day")))
|
|
103
|
+
|
|
104
|
+
# Boxing Day.
|
|
105
|
+
self._add_observed(self._add_christmas_day_two(tr("Boxing Day")))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class GD(Grenada):
|
|
109
|
+
pass
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class GRD(Grenada):
|
|
113
|
+
pass
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class GrenadaStaticHolidays:
|
|
117
|
+
"""Grenada special holidays.
|
|
118
|
+
|
|
119
|
+
References:
|
|
120
|
+
* [2011](https://web.archive.org/web/20250504100149/https://laws.gov.gd/index.php/s-r-o/37-sr-o-35-of-2011-bank-holiday/viewdocument/37)
|
|
121
|
+
* [2013](https://web.archive.org/web/20250504100219/https://laws.gov.gd/index.php/s-r-o/93-sro-6-of-2013-bank-holiday/viewdocument/93)
|
|
122
|
+
* [2016](https://web.archive.org/web/20250504100408/https://laws.gov.gd/index.php/s-r-o/289-sr-o-61-of-2016-bank-holiday/viewdocument/289)
|
|
123
|
+
* [2018](https://web.archive.org/web/20250504100436/https://laws.gov.gd/index.php/s-r-o/348-sr-o-10-of-2018-bank-holiday-proclamation/viewdocument/348)
|
|
124
|
+
* [24 June 2022](https://web.archive.org/web/20250504100516/https://laws.gov.gd/index.php/s-r-o/576-sr-o-33-of-2022-bank-holiday-proclamation-2022/viewdocument/576)
|
|
125
|
+
* [27 December 2022](https://web.archive.org/web/20250504100538/https://laws.gov.gd/index.php/s-r-o/586-sr-o-43-of-2022-bank-holiday-proclamation-2022/viewdocument/586)
|
|
126
|
+
* [CARICOM's 50th Anniversary 2023](https://web.archive.org/web/20250504100603/https://laws.gov.gd/index.php/s-r-o/612-sr-o-22-of-2023-bank-holiday-proclamation-2023/viewdocument/612)
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
# Bank Holiday.
|
|
130
|
+
bank_holiday = tr("Bank Holiday")
|
|
131
|
+
|
|
132
|
+
special_public_holidays = {
|
|
133
|
+
2011: (DEC, 27, bank_holiday),
|
|
134
|
+
2013: (FEB, 22, bank_holiday),
|
|
135
|
+
2016: (DEC, 27, bank_holiday),
|
|
136
|
+
2018: (MAR, 14, bank_holiday),
|
|
137
|
+
2022: (
|
|
138
|
+
(JUN, 24, bank_holiday),
|
|
139
|
+
(DEC, 27, bank_holiday),
|
|
140
|
+
),
|
|
141
|
+
# CARICOM's 50th Anniversary.
|
|
142
|
+
2023: (JUL, 4, tr("CARICOM's 50th Anniversary")),
|
|
143
|
+
}
|
holidays/countries/malaysia.py
CHANGED
|
@@ -10,11 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from typing import TYPE_CHECKING
|
|
14
|
-
|
|
15
|
-
if TYPE_CHECKING: # pragma: no cover
|
|
16
|
-
from datetime import date
|
|
17
|
-
|
|
18
13
|
from gettext import gettext as tr
|
|
19
14
|
|
|
20
15
|
from holidays.calendars import (
|
|
@@ -167,11 +162,8 @@ class Malaysia(
|
|
|
167
162
|
StaticHolidays.__init__(self, cls=MalaysiaStaticHolidays)
|
|
168
163
|
kwargs.setdefault("observed_rule", SUN_TO_NEXT_WORKDAY)
|
|
169
164
|
super().__init__(*args, **kwargs)
|
|
170
|
-
self.dts_observed: set[date] = set()
|
|
171
165
|
|
|
172
166
|
def _populate_public_holidays(self):
|
|
173
|
-
# This must be done for every `_populate_public_holidays()` call.
|
|
174
|
-
# Otherwise, 2006/2007 Eid al-Adha observance would be miscalculated.
|
|
175
167
|
self.dts_observed = set()
|
|
176
168
|
|
|
177
169
|
# Chinese New Year.
|