holidays 0.87__py3-none-any.whl → 0.88__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 (54) hide show
  1. holidays/constants.py +1 -0
  2. holidays/countries/american_samoa.py +2 -0
  3. holidays/countries/belarus.py +4 -2
  4. holidays/countries/brazil.py +27 -1
  5. holidays/countries/chile.py +2 -3
  6. holidays/countries/guam.py +2 -0
  7. holidays/countries/macau.py +39 -45
  8. holidays/countries/malaysia.py +171 -71
  9. holidays/countries/new_zealand.py +4 -3
  10. holidays/countries/northern_mariana_islands.py +2 -0
  11. holidays/countries/puerto_rico.py +4 -2
  12. holidays/countries/sweden.py +35 -11
  13. holidays/countries/taiwan.py +6 -5
  14. holidays/countries/turks_and_caicos_islands.py +13 -3
  15. holidays/countries/united_states.py +400 -108
  16. holidays/countries/united_states_minor_outlying_islands.py +2 -0
  17. holidays/countries/united_states_virgin_islands.py +2 -0
  18. holidays/countries/uzbekistan.py +12 -1
  19. holidays/countries/venezuela.py +113 -23
  20. holidays/financial/__init__.py +1 -0
  21. holidays/financial/bombay_stock_exchange.py +33 -0
  22. holidays/financial/national_stock_exchange_of_india.py +1 -1
  23. holidays/holiday_base.py +2 -1
  24. holidays/locale/en_IN/LC_MESSAGES/XBOM.mo +0 -0
  25. holidays/locale/en_TC/LC_MESSAGES/TC.mo +0 -0
  26. holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
  27. holidays/locale/en_US/LC_MESSAGES/MY.mo +0 -0
  28. holidays/locale/en_US/LC_MESSAGES/SE.mo +0 -0
  29. holidays/locale/en_US/LC_MESSAGES/TC.mo +0 -0
  30. holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
  31. holidays/locale/en_US/LC_MESSAGES/VE.mo +0 -0
  32. holidays/locale/en_US/LC_MESSAGES/XBOM.mo +0 -0
  33. holidays/locale/es/LC_MESSAGES/VE.mo +0 -0
  34. holidays/locale/gu/LC_MESSAGES/XBOM.mo +0 -0
  35. holidays/locale/gu/LC_MESSAGES/XNSE.mo +0 -0
  36. holidays/locale/hi/LC_MESSAGES/XBOM.mo +0 -0
  37. holidays/locale/ms_MY/LC_MESSAGES/MY.mo +0 -0
  38. holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
  39. holidays/locale/sv/LC_MESSAGES/SE.mo +0 -0
  40. holidays/locale/th/LC_MESSAGES/MY.mo +0 -0
  41. holidays/locale/th/LC_MESSAGES/SE.mo +0 -0
  42. holidays/locale/th/LC_MESSAGES/US.mo +0 -0
  43. holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
  44. holidays/locale/uk/LC_MESSAGES/SE.mo +0 -0
  45. holidays/locale/uk/LC_MESSAGES/VE.mo +0 -0
  46. holidays/registry.py +1 -0
  47. holidays/utils.py +52 -0
  48. holidays/version.py +3 -1
  49. {holidays-0.87.dist-info → holidays-0.88.dist-info}/METADATA +18 -11
  50. {holidays-0.87.dist-info → holidays-0.88.dist-info}/RECORD +54 -48
  51. {holidays-0.87.dist-info → holidays-0.88.dist-info}/licenses/CONTRIBUTORS +5 -0
  52. {holidays-0.87.dist-info → holidays-0.88.dist-info}/WHEEL +0 -0
  53. {holidays-0.87.dist-info → holidays-0.88.dist-info}/licenses/LICENSE +0 -0
  54. {holidays-0.87.dist-info → holidays-0.88.dist-info}/top_level.txt +0 -0
holidays/constants.py CHANGED
@@ -38,6 +38,7 @@ HOLIDAY_NAME_DELIMITER = "; " # Holiday names separator.
38
38
  # Supported holiday categories.
39
39
  ARMED_FORCES = "armed_forces"
40
40
  BANK = "bank"
41
+ DE_FACTO = "de_facto"
41
42
  GOVERNMENT = "government"
42
43
  HALF_DAY = "half_day"
43
44
  OPTIONAL = "optional"
@@ -10,6 +10,7 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from holidays.constants import PUBLIC, UNOFFICIAL
13
14
  from holidays.countries.united_states import UnitedStates
14
15
  from holidays.mixins.child_entity import ChildEntity
15
16
 
@@ -25,6 +26,7 @@ class AmericanSamoa(ChildEntity, UnitedStates):
25
26
  parent_entity = UnitedStates
26
27
  # Became a U.S. Territory since April 17th, 1900.
27
28
  start_year = 1901
29
+ supported_categories = (PUBLIC, UNOFFICIAL)
28
30
 
29
31
 
30
32
  class HolidaysAS(AmericanSamoa):
@@ -148,8 +148,9 @@ class BelarusStaticHolidays:
148
148
  """Belarus special holidays.
149
149
 
150
150
  References:
151
- * <https://web.archive.org/web/20241005054448/https://belarusbank.by/en/financial-institutions/11151>
152
- * <https://web.archive.org/web/20241210150222/https://belarusbank.by/en/financial-institutions/11160>
151
+ * [2024](https://web.archive.org/web/20241005054448/https://belarusbank.by/en/financial-institutions/11151)
152
+ * [2025](https://web.archive.org/web/20241210150222/https://belarusbank.by/en/financial-institutions/11160)
153
+ * [2026](https://web.archive.org/web/20251230174418/https://belarusbank.by/en/financial-institutions/11163)
153
154
  """
154
155
 
155
156
  # Date format (see strftime() Format Codes)
@@ -300,4 +301,5 @@ class BelarusStaticHolidays:
300
301
  (JUL, 4, JUL, 12),
301
302
  (DEC, 26, DEC, 20),
302
303
  ),
304
+ 2026: (APR, 20, APR, 25),
303
305
  }
@@ -28,6 +28,8 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
28
28
  * [Decreto n. 19.488, de 15.12.1930](https://web.archive.org/web/20241006041503/http://camara.leg.br/legin/fed/decret/1930-1939/decreto-19488-15-dezembro-1930-508040-republicacao-85201-pe.html)
29
29
  * [Lei n. 662, de 6.04.1949](https://web.archive.org/web/20240913060643/https://www2.camara.leg.br/legin/fed/lei/1940-1949/lei-662-6-abril-1949-347136-publicacaooriginal-1-pl.html)
30
30
  * [Lei n. 14.759, de 21.12.2023](https://web.archive.org/web/20250402234552/https://www2.camara.leg.br/legin/fed/lei/2023/lei-14759-21-dezembro-2023-795091-publicacaooriginal-170522-pl.html)
31
+ * São Paulo Capital:
32
+ * [Anexo Único Integrante do Decreto n. 56.756, de 4.01.2016](https://web.archive.org/web/20251224031221/https://legislacao.prefeitura.sp.gov.br/leis/decreto-56756-de-04-de-janeiro-de-2016/anexo/5ec3d7a71411926001a56c56/Anexo%20Único%20do%20Decreto%20nº%2056.756_2016.pdf)
31
33
  """
32
34
 
33
35
  country = "BR"
@@ -62,6 +64,8 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
62
64
  "SE",
63
65
  "SP",
64
66
  "TO",
67
+ # Cities.
68
+ "São Paulo Capital",
65
69
  )
66
70
  subdivisions_aliases = {
67
71
  "Acre": "AC",
@@ -155,6 +159,9 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
155
159
  # Christmas Day.
156
160
  self._add_christmas_day(tr("Natal"))
157
161
 
162
+ if self.subdiv == "São Paulo Capital":
163
+ self._populate_subdiv_sao_paulo_capital_public_holidays()
164
+
158
165
  def _populate_optional_holidays(self):
159
166
  # Carnival.
160
167
  name = tr("Carnaval")
@@ -178,7 +185,8 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
178
185
 
179
186
  def _populate_subdiv_holidays(self):
180
187
  # Lei n. 9.093, de 12.09.1995
181
- if self._year >= 1996:
188
+ # Lei Municipal n. 7.008, de 6.04.1967
189
+ if self._year >= 1996 or self.subdiv == "São Paulo Capital":
182
190
  super()._populate_subdiv_holidays()
183
191
 
184
192
  def _populate_subdiv_ac_public_holidays(self):
@@ -224,6 +232,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
224
232
  self._add_holiday_nov_20(tr("Consciência Negra"))
225
233
 
226
234
  if self._year >= 2013:
235
+ # Evangelical Day.
227
236
  self._add_holiday_nov_30(tr("Dia do Evangélico"))
228
237
 
229
238
  def _populate_subdiv_am_public_holidays(self):
@@ -231,6 +240,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
231
240
  self._add_holiday_sep_5(tr("Elevação do Amazonas à categoria de província"))
232
241
 
233
242
  if 2010 <= self._year <= 2023:
243
+ # Black Awareness Day.
234
244
  self._add_holiday_nov_20(tr("Consciência Negra"))
235
245
 
236
246
  def _populate_subdiv_ap_public_holidays(self):
@@ -246,6 +256,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
246
256
  self._add_holiday_sep_13(tr("Criação do Território Federal"))
247
257
 
248
258
  if 2008 <= self._year <= 2023:
259
+ # Black Awareness Day.
249
260
  self._add_holiday_nov_20(tr("Consciência Negra"))
250
261
 
251
262
  def _populate_subdiv_ba_public_holidays(self):
@@ -266,6 +277,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
266
277
  # Founding of Brasilia.
267
278
  self._add_holiday_apr_21(tr("Fundação de Brasília"))
268
279
 
280
+ # Evangelical Day.
269
281
  self._add_holiday_nov_30(tr("Dia do Evangélico"))
270
282
 
271
283
  def _populate_subdiv_es_public_holidays(self):
@@ -294,6 +306,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
294
306
 
295
307
  def _populate_subdiv_mt_public_holidays(self):
296
308
  if 2003 <= self._year <= 2023:
309
+ # Black Awareness Day.
297
310
  self._add_holiday_nov_20(tr("Consciência Negra"))
298
311
 
299
312
  def _populate_subdiv_pa_public_holidays(self):
@@ -323,6 +336,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
323
336
  self._add_saint_georges_day(tr("São Jorge"))
324
337
 
325
338
  if 2002 <= self._year <= 2023:
339
+ # Black Awareness Day.
326
340
  self._add_holiday_nov_20(tr("Consciência Negra"))
327
341
 
328
342
  def _populate_subdiv_rn_public_holidays(self):
@@ -335,12 +349,15 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
335
349
  self._add_holiday_oct_3(tr("Mártires de Cunhaú e Uruaçu"))
336
350
 
337
351
  def _populate_subdiv_ro_public_holidays(self):
352
+ # State Creation Day.
338
353
  self._add_holiday_jan_4(tr("Criação do Estado"))
339
354
 
340
355
  if self._year >= 2002:
356
+ # Evangelical Day.
341
357
  self._add_holiday_jun_18(tr("Dia do Evangélico"))
342
358
 
343
359
  def _populate_subdiv_rr_public_holidays(self):
360
+ # State Creation Day.
344
361
  self._add_holiday_oct_5(tr("Criação do Estado"))
345
362
 
346
363
  def _populate_subdiv_rs_public_holidays(self):
@@ -372,6 +389,14 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
372
389
  # Constitutionalist Revolution.
373
390
  self._add_holiday_jul_9(tr("Revolução Constitucionalista"))
374
391
 
392
+ def _populate_subdiv_sao_paulo_capital_public_holidays(self):
393
+ self._populate_subdiv_sp_public_holidays()
394
+
395
+ # Lei Municipal n. 7.008, de 6.04.1967
396
+ if self._year >= 1968:
397
+ # São Paulo City Anniversary.
398
+ self._add_holiday_jan_25(tr("Aniversário da Cidade de São Paulo"))
399
+
375
400
  def _populate_subdiv_to_public_holidays(self):
376
401
  if self._year >= 1998:
377
402
  # Autonomy Day.
@@ -380,6 +405,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
380
405
  # Our Lady of Nativity.
381
406
  self._add_nativity_of_mary_day(tr("Nossa Senhora da Natividade"))
382
407
 
408
+ # State Creation Day.
383
409
  self._add_holiday_oct_5(tr("Criação do Estado"))
384
410
 
385
411
 
@@ -60,8 +60,7 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
60
60
  * [Law 19.973 (Sep 17, 2004 holiday)](https://web.archive.org/web/20250812023003/https://www.bcn.cl/leychile/navegar?idLey=19973)
61
61
  * [Law 20.450 (Sep 17, 2010 and Sep 20, 2010 holidays)](https://web.archive.org/web/20250812023308/https://www.bcn.cl/leychile/navegar?idLey=20450)
62
62
  * [Law 21.521 (eliminate Dec 31 again, after the CMF publishes a specific regulation)](https://web.archive.org/web/20240214154900/https://www.bcn.cl/leychile/navegar?idNorma=1187323&idVersion=2023-02-03)
63
- * [Norma de Carácter General 543 de la CMF](https://web.archive.org/web/20250811111649/https://www.cmfchile.cl/normativa/ncg_543_2025.pdf)
64
- * [Resolución Exenta N° 7.671 (CMF, 2025-08-01)](https://web.archive.org/web/20250811123908/https://www.cmfchile.cl/sitio/aplic/serdoc/ver_sgd.php?s567=ba5ad42feea3531a678a9db5253a9477VFdwQmVVNVVRVFJOUkZWNlRucEpORTVCUFQwPQ==&secuencia=-1&t=1754086087)
63
+ * [Law 21.791 (restore bank holiday on Dec 31)](https://web.archive.org/web/20251219021727/https://www.bcn.cl/leychile/navegar?idNorma=1219578&idVersion=2025-12-17)
65
64
  """
66
65
 
67
66
  country = "CL"
@@ -244,7 +243,7 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
244
243
  if 1957 <= self._year <= 1975:
245
244
  self._add_holiday_jun_30(name)
246
245
 
247
- if 1956 <= self._year <= 2024 and self._year != 1997:
246
+ if 1956 <= self._year and self._year != 1997:
248
247
  self._add_holiday_dec_31(name)
249
248
 
250
249
  @property
@@ -10,6 +10,7 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from holidays.constants import PUBLIC, UNOFFICIAL
13
14
  from holidays.countries.united_states import UnitedStates
14
15
  from holidays.mixins.child_entity import ChildEntity
15
16
 
@@ -25,6 +26,7 @@ class Guam(ChildEntity, UnitedStates):
25
26
  parent_entity = UnitedStates
26
27
  # Became a U.S. Territory on April 11th, 1899.
27
28
  start_year = 1900
29
+ supported_categories = (PUBLIC, UNOFFICIAL)
28
30
 
29
31
 
30
32
  class HolidaysGU(Guam):
@@ -24,6 +24,8 @@ from holidays.observed_holiday_base import (
24
24
  ObservedHolidayBase,
25
25
  SUN_TO_NEXT_WORKDAY,
26
26
  SAT_SUN_TO_NEXT_WORKDAY,
27
+ SAT_TO_NONE,
28
+ SUN_TO_NONE,
27
29
  )
28
30
 
29
31
 
@@ -92,19 +94,7 @@ class Macau(
92
94
  kwargs.setdefault("observed_since", 2011)
93
95
  super().__init__(*args, **kwargs)
94
96
 
95
- def _populate_public_holidays(self):
96
- """Macau Mandatory (Statutory) Holidays.
97
-
98
- Decreto-Lei n.º 101/84/M - Earliest Available Version Online.
99
- Decreto-Lei n.º 24/89/M - Added Ching Ming Festival.
100
- Lei n.º 8/2000 - Removed Day of Portugal
101
- - Added Macao S.A.R. Establishment Day.
102
- - Moved Mid-Autumn to Day following Mid-Autumn to match Public Holidays.
103
- Lei n.º 7/2008 - Consolidated with other laws, reaffirming 2000 Amendment list.
104
- """
105
- if self._year <= 1984:
106
- return None
107
-
97
+ def _populate_common(self):
108
98
  # New Year's Day.
109
99
  self._add_new_years_day(tr("元旦"))
110
100
 
@@ -126,6 +116,21 @@ class Macau(
126
116
  # National Day of the People's Republic of China.
127
117
  self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
128
118
 
119
+ def _populate_public_holidays(self):
120
+ """Macau Mandatory (Statutory) Holidays.
121
+
122
+ Decreto-Lei n.º 101/84/M - Earliest Available Version Online.
123
+ Decreto-Lei n.º 24/89/M - Added Ching Ming Festival.
124
+ Lei n.º 8/2000 - Removed Day of Portugal
125
+ - Added Macao S.A.R. Establishment Day.
126
+ - Moved Mid-Autumn to Day following Mid-Autumn to match Public Holidays.
127
+ Lei n.º 7/2008 - Consolidated with other laws, reaffirming 2000 Amendment list.
128
+ """
129
+ if self._year <= 1984:
130
+ return None
131
+
132
+ self._populate_common()
133
+
129
134
  # Decreto-Lei n.º 24/89/M - Adds Ching Ming as a Mandatory Holiday.
130
135
  if self._year >= 1989:
131
136
  # Tomb-Sweeping Day.
@@ -150,17 +155,7 @@ class Macau(
150
155
 
151
156
  def _populate_optional_holidays(self):
152
157
  """Macau General Holidays."""
153
- # New Year's Day.
154
- self._add_new_years_day(tr("元旦"))
155
-
156
- # Chinese New Year's Day.
157
- self._add_chinese_new_years_day(tr("農曆正月初一"))
158
-
159
- # The second day of Chinese New Year.
160
- self._add_chinese_new_years_day_two(tr("農曆正月初二"))
161
-
162
- # The third day of Chinese New Year.
163
- self._add_chinese_new_years_day_three(tr("農曆正月初三"))
158
+ self._populate_common()
164
159
 
165
160
  # Tomb-Sweeping Day.
166
161
  self._add_qingming_festival(tr("清明節"))
@@ -183,21 +178,12 @@ class Macau(
183
178
  else tr("聖周星期六")
184
179
  )
185
180
 
186
- # Labor Day.
187
- self._add_labor_day(tr("勞動節"))
188
-
189
181
  # Dragon Boat Festival.
190
182
  self._add_dragon_boat_festival(tr("端午節"))
191
183
 
192
- # Double Ninth Festival.
193
- self._add_double_ninth_festival(tr("重陽節"))
194
-
195
184
  # The Day following Mid-Autumn Festival.
196
185
  self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
197
186
 
198
- # National Day of the People's Republic of China.
199
- self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
200
-
201
187
  # All Soul's Day.
202
188
  self._add_all_souls_day(tr("追思節"))
203
189
 
@@ -293,18 +279,12 @@ class Macau(
293
279
  # New Year's Day.
294
280
  dts_observed.add(self._add_new_years_day(tr("元旦")))
295
281
 
296
- if self._year not in {2006, 2007, 2009, 2010, 2012, 2013, 2016, 2023}:
282
+ if not (
283
+ self._is_sunday(self._chinese_new_year) or self._is_monday(self._chinese_new_year)
284
+ ):
297
285
  # Chinese New Year's Eve.
298
286
  self._add_chinese_new_years_eve(begin_time_label % self.tr("農曆除夕"))
299
287
 
300
- if self._year in {2006, 2007, 2010, 2013, 2014, 2017, 2018}:
301
- # The fourth day of Chinese New Year.
302
- self._add_chinese_new_years_day_four(tr("農曆正月初四"))
303
-
304
- if self._year in {2014, 2015, 2017, 2018}:
305
- # The fifth day of Chinese New Year.
306
- self._add_chinese_new_years_day_five(tr("農曆正月初五"))
307
-
308
288
  if self._year >= 2019:
309
289
  # Chinese New Year's Day.
310
290
  dts_observed.add(self._add_chinese_new_years_day(tr("農曆正月初一")))
@@ -314,6 +294,17 @@ class Macau(
314
294
 
315
295
  # The third day of Chinese New Year.
316
296
  dts_observed.add(self._add_chinese_new_years_day_three(tr("農曆正月初三")))
297
+ else:
298
+ if self._is_friday(self._chinese_new_year) or self._is_weekend(self._chinese_new_year):
299
+ # The fourth day of Chinese New Year.
300
+ self._add_chinese_new_years_day_four(tr("農曆正月初四"))
301
+ if self._year >= 2012 and (
302
+ self._is_thursday(self._chinese_new_year)
303
+ or self._is_friday(self._chinese_new_year)
304
+ or self._is_saturday(self._chinese_new_year)
305
+ ):
306
+ # The fifth day of Chinese New Year.
307
+ self._add_chinese_new_years_day_five(tr("農曆正月初五"))
317
308
 
318
309
  # The Day before Easter.
319
310
  dts_observed.add(self._add_holy_saturday(tr("復活節前日")))
@@ -361,9 +352,12 @@ class Macau(
361
352
  dts_observed.add(self._add_christmas_day(tr("聖誕節")))
362
353
 
363
354
  # 2012's Full-Day New Year's Eve is declared discretely.
364
- if self._year >= 2007 and self._year not in {2011, 2012, 2016, 2017, 2022, 2023}:
365
- # New Year's Eve.
366
- self._add_new_years_eve(begin_time_label % self.tr("除夕"))
355
+ if self._year >= 2007 and self._year != 2012:
356
+ self._move_holiday(
357
+ # New Year's Eve.
358
+ self._add_new_years_eve(begin_time_label % self.tr("除夕")),
359
+ rule=SAT_TO_NONE + SUN_TO_NONE,
360
+ )
367
361
 
368
362
  if self.observed:
369
363
  self.observed_label = (