holidays 0.72__py3-none-any.whl → 0.74__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.
Files changed (93) hide show
  1. holidays/calendars/hindu.py +147 -3
  2. holidays/constants.py +8 -1
  3. holidays/countries/__init__.py +10 -0
  4. holidays/countries/aland_islands.py +63 -0
  5. holidays/countries/andorra.py +130 -46
  6. holidays/countries/angola.py +2 -2
  7. holidays/countries/argentina.py +12 -2
  8. holidays/countries/azerbaijan.py +1 -1
  9. holidays/countries/belgium.py +1 -1
  10. holidays/countries/benin.py +199 -0
  11. holidays/countries/bermuda.py +141 -0
  12. holidays/countries/british_virgin_islands.py +205 -0
  13. holidays/countries/chile.py +1 -1
  14. holidays/countries/cocos_islands.py +259 -0
  15. holidays/countries/curacao.py +1 -1
  16. holidays/countries/dominican_republic.py +1 -1
  17. holidays/countries/ecuador.py +1 -1
  18. holidays/countries/equatorial_guinea.py +150 -0
  19. holidays/countries/ethiopia.py +1 -1
  20. holidays/countries/finland.py +200 -36
  21. holidays/countries/grenada.py +143 -0
  22. holidays/countries/italy.py +1 -1
  23. holidays/countries/ivory_coast.py +1 -1
  24. holidays/countries/kazakhstan.py +23 -23
  25. holidays/countries/malaysia.py +0 -8
  26. holidays/countries/mexico.py +1 -1
  27. holidays/countries/morocco.py +1 -1
  28. holidays/countries/nepal.py +441 -0
  29. holidays/countries/north_macedonia.py +267 -15
  30. holidays/countries/norway.py +1 -1
  31. holidays/countries/panama.py +1 -1
  32. holidays/countries/paraguay.py +1 -1
  33. holidays/countries/philippines.py +2 -0
  34. holidays/countries/slovenia.py +1 -1
  35. holidays/countries/sweden.py +1 -1
  36. holidays/countries/thailand.py +2 -2
  37. holidays/countries/togo.py +182 -0
  38. holidays/countries/trinidad_and_tobago.py +1 -1
  39. holidays/countries/tuvalu.py +1 -1
  40. holidays/countries/ukraine.py +44 -44
  41. holidays/countries/united_states.py +1 -1
  42. holidays/countries/vatican_city.py +29 -31
  43. holidays/countries/venezuela.py +1 -1
  44. holidays/countries/yemen.py +207 -0
  45. holidays/groups/chinese.py +3 -3
  46. holidays/groups/christian.py +7 -7
  47. holidays/groups/hindu.py +121 -1
  48. holidays/groups/international.py +9 -9
  49. holidays/groups/islamic.py +3 -3
  50. holidays/locale/ar/LC_MESSAGES/YE.mo +0 -0
  51. holidays/locale/ca/LC_MESSAGES/AD.mo +0 -0
  52. holidays/locale/coa_CC/LC_MESSAGES/CC.mo +0 -0
  53. holidays/locale/en_CC/LC_MESSAGES/CC.mo +0 -0
  54. holidays/locale/en_GD/LC_MESSAGES/GD.mo +0 -0
  55. holidays/locale/en_US/LC_MESSAGES/AD.mo +0 -0
  56. holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
  57. holidays/locale/en_US/LC_MESSAGES/AX.mo +0 -0
  58. holidays/locale/en_US/LC_MESSAGES/BJ.mo +0 -0
  59. holidays/locale/en_US/LC_MESSAGES/CC.mo +0 -0
  60. holidays/locale/en_US/LC_MESSAGES/FI.mo +0 -0
  61. holidays/locale/en_US/LC_MESSAGES/GD.mo +0 -0
  62. holidays/locale/en_US/LC_MESSAGES/GQ.mo +0 -0
  63. holidays/locale/en_US/LC_MESSAGES/MK.mo +0 -0
  64. holidays/locale/en_US/LC_MESSAGES/TG.mo +0 -0
  65. holidays/locale/en_US/LC_MESSAGES/TH.mo +0 -0
  66. holidays/locale/en_US/LC_MESSAGES/VG.mo +0 -0
  67. holidays/locale/en_US/LC_MESSAGES/YE.mo +0 -0
  68. holidays/locale/en_VG/LC_MESSAGES/VG.mo +0 -0
  69. holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
  70. holidays/locale/es/LC_MESSAGES/GQ.mo +0 -0
  71. holidays/locale/fi/LC_MESSAGES/AX.mo +0 -0
  72. holidays/locale/fi/LC_MESSAGES/FI.mo +0 -0
  73. holidays/locale/fr/LC_MESSAGES/TG.mo +0 -0
  74. holidays/locale/fr_BJ/LC_MESSAGES/BJ.mo +0 -0
  75. holidays/locale/mk/LC_MESSAGES/MK.mo +0 -0
  76. holidays/locale/sv_FI/LC_MESSAGES/AX.mo +0 -0
  77. holidays/locale/sv_FI/LC_MESSAGES/FI.mo +0 -0
  78. holidays/locale/th/LC_MESSAGES/AX.mo +0 -0
  79. holidays/locale/th/LC_MESSAGES/FI.mo +0 -0
  80. holidays/locale/uk/LC_MESSAGES/AD.mo +0 -0
  81. holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
  82. holidays/locale/uk/LC_MESSAGES/AX.mo +0 -0
  83. holidays/locale/uk/LC_MESSAGES/FI.mo +0 -0
  84. holidays/locale/uk/LC_MESSAGES/MK.mo +0 -0
  85. holidays/locale/uk/LC_MESSAGES/TH.mo +0 -0
  86. holidays/registry.py +10 -0
  87. holidays/version.py +1 -1
  88. {holidays-0.72.dist-info → holidays-0.74.dist-info}/METADATA +80 -10
  89. {holidays-0.72.dist-info → holidays-0.74.dist-info}/RECORD +93 -55
  90. {holidays-0.72.dist-info → holidays-0.74.dist-info}/WHEEL +1 -1
  91. {holidays-0.72.dist-info → holidays-0.74.dist-info}/licenses/CONTRIBUTORS +2 -0
  92. {holidays-0.72.dist-info → holidays-0.74.dist-info}/licenses/LICENSE +0 -0
  93. {holidays-0.72.dist-info → holidays-0.74.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,7 @@
13
13
  from gettext import gettext as tr
14
14
 
15
15
  from holidays.calendars.gregorian import _timedelta
16
- from holidays.constants import PUBLIC, UNOFFICIAL
16
+ from holidays.constants import PUBLIC, UNOFFICIAL, WORKDAY
17
17
  from holidays.groups import ChristianHolidays, InternationalHolidays
18
18
  from holidays.holiday_base import HolidayBase
19
19
 
@@ -21,21 +21,90 @@ from holidays.holiday_base import HolidayBase
21
21
  class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
22
22
  """Finland holidays.
23
23
 
24
+ Official Flag Days are included in the `WORKDAY` category, while Customary Flag Days
25
+ are included in `UNOFFICIAL` category.
26
+
24
27
  References:
25
28
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Finland>
26
- * [Bank holidays (Finnish)](https://www.suomenpankki.fi/fi/raha-ja-maksaminen/pankkivapaapaivat/)
27
- * [Bank holidays (English)](https://www.suomenpankki.fi/en/money-and-payments/bank-holidays/)
28
- * [Bank holidays (Swedish)](https://www.suomenpankki.fi/sv/pengar-och-betalningar/bankfria-dagar-i-finland/)
29
+ * [Bank holidays (Finnish)](https://web.archive.org/web/20250416185850/https://www.suomenpankki.fi/fi/raha-ja-maksaminen/pankkivapaapaivat/)
30
+ * [Bank holidays (English)](https://web.archive.org/web/20250327200736/https://www.suomenpankki.fi/en/money-and-payments/bank-holidays/)
31
+ * [Bank holidays (Swedish)](https://web.archive.org/web/20250217014536/https://www.suomenpankki.fi/sv/pengar-och-betalningar/bankfria-dagar-i-finland/)
29
32
  * <https://en.wikipedia.org/wiki/Flag_flying_days_in_Finland#Customary_flag_days>
30
- * <https://intermin.fi/en/flag-and-arms/flag-flying-days>
31
- * <https://intermin.fi/en/flag-and-arms/flag-days/2024>
33
+ * <https://web.archive.org/web/20250327201901/https://intermin.fi/en/flag-and-arms/flag-flying-days>
34
+ * <https://web.archive.org/web/20241227163324/https://intermin.fi/en/flag-and-arms/flag-days/2024>
35
+ * <https://web.archive.org/web/20250515053310/https://almanakka.helsinki.fi/en/flag-days-and-holidays/>
36
+ * <https://web.archive.org/web/20250515054129/https://www.finlex.fi/en/legislation/collection/1978/383>
37
+ * <https://web.archive.org/web/20250515064749/https://itsenäisyys.fi/itsenaisyyspaivan-perinteet-vakiintuivat-jo-itsenaisyyden-alkuvuosina/>
38
+ * <https://web.archive.org/web/20250515072453/https://yle.fi/a/20-152398>
32
39
  * <https://en.wikipedia.org/wiki/Independence_Day_(Finland)>
40
+ * <https://en.wikipedia.org/wiki/Åland's_Autonomy_Day>
41
+ * <https://web.archive.org/web/20250509184304/https://wiki.aineetonkulttuuriperinto.fi/wiki/Workers’_Labour_Day_on_May_1>
33
42
  """
34
43
 
35
44
  country = "FI"
36
45
  default_language = "fi"
37
- supported_languages = ("en_US", "fi", "sv_FI", "uk")
38
- supported_categories = (PUBLIC, UNOFFICIAL)
46
+ supported_languages = ("en_US", "fi", "sv_FI", "th", "uk")
47
+ supported_categories = (PUBLIC, UNOFFICIAL, WORKDAY)
48
+ subdivisions: tuple[str, ...] = (
49
+ "01", # Ahvenanmaan maakunta (Landskapet Åland).
50
+ "02", # Etelä-Karjala (Södra Karelen).
51
+ "03", # Etelä-Pohjanmaa (Södra Österbotten).
52
+ "04", # Etelä-Savo (Södra Savolax).
53
+ "05", # Kainuu (Kajanaland).
54
+ "06", # Kanta-Häme (Egentliga Tavastland).
55
+ "07", # Keski-Pohjanmaa (Mellersta Österbotten).
56
+ "08", # Keski-Suomi (Mellersta Finland).
57
+ "09", # Kymenlaakso (Kymmenedalen).
58
+ "10", # Lappi (Lappland).
59
+ "11", # Pirkanmaa (Birkaland).
60
+ "12", # Pohjanmaa (Österbotten).
61
+ "13", # Pohjois-Karjala (Norra Karelen).
62
+ "14", # Pohjois-Pohjanmaa (Norra Österbotten).
63
+ "15", # Pohjois-Savo (Norra Savolax).
64
+ "16", # Päijät-Häme (Päijänne-Tavastland).
65
+ "17", # Satakunta.
66
+ "18", # Uusimaa (Nyland).
67
+ "19", # Varsinais-Suomi (Egentliga Finland).
68
+ )
69
+ subdivisions_aliases = {
70
+ "Ahvenanmaan maakunta": "01",
71
+ "Landskapet Åland": "01",
72
+ "Etelä-Karjala": "02",
73
+ "Södra Karelen": "02",
74
+ "Etelä-Pohjanmaa": "03",
75
+ "Södra Österbotten": "03",
76
+ "Etelä-Savo": "04",
77
+ "Södra Savolax": "04",
78
+ "Kainuu": "05",
79
+ "Kajanaland": "05",
80
+ "Kanta-Häme": "06",
81
+ "Egentliga Tavastland": "06",
82
+ "Keski-Pohjanmaa": "07",
83
+ "Mellersta Österbotten": "07",
84
+ "Keski-Suomi": "08",
85
+ "Mellersta Finland": "08",
86
+ "Kymenlaakso": "09",
87
+ "Kymmenedalen": "09",
88
+ "Lappi": "10",
89
+ "Lappland": "10",
90
+ "Pirkanmaa": "11",
91
+ "Birkaland": "11",
92
+ "Pohjanmaa": "12",
93
+ "Österbotten": "12",
94
+ "Pohjois-Karjala": "13",
95
+ "Norra Karelen": "13",
96
+ "Pohjois-Pohjanmaa": "14",
97
+ "Norra Österbotten": "14",
98
+ "Pohjois-Savo": "15",
99
+ "Norra Savolax": "15",
100
+ "Päijät-Häme": "16",
101
+ "Päijänne-Tavastland": "16",
102
+ "Satakunta": "17",
103
+ "Uusimaa": "18",
104
+ "Nyland": "18",
105
+ "Varsinais-Suomi": "19",
106
+ "Egentliga Finland": "19",
107
+ }
39
108
  start_year = 1853
40
109
 
41
110
  def __init__(self, *args, **kwargs):
@@ -63,8 +132,9 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
63
132
  # Easter Monday.
64
133
  self._add_easter_monday(tr("Toinen pääsiäispäivä"))
65
134
 
66
- # May Day.
67
- self._add_holiday_may_1(tr("Vappu"))
135
+ if self._year >= 1944:
136
+ # May Day.
137
+ self._add_holiday_may_1(tr("Vappu"))
68
138
 
69
139
  # Ascension Day.
70
140
  name = tr("Helatorstai")
@@ -93,7 +163,8 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
93
163
  else:
94
164
  self._add_holiday_nov_1(name)
95
165
 
96
- if self._year >= 1917:
166
+ # Designated as Public Holiday on NOV 20th, 1919.
167
+ if self._year >= 1919:
97
168
  # Independence Day.
98
169
  self._add_holiday_dec_6(tr("Itsenäisyyspäivä"))
99
170
 
@@ -107,82 +178,175 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
107
178
  self._add_christmas_day_two(tr("Tapaninpäivä"))
108
179
 
109
180
  def _populate_unofficial_holidays(self):
110
- if self._year >= 1854:
181
+ # Customary Flag Days.
182
+
183
+ # Unofficial observance starts in 1854.
184
+ # Starting in 1929, become a name day of J.L. Runeberg.
185
+ # Added to the Almanac in 1950 as J.L. Runeberg's Day.
186
+ # Become a Flag Day in 1976.
187
+ if self._year >= 1976:
111
188
  # Runeberg Day.
112
189
  self._add_holiday_feb_5(tr("Runebergin päivä"))
113
190
 
114
- if self._year >= 1860:
115
- # Kalevala Day, Day of Finnish Culture.
116
- self._add_holiday_feb_28(tr("Kalevalan päivä, suomalaisen kulttuurin päivä"))
117
-
191
+ # Petition for Flag Day status starts in 2003.
192
+ # Become a Flag Day in 2007.
118
193
  if self._year >= 2007:
119
194
  # Minna Canth Day, Day of Equality.
120
195
  self._add_holiday_mar_19(tr("Minna Canthin päivä, tasa-arvon päivä"))
121
196
 
122
- if self._year >= 1978:
197
+ # Added to the Almanac in 1960 as Mikael Agricola Day.
198
+ # Also considered the "Day of Finnish Language" from 1980 onwards.
199
+ # Become a Flag Day in 1980.
200
+ if self._year >= 1980:
123
201
  # Mikael Agricola Day, Day of the Finnish Language.
124
202
  self._add_holiday_apr_9(tr("Mikael Agricolan päivä, suomen kielen päivä"))
125
203
 
204
+ # Become a Flag Day in 1987.
126
205
  if self._year >= 1987:
127
206
  # National War Veterans' Day.
128
207
  self._add_holiday_apr_27(tr("Kansallinen veteraanipäivä"))
129
208
 
209
+ # Become a Flag Day in 2019.
130
210
  if self._year >= 2019:
131
211
  # Europe Day.
132
212
  self._add_europe_day(tr("Eurooppa-päivä"))
133
213
 
134
- if self._year >= 1918:
135
- # Mother's Day.
136
- self._add_holiday_2nd_sun_of_may(tr("Äitienpäivä"))
137
-
214
+ # Petition for Flag Day status starts in the 1920s.
215
+ # Become a Flag Day in 1952.
216
+ # Also considered the "Day of Finnish Heritage" from 1978 onward.
138
217
  if self._year >= 1952:
139
- # J. V. Snellman Day, Day of Finnish Heritage.
140
- self._add_holiday_may_12(tr("J.V. Snellmanin päivä, suomalaisuuden päivä"))
141
-
218
+ name = (
219
+ # J. V. Snellman Day, Day of Finnish Heritage.
220
+ tr("J.V. Snellmanin päivä, suomalaisuuden päivä")
221
+ if self._year >= 1978
222
+ # J. V. Snellman Day.
223
+ else tr("J.V. Snellmanin päivä")
224
+ )
225
+ self._add_holiday_may_12(name)
226
+
227
+ # Become a Flag Day in 1977.
142
228
  if self._year >= 1977:
143
229
  # Remembrance Day.
144
230
  self._add_holiday_3rd_sun_of_may(tr("Kaatuneitten muistopäivä"))
145
231
 
146
- if self._year >= 1942:
147
- # Flag Day of the Finnish Defense Forces.
148
- self._add_holiday_jun_6(tr("Puolustusvoimain lippujuhlan päivä"))
149
-
150
- if self._year >= 1992:
232
+ # Become a Flag Day in 1998.
233
+ if self._year >= 1998:
151
234
  # Eino Leino Day, Day of Summer and Poetry.
152
235
  self._add_holiday_jul_6(tr("Eino Leinon päivä, runon ja suven päivä"))
153
236
 
154
- if self._year >= 2013:
237
+ # Added to the Almanac in 2020.
238
+ # Become a Flag Day in 2023.
239
+ if self._year >= 2023:
155
240
  # Finland's Nature Day.
156
241
  self._add_holiday_last_sat_of_aug(tr("Suomen luonnon päivä"))
157
242
 
243
+ # Become a Flag Day in 2016.
158
244
  if self._year >= 2016:
159
245
  # Miina Sillanpää Day, Day of Civic Participation.
160
246
  self._add_holiday_oct_1(tr("Miina Sillanpään ja kansalaisvaikuttamisen päivä"))
161
247
 
248
+ # Become a Flag Day in 1950.
249
+ # Also considered the "Day of Finnish Literature" from 1978 onward.
162
250
  if self._year >= 1950:
163
- # Aleksis Kivi Day, Day of Finnish Literature.
164
- self._add_holiday_oct_10(tr("Aleksis Kiven päivä, suomalaisen kirjallisuuden päivä"))
165
-
251
+ name = (
252
+ # Aleksis Kivi Day, Day of Finnish Literature.
253
+ tr("Aleksis Kiven päivä, suomalaisen kirjallisuuden päivä")
254
+ if self._year >= 1978
255
+ # Aleksis Kivi Day.
256
+ else tr("Aleksis Kiven päivä")
257
+ )
258
+ self._add_holiday_oct_10(name)
259
+
260
+ # Become a Flag Day in 1987.
166
261
  if self._year >= 1987:
167
262
  # United Nations Day.
168
263
  self._add_united_nations_day(tr("YK:n päivä"))
169
264
 
170
- if self._year >= 1908:
265
+ # Become a Flag Day in 1979.
266
+ if self._year >= 1979:
171
267
  # Finnish Swedish Heritage Day, svenska dagen.
172
268
  self._add_holiday_nov_6(tr("Ruotsalaisuuden päivä, Kustaa Aadolfin päivä"))
173
269
 
174
- if self._year >= 1949:
270
+ # Become a Customary Flag Day in 1987.
271
+ # Become an Official Flag Day in 2019.
272
+ if 1987 <= self._year <= 2018:
175
273
  # Father's Day.
176
274
  self._add_holiday_2nd_sun_of_nov(tr("Isänpäivä"))
177
275
 
276
+ # Become a Flag Day in 2020.
178
277
  if self._year >= 2020:
179
278
  # Day of Children's Rights.
180
279
  self._add_holiday_nov_20(tr("Lapsen oikeuksien päivä"))
181
280
 
182
- if self._year >= 2007:
281
+ # First recommendation starts in 2005.
282
+ # Become a Flag Day in 2011.
283
+ if self._year >= 2011:
183
284
  # Jean Sibelius Day, Day of Finnish Music.
184
285
  self._add_holiday_dec_8(tr("Jean Sibeliuksen päivä, suomalaisen musiikin päivä"))
185
286
 
287
+ def _populate_workday_holidays(self):
288
+ # Official Flag Days.
289
+
290
+ # First general observance starts in 1885.
291
+ # Become a Flag Day in 1920.
292
+ # Added to the Almanac in 1950, confirmed by a decree in 1978.
293
+ if self._year >= 1920:
294
+ # Kalevala Day, Day of Finnish Culture.
295
+ self._add_holiday_feb_28(tr("Kalevalan päivä, suomalaisen kulttuurin päivä"))
296
+
297
+ # While May Day is already a Public Holiday since 1944, it gains Flag Day status in 1978,
298
+ # although actual observance starts in 1979.
299
+ if self._year >= 1979:
300
+ # May Day.
301
+ self._add_holiday_may_1(tr("Vappu"))
302
+
303
+ # First observed in parts of Finland in 1918.
304
+ # Moved from 3rd to 2nd Sunday of May in 1927.
305
+ # Become Flag Day in 1947.
306
+ if self._year >= 1947:
307
+ # Mother's Day.
308
+ self._add_holiday_2nd_sun_of_may(tr("Äitienpäivä"))
309
+
310
+ # Become a Flag Day in 1942.
311
+ # Got its current name in 1950.
312
+ if self._year >= 1942:
313
+ name = (
314
+ # Flag Day of the Finnish Defense Forces.
315
+ tr("Puolustusvoimain lippujuhlan päivä")
316
+ if self._year >= 1950
317
+ # Birthday of the Marshal of Finland.
318
+ else tr("Suomen marsalkan syntymäpäivä")
319
+ )
320
+ self._add_holiday_jun_6(name)
321
+
322
+ # Day of the Finnish Flag was first created in 1934.
323
+ # This coincides with Midsummer Day.
324
+
325
+ # Day of the Finnish Flag.
326
+ name = tr("Suomen lipun päivä")
327
+ if self._year >= 1955:
328
+ self._add_holiday_1st_sat_from_jun_20(name)
329
+ elif self._year >= 1934:
330
+ self._add_holiday_jun_24(name)
331
+
332
+ # Become a Customary Flag Day in 1987.
333
+ # Become an Official Flag Day in 2019.
334
+ if self._year >= 2019:
335
+ # Father's Day.
336
+ self._add_holiday_2nd_sun_of_nov(tr("Isänpäivä"))
337
+
338
+ # Flag Day status assumed to start in 1919.
339
+ if self._year >= 1919:
340
+ # Independence Day.
341
+ self._add_holiday_dec_6(tr("Itsenäisyyspäivä"))
342
+
343
+ def _populate_subdiv_01_public_holidays(self):
344
+ # Celebrated since 1993 when the 70th anniversary of the Autonomy Act of 1920 was
345
+ # first formally recognized as a flag day.
346
+ if self._year >= 1993:
347
+ # Åland's Autonomy Day.
348
+ self._add_holiday_jun_9(tr("Ahvenanmaan itsehallintopäivä"))
349
+
186
350
 
187
351
  class FI(Finland):
188
352
  pass
@@ -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
+ }
@@ -20,7 +20,7 @@ class Italy(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHoliday
20
20
 
21
21
  References:
22
22
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Italy>
23
- * [Provinces holidays](https://it.wikipedia.org/wiki/Santi_patroni_cattolici_delle_citt%C3%A0_capoluogo_di_provincia_italiane)
23
+ * [Provinces holidays](https://it.wikipedia.org/wiki/Santi_patroni_cattolici_delle_città_capoluogo_di_provincia_italiane)
24
24
  """
25
25
 
26
26
  country = "IT"
@@ -32,7 +32,7 @@ class IvoryCoast(
32
32
  * Decree No. 2011-371:
33
33
  * [page 1](https://web.archive.org/web/20180617165811/http://www.cgeci.org/cgeci/docs/documents/Doc-ferie-1.pdf)
34
34
  * [page 2](https://web.archive.org/web/20180826205106/http://www.cgeci.org/cgeci/docs/documents/Doc-ferie-2.pdf)
35
- * <https://fr.wikipedia.org/wiki/Fêtes_et_jours_fériés_en_Côte_d%27Ivoire>
35
+ * <https://fr.wikipedia.org/wiki/Fêtes_et_jours_fériés_en_Côte_d'Ivoire>
36
36
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Ivory_Coast>
37
37
  * <https://www.timeanddate.com/holidays/ivory-coast/>
38
38
  * [National Peace Day](https://en.wikipedia.org/wiki/Ivory_Coast#Independence)
@@ -32,8 +32,8 @@ class Kazakhstan(
32
32
  References:
33
33
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Kazakhstan>
34
34
  * <https://egov.kz/cms/en/articles/holidays-calend>
35
- * <https://adilet.zan.kz/kaz/docs/Z010000267%5F/history>
36
- * <https://adilet.zan.kz/kaz/docs/Z990000493%5F#z63>
35
+ * <https://adilet.zan.kz/kaz/docs/Z010000267_/history>
36
+ * <https://adilet.zan.kz/kaz/docs/Z990000493_#z63>
37
37
 
38
38
  Islamic holidays:
39
39
  * [2025](https://en.inform.kz/news/first-day-of-ramadan-to-fall-on-march-1-2025-ca393f/)
@@ -174,33 +174,33 @@ class KazakhstanStaticHolidays:
174
174
  """Kazakhstan special holidays.
175
175
 
176
176
  References:
177
- * [2000](https://adilet.zan.kz/kaz/docs/P000000642%5F)
177
+ * [2000](https://adilet.zan.kz/kaz/docs/P000000642_)
178
178
  * 2001:
179
- * <https://adilet.zan.kz/kaz/docs/P010000282%5F>
180
- * <https://adilet.zan.kz/kaz/docs/P010000515%5F>
181
- * <https://adilet.zan.kz/kaz/docs/P010001604%5F>
182
- * [2002](https://adilet.zan.kz/kaz/docs/P020000466%5F)
179
+ * <https://adilet.zan.kz/kaz/docs/P010000282_>
180
+ * <https://adilet.zan.kz/kaz/docs/P010000515_>
181
+ * <https://adilet.zan.kz/kaz/docs/P010001604_>
182
+ * [2002](https://adilet.zan.kz/kaz/docs/P020000466_)
183
183
  * 2003:
184
- * <https://adilet.zan.kz/kaz/docs/P030000338%5F>
185
- * <https://adilet.zan.kz/kaz/docs/P030001166%5F>
184
+ * <https://adilet.zan.kz/kaz/docs/P030000338_>
185
+ * <https://adilet.zan.kz/kaz/docs/P030001166_>
186
186
  * 2005:
187
- * <https://adilet.zan.kz/kaz/docs/P050000142%5F>
188
- * <https://adilet.zan.kz/kaz/docs/P050000751%5F>
189
- * <https://adilet.zan.kz/kaz/docs/P050000949%5F>
187
+ * <https://adilet.zan.kz/kaz/docs/P050000142_>
188
+ * <https://adilet.zan.kz/kaz/docs/P050000751_>
189
+ * <https://adilet.zan.kz/kaz/docs/P050000949_>
190
190
  * 2006:
191
- * <https://adilet.zan.kz/kaz/docs/P050001309%5F>
192
- * <https://adilet.zan.kz/kaz/docs/P060000277%5F>
191
+ * <https://adilet.zan.kz/kaz/docs/P050001309_>
192
+ * <https://adilet.zan.kz/kaz/docs/P060000277_>
193
193
  * 2007:
194
- * <https://adilet.zan.kz/kaz/docs/P070000148%5F>
195
- * <https://adilet.zan.kz/kaz/docs/P070000165%5F>
196
- * <https://adilet.zan.kz/kaz/docs/P070000713%5F>
197
- * <https://adilet.zan.kz/kaz/docs/P070000925%5F>
198
- * <https://adilet.zan.kz/kaz/docs/P070001113%5F>
199
- * [2008](https://adilet.zan.kz/kaz/docs/P080000364%5F)
200
- * [2009](https://adilet.zan.kz/kaz/docs/P090001936%5F)
194
+ * <https://adilet.zan.kz/kaz/docs/P070000148_>
195
+ * <https://adilet.zan.kz/kaz/docs/P070000165_>
196
+ * <https://adilet.zan.kz/kaz/docs/P070000713_>
197
+ * <https://adilet.zan.kz/kaz/docs/P070000925_>
198
+ * <https://adilet.zan.kz/kaz/docs/P070001113_>
199
+ * [2008](https://adilet.zan.kz/kaz/docs/P080000364_)
200
+ * [2009](https://adilet.zan.kz/kaz/docs/P090001936_)
201
201
  * 2010:
202
- * <https://adilet.zan.kz/kaz/docs/P090002216%5F>
203
- * <https://adilet.zan.kz/kaz/docs/P100000637%5F>
202
+ * <https://adilet.zan.kz/kaz/docs/P090002216_>
203
+ * <https://adilet.zan.kz/kaz/docs/P100000637_>
204
204
  * 2011:
205
205
  * <https://adilet.zan.kz/kaz/docs/P1100000167>
206
206
  * <https://adilet.zan.kz/kaz/docs/P1100000948>
@@ -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.
@@ -21,7 +21,7 @@ class Mexico(HolidayBase, ChristianHolidays, InternationalHolidays):
21
21
 
22
22
  References:
23
23
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Mexico>
24
- * <https://es.wikipedia.org/wiki/Anexo:D%C3%ADas_festivos_en_M%C3%A9xico>
24
+ * <https://es.wikipedia.org/wiki/Anexo:Días_festivos_en_México>
25
25
  * <https://www.gob.mx/cms/uploads/attachment/file/156203/1044_Ley_Federal_del_Trabajo.pdf>
26
26
  * <http://www.diputados.gob.mx/LeyesBiblio/ref/lft/LFT_orig_01abr70_ima.pdf>
27
27
  * <https://www.gob.mx/profedet/es/articulos/sabes-cuales-son-los-dias-de-descanso-obligatorio-para-este-2024>
@@ -20,7 +20,7 @@ class Morocco(HolidayBase, InternationalHolidays, IslamicHolidays):
20
20
  """Morocco holidays.
21
21
 
22
22
  References:
23
- * <https://fr.wikipedia.org/wiki/F%C3%AAtes_et_jours_f%C3%A9ri%C3%A9s_au_Maroc>
23
+ * <https://fr.wikipedia.org/wiki/Fêtes_et_jours_fériés_au_Maroc>
24
24
  * <https://www.mmsp.gov.ma/fr/pratiques.aspx?id=38>
25
25
  """
26
26