holidays 0.67__py3-none-any.whl → 0.69__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 (99) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/balinese_saka.py +112 -0
  3. holidays/calendars/chinese.py +1 -1
  4. holidays/calendars/hindu.py +865 -1
  5. holidays/constants.py +1 -0
  6. holidays/countries/__init__.py +1 -0
  7. holidays/countries/afghanistan.py +8 -2
  8. holidays/countries/albania.py +8 -2
  9. holidays/countries/algeria.py +6 -2
  10. holidays/countries/american_samoa.py +6 -2
  11. holidays/countries/azerbaijan.py +26 -4
  12. holidays/countries/bahrain.py +8 -2
  13. holidays/countries/bosnia_and_herzegovina.py +8 -2
  14. holidays/countries/brunei.py +8 -2
  15. holidays/countries/burkina_faso.py +8 -2
  16. holidays/countries/burundi.py +6 -2
  17. holidays/countries/cameroon.py +8 -2
  18. holidays/countries/chad.py +8 -2
  19. holidays/countries/djibouti.py +6 -2
  20. holidays/countries/egypt.py +6 -2
  21. holidays/countries/ethiopia.py +8 -2
  22. holidays/countries/gabon.py +8 -2
  23. holidays/countries/ghana.py +6 -2
  24. holidays/countries/guam.py +6 -2
  25. holidays/countries/hongkong.py +38 -52
  26. holidays/countries/india.py +482 -166
  27. holidays/countries/indonesia.py +14 -58
  28. holidays/countries/iran.py +8 -2
  29. holidays/countries/jordan.py +6 -2
  30. holidays/countries/kazakhstan.py +8 -2
  31. holidays/countries/kenya.py +209 -47
  32. holidays/countries/kuwait.py +6 -2
  33. holidays/countries/kyrgyzstan.py +6 -2
  34. holidays/countries/macau.py +474 -0
  35. holidays/countries/malaysia.py +30 -6
  36. holidays/countries/maldives.py +6 -2
  37. holidays/countries/mauritania.py +6 -2
  38. holidays/countries/montenegro.py +8 -2
  39. holidays/countries/morocco.py +6 -2
  40. holidays/countries/nigeria.py +6 -2
  41. holidays/countries/north_macedonia.py +6 -2
  42. holidays/countries/northern_mariana_islands.py +6 -2
  43. holidays/countries/pakistan.py +8 -2
  44. holidays/countries/philippines.py +13 -3
  45. holidays/countries/poland.py +1 -1
  46. holidays/countries/puerto_rico.py +6 -2
  47. holidays/countries/saudi_arabia.py +6 -2
  48. holidays/countries/singapore.py +7 -2
  49. holidays/countries/spain.py +8 -2
  50. holidays/countries/sri_lanka.py +8 -2
  51. holidays/countries/taiwan.py +226 -29
  52. holidays/countries/tanzania.py +8 -2
  53. holidays/countries/timor_leste.py +21 -2
  54. holidays/countries/tunisia.py +6 -2
  55. holidays/countries/turkey.py +8 -2
  56. holidays/countries/united_arab_emirates.py +8 -2
  57. holidays/countries/united_states.py +84 -35
  58. holidays/countries/united_states_minor_outlying_islands.py +6 -2
  59. holidays/countries/united_states_virgin_islands.py +6 -2
  60. holidays/countries/uzbekistan.py +8 -2
  61. holidays/groups/__init__.py +1 -0
  62. holidays/groups/balinese_saka.py +45 -0
  63. holidays/groups/chinese.py +68 -3
  64. holidays/groups/hindu.py +255 -0
  65. holidays/groups/islamic.py +5 -2
  66. holidays/holiday_base.py +44 -29
  67. holidays/locale/de/LC_MESSAGES/PL.mo +0 -0
  68. holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
  69. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  70. holidays/locale/en_KE/LC_MESSAGES/KE.mo +0 -0
  71. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  72. holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
  73. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  74. holidays/locale/en_US/LC_MESSAGES/KE.mo +0 -0
  75. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  76. holidays/locale/en_US/LC_MESSAGES/MY.mo +0 -0
  77. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  78. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  79. holidays/locale/ms_MY/LC_MESSAGES/MY.mo +0 -0
  80. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  81. holidays/locale/sw/LC_MESSAGES/KE.mo +0 -0
  82. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  83. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  84. holidays/locale/th/LC_MESSAGES/MY.mo +0 -0
  85. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  86. holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
  87. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  88. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  89. holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
  90. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  91. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  92. holidays/registry.py +1 -0
  93. holidays/version.py +1 -1
  94. {holidays-0.67.dist-info → holidays-0.69.dist-info}/AUTHORS +1 -0
  95. {holidays-0.67.dist-info → holidays-0.69.dist-info}/METADATA +24 -19
  96. {holidays-0.67.dist-info → holidays-0.69.dist-info}/RECORD +99 -83
  97. {holidays-0.67.dist-info → holidays-0.69.dist-info}/WHEEL +1 -1
  98. {holidays-0.67.dist-info → holidays-0.69.dist-info}/LICENSE +0 -0
  99. {holidays-0.67.dist-info → holidays-0.69.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,474 @@
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 AUTHORS 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, SEP, OCT, DEC
16
+ from holidays.constants import GOVERNMENT, MANDATORY, PUBLIC
17
+ from holidays.groups import (
18
+ ChineseCalendarHolidays,
19
+ ChristianHolidays,
20
+ InternationalHolidays,
21
+ StaticHolidays,
22
+ )
23
+ from holidays.observed_holiday_base import (
24
+ ObservedHolidayBase,
25
+ SUN_TO_NEXT_WORKDAY,
26
+ SAT_SUN_TO_NEXT_WORKDAY,
27
+ )
28
+
29
+
30
+ class Macau(
31
+ ObservedHolidayBase,
32
+ ChineseCalendarHolidays,
33
+ ChristianHolidays,
34
+ InternationalHolidays,
35
+ StaticHolidays,
36
+ ):
37
+ """
38
+ Public Holidays References:
39
+ - `Decreto-Lei n.º 4/82/M <https://bo.io.gov.mo/bo/i/82/04/declei04.asp>`_
40
+ - `Decreto-Lei n.º 38/87/M <https://bo.io.gov.mo/bo/i/87/25/declei38.asp>`_
41
+ - `Decreto-Lei n.º 15/93/M <https://bo.io.gov.mo/bo/i/93/17/declei15.asp>`_
42
+ - `Decreto-Lei n.º 7/97/M <https://bo.io.gov.mo/bo/i/97/11/declei07.asp>`_
43
+ - `Portaria n.º 85/97/M <https://bo.io.gov.mo/bo/i/97/15/port85.asp>`_
44
+ - `Portaria n.º 242/98/M <https://bo.io.gov.mo/bo/i/98/48/port242.asp>`_
45
+ - `Regulamento Administrativo n.º 4/1999 <https://bo.io.gov.mo/bo/i/1999/01/regadm04.asp>`_
46
+ - `Regulamento Administrativo n.º 5/1999 <https://bo.io.gov.mo/bo/i/1999/01/regadm05.asp>`_
47
+ - `Ordem Executiva n.º 60/2000 <https://bo.io.gov.mo/bo/i/2000/40/ordem60.asp>`_
48
+ - `Lei n.º 27/2024 <https://bo.io.gov.mo/bo/i/2025/01/lei27.asp#an2l63>`_
49
+ Mandatory Holidays References:
50
+ - `Decreto-Lei n.º 101/84/M <https://bo.io.gov.mo/bo/i/84/35/declei101.asp>`_
51
+ - `Decreto-Lei n.º 24/89/M <https://bo.io.gov.mo/bo/i/89/14/declei24.asp>`_
52
+ - `Lei n.º 8/2000 <https://bo.io.gov.mo/bo/i/2000/19/lei08.asp>`_
53
+ - `Lei n.º 7/2008 <https://bo.io.gov.mo/bo/i/2008/33/lei07.asp>`_
54
+ Cross-Checking:
55
+ - `Public Holidays for 2017–2025 <https://www.gov.mo/en/public-holidays/year-2017/>`_
56
+ - `Public Holidays for 2005-2018 <https://web.archive.org/web/20171207162948/http://portal.gov.mo/web/guest/info_detail?infoid=1887061>`_
57
+ - `Mandatory Holidays for 2009-2029 <https://www.dsal.gov.mo/pt/standard/holiday_table.html>`_
58
+ """
59
+
60
+ country = "MO"
61
+ default_language = "zh_MO"
62
+ subdivisions = (
63
+ "I", # Ilhas.
64
+ "M", # Macau.
65
+ )
66
+ subdivisions_aliases = {
67
+ # Municipalities.
68
+ "Concelho das Ilhas": "I",
69
+ "海島市": "I",
70
+ "海岛市": "I",
71
+ "Concelho de Macau": "M",
72
+ "澳門市": "M",
73
+ "澳门市": "M",
74
+ }
75
+ supported_categories = (GOVERNMENT, MANDATORY, PUBLIC)
76
+ supported_languages = ("en_MO", "en_US", "pt_MO", "th", "zh_CN", "zh_MO")
77
+ # Decreto-Lei n.º 4/82/M.
78
+ start_year = 1982
79
+
80
+ def __init__(self, *args, **kwargs):
81
+ ChineseCalendarHolidays.__init__(self)
82
+ ChristianHolidays.__init__(self)
83
+ InternationalHolidays.__init__(self)
84
+ StaticHolidays.__init__(self, MacauStaticHolidays)
85
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
86
+ # Systemic in-lieus starts in 2011.
87
+ kwargs.setdefault("observed_since", 2011)
88
+ super().__init__(*args, **kwargs)
89
+
90
+ def _populate_public_holidays(self):
91
+ # New Year's Day.
92
+ self._add_new_years_day(tr("元旦"))
93
+
94
+ # Chinese New Year's Day.
95
+ self._add_chinese_new_years_day(tr("農曆正月初一"))
96
+
97
+ # The second day of Chinese New Year.
98
+ self._add_chinese_new_years_day_two(tr("農曆正月初二"))
99
+
100
+ # The third day of Chinese New Year.
101
+ self._add_chinese_new_years_day_three(tr("農曆正月初三"))
102
+
103
+ # Tomb-Sweeping Day.
104
+ self._add_qingming_festival(tr("清明節"))
105
+
106
+ # Regulamento Administrativo n.º 4/1999 - Name changed in Chinese for Good Friday.
107
+ name = (
108
+ # Good Friday.
109
+ tr("耶穌受難日")
110
+ if self._year >= 2000
111
+ # Good Friday.
112
+ else tr("聖周星期五")
113
+ )
114
+ self._add_good_friday(name)
115
+
116
+ # Regulamento Administrativo n.º 4/1999 - Name changed to The Day before Easter.
117
+ name = (
118
+ # The Day before Easter.
119
+ tr("復活節前日")
120
+ if self._year >= 2000
121
+ # Holy Saturday.
122
+ else tr("聖周星期六")
123
+ )
124
+ self._add_holy_saturday(name)
125
+
126
+ # Labor Day.
127
+ self._add_labor_day(tr("勞動節"))
128
+
129
+ # Dragon Boat Festival.
130
+ self._add_dragon_boat_festival(tr("端午節"))
131
+
132
+ # Double Ninth Festival.
133
+ self._add_double_ninth_festival(tr("重陽節"))
134
+
135
+ # The Day following Mid-Autumn Festival.
136
+ self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
137
+
138
+ # National Day of the People's Republic of China.
139
+ self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
140
+
141
+ # All Soul's Day.
142
+ self._add_all_souls_day(tr("追思節"))
143
+
144
+ # Immaculate Conception.
145
+ self._add_immaculate_conception_day(tr("聖母無原罪瞻禮"))
146
+
147
+ # Regulamento Administrativo n.º 4/1999 - Moved from DEC 22 to DEC 21.
148
+ # Ordem Executiva n.º 60/2000 - Switched to Movable.
149
+
150
+ # Winter Solstice.
151
+ name = tr("冬至")
152
+ if self._year >= 2001:
153
+ self._add_dongzhi_festival(name)
154
+ elif self._year == 2000:
155
+ self._add_holiday_dec_21(name)
156
+ else:
157
+ self._add_holiday_dec_22(name)
158
+
159
+ # Portaria n.º 242/98/M - Name changed in Chinese for Christmas Eve.
160
+ # Regulamento Administrativo n.º 4/1999 - Further Chinese name standardization.
161
+ if self._year >= 2000:
162
+ # Christmas Eve.
163
+ name = tr("聖誕節前日")
164
+ elif self._year == 1999:
165
+ # Christmas Eve.
166
+ name = tr("聖誕節前夕")
167
+ else:
168
+ # Christmas Eve.
169
+ name = tr("聖誕前夕")
170
+ self._add_christmas_eve(name)
171
+
172
+ # Portaria n.º 242/98/M - Name changed in Chinese for Christmas Day.
173
+ name = (
174
+ # Christmas Day.
175
+ tr("聖誕節")
176
+ if self._year >= 1999
177
+ # Christmas Day.
178
+ else tr("聖誕")
179
+ )
180
+ self._add_christmas_day(name)
181
+
182
+ # Decreto-Lei n.º 38/87/M - Removed Assumption Day and All Saints' Day as Public Holiday.
183
+ if self._year <= 1986:
184
+ # Assumption Day.
185
+ self._add_assumption_of_mary_day(tr("聖母升天"))
186
+
187
+ # All Saints' Day.
188
+ self._add_all_saints_day(tr("諸聖節"))
189
+
190
+ # Decreto-Lei n.º 38/87/M - Removed Corpus Christi as Public Holiday.
191
+ if self._year <= 1987:
192
+ # Corpus Christi.
193
+ self._add_corpus_christi_day(tr("基督聖體聖血節"))
194
+
195
+ # Portaria n.º 242/98/M - De Facto adds Macao S.A.R. Establishment Day on DEC 20 for 1999.
196
+ # Regulamento Administrativo n.º 5/1999 - Special Name for 1999 (see StaticHolidays).
197
+ # Ordem Executiva n.º 60/2000 - Removed all Portugal-derived holidays.
198
+ # - Adds The Buddha's Birthday.
199
+ # - Adds The day following National Day of the PRC on OCT 2.
200
+ # - Adds "Anniversary of " to Macao S.A.R. holiday in Chinese.
201
+ if self._year <= 1999:
202
+ # Freedom Day.
203
+ self._add_holiday_apr_25(tr("自由日"))
204
+
205
+ # Day of Portugal, Camões, and the Portuguese Communities.
206
+ self._add_holiday_jun_10(tr("葡國日、賈梅士日暨葡僑日"))
207
+
208
+ # Republic Day.
209
+ self._add_holiday_oct_5(tr("葡萄牙共和國國慶日"))
210
+
211
+ # Restoration of Independence Day.
212
+ self._add_holiday_dec_1(tr("恢復獨立紀念日"))
213
+ else:
214
+ # The Buddha's Birthday.
215
+ self._add_chinese_birthday_of_buddha(tr("佛誕節"))
216
+
217
+ # The day following National Day of the People's Republic of China.
218
+ self._add_holiday_oct_2(tr("中華人民共和國國慶日翌日"))
219
+
220
+ # Macao S.A.R. Establishment Day.
221
+ self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
222
+
223
+ def _populate_mandatory_holidays(self):
224
+ """
225
+ Decreto-Lei n.º 101/84/M - Earliest Available Version Online.
226
+ Decreto-Lei n.º 24/89/M - Added Ching Ming Festival.
227
+ Lei n.º 8/2000 - Removed Day of Portugal
228
+ - Added Macao S.A.R. Establishment Day.
229
+ - Moved Mid-Autumn to Day following Mid-Autumn to match Public Holidays.
230
+ Lei n.º 7/2008 - Consolidated with other laws, reaffirming 2000 Amendment list.
231
+ """
232
+ if self._year <= 1984:
233
+ return None
234
+
235
+ # New Year's Day.
236
+ self._add_new_years_day(tr("元旦"))
237
+
238
+ # Chinese New Year's Day.
239
+ self._add_chinese_new_years_day(tr("農曆正月初一"))
240
+
241
+ # The second day of Chinese New Year.
242
+ self._add_chinese_new_years_day_two(tr("農曆正月初二"))
243
+
244
+ # The third day of Chinese New Year.
245
+ self._add_chinese_new_years_day_three(tr("農曆正月初三"))
246
+
247
+ # Labor Day.
248
+ self._add_labor_day(tr("勞動節"))
249
+
250
+ # Double Ninth Festival.
251
+ self._add_double_ninth_festival(tr("重陽節"))
252
+
253
+ # National Day of the People's Republic of China.
254
+ self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
255
+
256
+ # Decreto-Lei n.º 24/89/M - Adds Ching Ming as a Mandatory Holiday.
257
+ if self._year >= 1989:
258
+ # Tomb-Sweeping Day.
259
+ self._add_qingming_festival(tr("清明節"))
260
+
261
+ # Lei n.º 8/2000 - Removed Day of Portugal as a Mandatory Holiday.
262
+ # - Changed observance from Mid-Autumn to the following day.
263
+ # - Adds Macao S.A.R. Establishment Day as a Mandatory Holiday.
264
+ if self._year <= 1999:
265
+ # Day of Portugal, Camões, and the Portuguese Communities.
266
+ self._add_holiday_jun_10(tr("葡國日、賈梅士日暨葡僑日"))
267
+
268
+ # Mid-Autumn Festival.
269
+ self._add_mid_autumn_festival(tr("中秋節"))
270
+
271
+ else:
272
+ # The Day following Mid-Autumn Festival.
273
+ self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
274
+
275
+ # Macao S.A.R. Establishment Day.
276
+ self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
277
+
278
+ def _populate_government_holidays(self):
279
+ # While Cross-Checking References are available for from 2005-2025,
280
+ # SUN in-lieus starts in 2011; SAT-SUN in-lieus starts in 2012.
281
+ if self._year <= 2004:
282
+ return None
283
+
284
+ dts_observed = set()
285
+
286
+ # %s (Afternoon).
287
+ begin_time_label = self.tr("%s(下午)")
288
+
289
+ # New Year's Day.
290
+ dts_observed.add(self._add_new_years_day(tr("元旦")))
291
+
292
+ if self._year not in {2006, 2007, 2009, 2010, 2012, 2013, 2016, 2023}:
293
+ # Chinese New Year's Eve.
294
+ self._add_chinese_new_years_eve(begin_time_label % self.tr("農曆除夕"))
295
+
296
+ if self._year in {2006, 2007, 2010, 2013, 2014, 2017, 2018}:
297
+ # The fourth day of Chinese New Year.
298
+ self._add_chinese_new_years_day_four(tr("農曆正月初四"))
299
+
300
+ if self._year in {2014, 2015, 2017, 2018}:
301
+ # The fifth day of Chinese New Year.
302
+ self._add_chinese_new_years_day_five(tr("農曆正月初五"))
303
+
304
+ if self._year >= 2019:
305
+ # Chinese New Year's Day.
306
+ dts_observed.add(self._add_chinese_new_years_day(tr("農曆正月初一")))
307
+
308
+ # The second day of Chinese New Year.
309
+ dts_observed.add(self._add_chinese_new_years_day_two(tr("農曆正月初二")))
310
+
311
+ # The third day of Chinese New Year.
312
+ dts_observed.add(self._add_chinese_new_years_day_three(tr("農曆正月初三")))
313
+
314
+ # The Day before Easter.
315
+ dts_observed.add(self._add_holy_saturday(tr("復活節前日")))
316
+
317
+ # Tomb-Sweeping Day.
318
+ dts_observed.add(self._add_qingming_festival(tr("清明節")))
319
+
320
+ # Labor Day.
321
+ dts_observed.add(self._add_labor_day(tr("勞動節")))
322
+
323
+ # The Buddha's Birthday.
324
+ dts_observed.add(self._add_chinese_birthday_of_buddha(tr("佛誕節")))
325
+
326
+ # Dragon Boat Festival.
327
+ dts_observed.add(self._add_dragon_boat_festival(tr("端午節")))
328
+
329
+ # The Day following Mid-Autumn Festival.
330
+ dts_observed.add(self._add_mid_autumn_festival_day_two(tr("中秋節翌日")))
331
+
332
+ # Double Ninth Festival.
333
+ dts_observed.add(self._add_double_ninth_festival(tr("重陽節")))
334
+
335
+ # National Day of the People's Republic of China.
336
+ dts_observed.add(self._add_holiday_oct_1(tr("中華人民共和國國慶日")))
337
+
338
+ # The day following National Day of the People's Republic of China.
339
+ dts_observed.add(self._add_holiday_oct_2(tr("中華人民共和國國慶日翌日")))
340
+
341
+ # All Soul's Day.
342
+ dts_observed.add(self._add_all_souls_day(tr("追思節")))
343
+
344
+ # Immaculate Conception.
345
+ dts_observed.add(self._add_immaculate_conception_day(tr("聖母無原罪瞻禮")))
346
+
347
+ # Macao S.A.R. Establishment Day.
348
+ dts_observed.add(self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日")))
349
+
350
+ # Winter Solstice.
351
+ dts_observed.add(self._add_dongzhi_festival(tr("冬至")))
352
+
353
+ # Christmas Eve.
354
+ dts_observed.add(self._add_christmas_eve(tr("聖誕節前日")))
355
+
356
+ # Christmas Day.
357
+ dts_observed.add(self._add_christmas_day(tr("聖誕節")))
358
+
359
+ # 2012's Full-Day New Year's Eve is declared discretely.
360
+ if self._year >= 2007 and self._year not in {2011, 2012, 2016, 2017, 2022, 2023}:
361
+ # New Year's Eve.
362
+ self._add_new_years_eve(begin_time_label % self.tr("除夕"))
363
+
364
+ if self.observed:
365
+ self.observed_label = (
366
+ # Compensatory rest day for %s.
367
+ self.tr("%s的補假")
368
+ if self._year >= 2020
369
+ # The first working day after %s.
370
+ else self.tr("%s後首個工作日")
371
+ )
372
+ # Prior to 2012, in-lieus are only given for holidays which falls on Sunday.
373
+ self._observed_rule = (
374
+ SUN_TO_NEXT_WORKDAY if self._year <= 2011 else SAT_SUN_TO_NEXT_WORKDAY
375
+ )
376
+ self._populate_observed(dts_observed, multiple=True)
377
+
378
+ def _populate_subdiv_i_public_holidays(self):
379
+ # Decreto-Lei n.º 15/93/M - Moved Day of the Municipality of Ilhas from JUL 13 to NOV 30.
380
+ # Regulamento Administrativo n.º 4/1999 - Removed as a Public Holiday.
381
+ if self._year <= 1999:
382
+ # Day of the Municipality of Ilhas.
383
+ name = tr("海島市日")
384
+ if self._year <= 1992:
385
+ self._add_holiday_nov_30(name)
386
+ else:
387
+ self._add_holiday_jul_13(name)
388
+
389
+ def _populate_subdiv_m_public_holidays(self):
390
+ # Regulamento Administrativo n.º 4/1999 - Removed Macau City Day as a Public Holiday.
391
+ if self._year <= 1999:
392
+ # Macau City Day.
393
+ self._add_holiday_jun_24(tr("澳門市日"))
394
+
395
+
396
+ class MO(Macau):
397
+ pass
398
+
399
+
400
+ class MAC(Macau):
401
+ pass
402
+
403
+
404
+ class MacauStaticHolidays:
405
+ """
406
+ Special Public and Government Holidays:
407
+ - https://www.io.gov.mo/pt/legis/rec/111020
408
+ Special Mandatory Holidays.
409
+ - https://www.dsal.gov.mo/pt/standard/holiday_table.html
410
+ Cross-Checking:
411
+ - `Public Holidays for 2017–2025 <https://www.gov.mo/en/public-holidays/year-2017/>`_
412
+ - `Public Holidays for 2005-2018 <https://web.archive.org/web/20171207162948/http://portal.gov.mo/web/guest/info_detail?infoid=1887061>`_
413
+ """
414
+
415
+ # Additional Public Holiday.
416
+ name_fullday = tr("額外公眾假期")
417
+
418
+ # Additional Half-Day Public Holiday.
419
+ name_halfday = tr("額外公眾半日假")
420
+
421
+ # 70th Anniversary of the Victory of the Chinese People's War of Resistance against
422
+ # Japanese Aggression and the World Anti-Fascist War.
423
+ name_70th_war_of_resistance = tr("中國人民抗日戰爭暨世界反法西斯戰爭勝利七十周年紀念日")
424
+
425
+ # Overlapping of the Day following National Day of the People's Republic of China
426
+ # and the Day following Mid-Autumn Festival.
427
+ name_mid_autumn_festival_day_2_national_day_2_overlap = tr(
428
+ "中華人民共和國國慶日翌日及中秋節翌日重疊"
429
+ )
430
+
431
+ # Overlapping of the Day following National Day of the People's Republic of China
432
+ # and the Double Ninth Festival.
433
+ name_double_ninth_festival_national_day_2_overlap = tr("中華人民共和國國慶日翌日及重陽節重疊")
434
+
435
+ # Overlapping of the National Day of the People's Republic of China
436
+ # and the Day following Mid-Autumn Festival.
437
+ name_mid_autumn_festival_day_2_national_day_overlap = tr(
438
+ "中華人民共和國國慶日及中秋節翌日重疊"
439
+ )
440
+
441
+ # New Year's Eve.
442
+ name_new_years_eve = tr("除夕")
443
+
444
+ special_government_holidays = {
445
+ # Additional Government Holiday.
446
+ 2008: (DEC, 22, tr("額外政府假期")),
447
+ 2012: (
448
+ (OCT, 3, name_mid_autumn_festival_day_2_national_day_overlap),
449
+ (DEC, 31, name_new_years_eve),
450
+ ),
451
+ 2014: (OCT, 3, name_double_ninth_festival_national_day_2_overlap),
452
+ 2020: (OCT, 5, name_mid_autumn_festival_day_2_national_day_2_overlap),
453
+ }
454
+ special_mandatory_holidays = {
455
+ 2015: (SEP, 3, name_70th_war_of_resistance),
456
+ }
457
+ special_public_holidays = {
458
+ 1998: (
459
+ (DEC, 23, name_fullday),
460
+ (DEC, 31, name_halfday),
461
+ ),
462
+ 1999: (
463
+ (FEB, 15, name_fullday),
464
+ # The Handover of Macau to China and the Establishment of the Macau
465
+ # Special Administrative Region of the People's Republic of China.
466
+ (DEC, 20, tr("澳門回歸祖國暨中華人民共和國澳門特別行政區成立日")),
467
+ # The day following the Handover of Macau to China and the Establishment of the Macau
468
+ # Special Administrative Region of the People's Republic of China.
469
+ (DEC, 21, tr("澳門回歸祖國暨中華人民共和國澳門特別行政區成立日翌日")),
470
+ (DEC, 31, name_halfday),
471
+ ),
472
+ 2000: (FEB, 4, name_halfday),
473
+ 2015: (SEP, 3, name_70th_war_of_resistance),
474
+ }
@@ -10,6 +10,7 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from datetime import date
13
14
  from gettext import gettext as tr
14
15
 
15
16
  from holidays.calendars import (
@@ -125,8 +126,11 @@ class Malaysia(
125
126
  supported_languages = ("en_US", "ms_MY", "th")
126
127
  start_year = 1952
127
128
 
128
- def __init__(self, *args, **kwargs):
129
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
129
130
  """
131
+ :param islamic_show_estimated:
132
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
133
+
130
134
  References:
131
135
  - `Holidays Act 1951 <https://www.kabinet.gov.my/bkpp/pdf/akta_warta/1951_12_31_act369.pdf>`_
132
136
  - `Holidays Ordinance (Sabah Cap. 56) <https://sagc.sabah.gov.my/sites/default/files/law/HolidaysOrdinance.pdf>`_
@@ -139,18 +143,21 @@ class Malaysia(
139
143
  "If any day specified in the Schedule falls on Sunday then the day following shall be
140
144
  a public holiday and if such day is already a public holiday, then the day following
141
145
  shall be a public holiday".
142
- In Johor and Kedah it's Friday to Sunday, in Kelantan and Terengganu - Saturday to Sunday.
146
+ In Johor (until 1994 and in 2014-2024) and Kedah it's Friday to Sunday,
147
+ in Kelantan and Terengganu - Saturday to Sunday.
143
148
  """
144
149
  BuddhistCalendarHolidays.__init__(self, cls=MalaysiaBuddhistHolidays, show_estimated=True)
145
150
  ChineseCalendarHolidays.__init__(self, cls=MalaysiaChineseHolidays, show_estimated=True)
146
151
  ChristianHolidays.__init__(self)
147
152
  HinduCalendarHolidays.__init__(self, cls=MalaysiaHinduHolidays)
148
153
  InternationalHolidays.__init__(self)
149
- IslamicHolidays.__init__(self, cls=MalaysiaIslamicHolidays)
154
+ IslamicHolidays.__init__(
155
+ self, cls=MalaysiaIslamicHolidays, show_estimated=islamic_show_estimated
156
+ )
150
157
  StaticHolidays.__init__(self, cls=MalaysiaStaticHolidays)
151
158
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_WORKDAY)
152
159
  super().__init__(*args, **kwargs)
153
- self.dts_observed = set()
160
+ self.dts_observed: set[date] = set()
154
161
 
155
162
  def _populate_public_holidays(self):
156
163
  # This must be done for every `_populate_public_holidays()` call.
@@ -321,8 +328,14 @@ class Malaysia(
321
328
  else self._add_holiday_2nd_fri_of_oct(name)
322
329
  )
323
330
 
324
- # Beginning of Ramadan.
325
- self.dts_observed.update(self._add_ramadan_beginning_day(tr("Awal Ramadan")))
331
+ if self._year >= 2025:
332
+ self.dts_observed.update(
333
+ # Eid al-Fitr (Third Day).
334
+ self._add_eid_al_fitr_day_three(tr("Hari Raya Puasa (Hari Ketiga)"))
335
+ )
336
+ else:
337
+ # Beginning of Ramadan.
338
+ self.dts_observed.update(self._add_ramadan_beginning_day(tr("Awal Ramadan")))
326
339
 
327
340
  def _populate_subdiv_05_public_holidays(self):
328
341
  # New Year's Day.
@@ -589,6 +602,7 @@ class MalaysiaBuddhistHolidays(_CustomBuddhistHolidays):
589
602
  2022: (MAY, 15),
590
603
  2023: (MAY, 4),
591
604
  2024: (MAY, 22),
605
+ 2025: (MAY, 12),
592
606
  }
593
607
 
594
608
 
@@ -618,6 +632,7 @@ class MalaysiaChineseHolidays(_CustomChineseHolidays):
618
632
  2022: (FEB, 1),
619
633
  2023: (JAN, 22),
620
634
  2024: (FEB, 10),
635
+ 2025: (JAN, 29),
621
636
  }
622
637
 
623
638
 
@@ -647,6 +662,7 @@ class MalaysiaHinduHolidays(_CustomHinduHolidays):
647
662
  2022: (OCT, 24),
648
663
  2023: (NOV, 12),
649
664
  2024: (OCT, 31),
665
+ 2025: (OCT, 20),
650
666
  }
651
667
 
652
668
  THAIPUSAM_DATES = {
@@ -689,6 +705,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
689
705
  2022: (JUL, 10),
690
706
  2023: (JUN, 29),
691
707
  2024: (JUN, 17),
708
+ 2025: (JUN, 7),
692
709
  }
693
710
 
694
711
  EID_AL_FITR_DATES = {
@@ -716,6 +733,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
716
733
  2022: (MAY, 2),
717
734
  2023: (APR, 22),
718
735
  2024: (APR, 10),
736
+ 2025: (MAR, 31),
719
737
  }
720
738
 
721
739
  HARI_HOL_JOHOR_DATES = {
@@ -733,6 +751,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
733
751
  2022: (SEP, 3),
734
752
  2023: (AUG, 23),
735
753
  2024: (AUG, 11),
754
+ 2025: (JUL, 31),
736
755
  }
737
756
 
738
757
  HIJRI_NEW_YEAR_DATES = {
@@ -760,6 +779,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
760
779
  2022: (JUL, 30),
761
780
  2023: (JUL, 19),
762
781
  2024: (JUL, 7),
782
+ 2025: (JUN, 27),
763
783
  }
764
784
 
765
785
  ISRA_AND_MIRAJ_DATES = {
@@ -787,6 +807,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
787
807
  2022: (MAR, 1),
788
808
  2023: (FEB, 18),
789
809
  2024: (FEB, 8),
810
+ 2025: (JAN, 27),
790
811
  }
791
812
 
792
813
  MAWLID_DATES = {
@@ -814,6 +835,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
814
835
  2022: (OCT, 10),
815
836
  2023: (SEP, 28),
816
837
  2024: (SEP, 16),
838
+ 2025: (SEP, 5),
817
839
  }
818
840
 
819
841
  NUZUL_AL_QURAN_DATES = {
@@ -841,6 +863,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
841
863
  2022: (APR, 19),
842
864
  2023: (APR, 8),
843
865
  2024: (MAR, 28),
866
+ 2025: (MAR, 18),
844
867
  }
845
868
 
846
869
  RAMADAN_BEGINNING_DATES = {
@@ -868,6 +891,7 @@ class MalaysiaIslamicHolidays(_CustomIslamicHolidays):
868
891
  2022: (APR, 3),
869
892
  2023: (MAR, 23),
870
893
  2024: (MAR, 12),
894
+ 2025: (MAR, 2),
871
895
  }
872
896
 
873
897
 
@@ -26,9 +26,13 @@ class Maldives(HolidayBase, InternationalHolidays, IslamicHolidays):
26
26
  country = "MV"
27
27
  weekend = {FRI, SAT}
28
28
 
29
- def __init__(self, *args, **kwargs):
29
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
30
+ """
31
+ :param islamic_show_estimated:
32
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
33
+ """
30
34
  InternationalHolidays.__init__(self)
31
- IslamicHolidays.__init__(self)
35
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
32
36
  super().__init__(*args, **kwargs)
33
37
 
34
38
  def _populate_public_holidays(self):
@@ -25,9 +25,13 @@ class Mauritania(HolidayBase, InternationalHolidays, IslamicHolidays):
25
25
  country = "MR"
26
26
  weekend = {FRI, SAT}
27
27
 
28
- def __init__(self, *args, **kwargs):
28
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
29
+ """
30
+ :param islamic_show_estimated:
31
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
32
+ """
29
33
  InternationalHolidays.__init__(self)
30
- IslamicHolidays.__init__(self)
34
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
31
35
  super().__init__(*args, **kwargs)
32
36
 
33
37
  def _populate(self, year):
@@ -53,11 +53,17 @@ class Montenegro(
53
53
  supported_categories = (CATHOLIC, ISLAMIC, HEBREW, ORTHODOX, PUBLIC, WORKDAY)
54
54
  start_year = 2007
55
55
 
56
- def __init__(self, *args, **kwargs):
56
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
57
+ """
58
+ :param islamic_show_estimated:
59
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
60
+ """
57
61
  ChristianHolidays.__init__(self, calendar=JULIAN_CALENDAR)
58
62
  HebrewCalendarHolidays.__init__(self)
59
63
  InternationalHolidays.__init__(self)
60
- IslamicHolidays.__init__(self, cls=MontenegroIslamicHolidays)
64
+ IslamicHolidays.__init__(
65
+ self, cls=MontenegroIslamicHolidays, show_estimated=islamic_show_estimated
66
+ )
61
67
  StaticHolidays.__init__(self, cls=MontenegroStaticHolidays)
62
68
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
63
69
  super().__init__(*args, **kwargs)
@@ -31,9 +31,13 @@ class Morocco(HolidayBase, InternationalHolidays, IslamicHolidays):
31
31
  estimated_label = tr("(تقدير) %s")
32
32
  supported_languages = ("ar", "en_US", "fr")
33
33
 
34
- def __init__(self, *args, **kwargs):
34
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
35
+ """
36
+ :param islamic_show_estimated:
37
+ Whether to add "estimated" label to Islamic holidays name if holiday date is estimated.
38
+ """
35
39
  InternationalHolidays.__init__(self)
36
- IslamicHolidays.__init__(self)
40
+ IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
37
41
  super().__init__(*args, **kwargs)
38
42
 
39
43
  def _populate_public_holidays(self):