holidays 0.82__py3-none-any.whl → 0.84__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 (113) hide show
  1. holidays/calendars/balinese_saka.py +2 -3
  2. holidays/calendars/buddhist.py +3 -4
  3. holidays/calendars/burmese.py +9 -10
  4. holidays/calendars/chinese.py +8 -9
  5. holidays/calendars/hebrew.py +10 -11
  6. holidays/calendars/hindu.py +27 -28
  7. holidays/calendars/islamic.py +26 -6
  8. holidays/calendars/mandaean.py +2 -3
  9. holidays/calendars/mongolian.py +4 -5
  10. holidays/calendars/persian.py +2 -3
  11. holidays/calendars/sinhala.py +25 -14
  12. holidays/calendars/thai.py +13 -14
  13. holidays/calendars/tibetan.py +12 -13
  14. holidays/countries/__init__.py +1 -0
  15. holidays/countries/angola.py +1 -2
  16. holidays/countries/austria.py +1 -1
  17. holidays/countries/azerbaijan.py +1 -1
  18. holidays/countries/canada.py +27 -13
  19. holidays/countries/denmark.py +18 -6
  20. holidays/countries/fiji.py +2 -3
  21. holidays/countries/finland.py +3 -6
  22. holidays/countries/guernsey.py +1 -2
  23. holidays/countries/guyana.py +24 -32
  24. holidays/countries/india.py +21 -78
  25. holidays/countries/iran.py +133 -269
  26. holidays/countries/ireland.py +1 -1
  27. holidays/countries/israel.py +1 -1
  28. holidays/countries/italy.py +2 -2
  29. holidays/countries/jersey.py +1 -2
  30. holidays/countries/macau.py +5 -8
  31. holidays/countries/malta.py +1 -1
  32. holidays/countries/mauritius.py +10 -9
  33. holidays/countries/montserrat.py +1 -1
  34. holidays/countries/myanmar.py +9 -10
  35. holidays/countries/nepal.py +11 -30
  36. holidays/countries/netherlands.py +28 -24
  37. holidays/countries/new_zealand.py +75 -31
  38. holidays/countries/nigeria.py +53 -75
  39. holidays/countries/norway.py +1 -1
  40. holidays/countries/portugal.py +6 -3
  41. holidays/countries/rwanda.py +2 -2
  42. holidays/countries/sint_maarten.py +1 -1
  43. holidays/countries/slovakia.py +23 -4
  44. holidays/countries/spain.py +418 -214
  45. holidays/countries/sri_lanka.py +58 -91
  46. holidays/countries/suriname.py +1 -2
  47. holidays/countries/sweden.py +1 -1
  48. holidays/countries/switzerland.py +86 -3
  49. holidays/countries/taiwan.py +3 -3
  50. holidays/countries/tanzania.py +19 -29
  51. holidays/countries/thailand.py +8 -7
  52. holidays/countries/trinidad_and_tobago.py +1 -1
  53. holidays/countries/ukraine.py +1 -1
  54. holidays/countries/united_kingdom.py +2 -3
  55. holidays/countries/united_states.py +3 -4
  56. holidays/countries/western_sahara.py +92 -0
  57. holidays/groups/balinese_saka.py +2 -3
  58. holidays/groups/buddhist.py +6 -7
  59. holidays/groups/burmese.py +11 -12
  60. holidays/groups/chinese.py +23 -21
  61. holidays/groups/christian.py +30 -0
  62. holidays/groups/eastern.py +5 -4
  63. holidays/groups/hebrew.py +7 -10
  64. holidays/groups/hindu.py +45 -40
  65. holidays/groups/international.py +1 -1
  66. holidays/groups/islamic.py +10 -3
  67. holidays/groups/mandaean.py +13 -14
  68. holidays/groups/mongolian.py +12 -10
  69. holidays/groups/persian.py +14 -15
  70. holidays/groups/sinhala.py +19 -17
  71. holidays/groups/thai.py +12 -13
  72. holidays/groups/tibetan.py +21 -19
  73. holidays/holiday_base.py +54 -54
  74. holidays/ical.py +1 -2
  75. holidays/locale/ar/LC_MESSAGES/EH.mo +0 -0
  76. holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
  77. holidays/locale/de/LC_MESSAGES/CH.mo +0 -0
  78. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  79. holidays/locale/en_US/LC_MESSAGES/EH.mo +0 -0
  80. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  81. holidays/locale/en_US/LC_MESSAGES/LK.mo +0 -0
  82. holidays/locale/en_US/LC_MESSAGES/NL.mo +0 -0
  83. holidays/locale/es/LC_MESSAGES/EH.mo +0 -0
  84. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  85. holidays/locale/fr/LC_MESSAGES/CH.mo +0 -0
  86. holidays/locale/fr/LC_MESSAGES/EH.mo +0 -0
  87. holidays/locale/fy/LC_MESSAGES/NL.mo +0 -0
  88. holidays/locale/it/LC_MESSAGES/CH.mo +0 -0
  89. holidays/locale/nl/LC_MESSAGES/NL.mo +0 -0
  90. holidays/locale/si_LK/LC_MESSAGES/LK.mo +0 -0
  91. holidays/locale/ta_LK/LC_MESSAGES/LK.mo +0 -0
  92. holidays/locale/th/LC_MESSAGES/CH.mo +0 -0
  93. holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
  94. holidays/locale/th/LC_MESSAGES/DK.mo +0 -0
  95. holidays/locale/th/LC_MESSAGES/ES.mo +0 -0
  96. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  97. holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
  98. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  99. holidays/locale/th/LC_MESSAGES/NL.mo +0 -0
  100. holidays/locale/uk/LC_MESSAGES/CH.mo +0 -0
  101. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  102. holidays/locale/uk/LC_MESSAGES/NL.mo +0 -0
  103. holidays/mixins/child_entity.py +1 -3
  104. holidays/observed_holiday_base.py +25 -14
  105. holidays/registry.py +5 -3
  106. holidays/utils.py +13 -14
  107. holidays/version.py +1 -1
  108. {holidays-0.82.dist-info → holidays-0.84.dist-info}/METADATA +20 -19
  109. {holidays-0.82.dist-info → holidays-0.84.dist-info}/RECORD +113 -104
  110. {holidays-0.82.dist-info → holidays-0.84.dist-info}/WHEEL +0 -0
  111. {holidays-0.82.dist-info → holidays-0.84.dist-info}/licenses/CONTRIBUTORS +0 -0
  112. {holidays-0.82.dist-info → holidays-0.84.dist-info}/licenses/LICENSE +0 -0
  113. {holidays-0.82.dist-info → holidays-0.84.dist-info}/top_level.txt +0 -0
@@ -54,9 +54,10 @@ class SriLanka(
54
54
  References:
55
55
  * [No. 29 of 1971 (Holidays Act)](https://web.archive.org/web/20250315041521/http://www.commonlii.org/lk/legis/num_act/ha29o1971152/)
56
56
  * [No. 21 of 1991 (Amendment)](https://web.archive.org/web/20200221094206/http://www.commonlii.org:80/lk/legis/num_act/ha21o1991232/)
57
- * <https://web.archive.org/web/20110722150724/http://www.pubad.gov.lk/Holidays/holidays%202003.htm>
58
- * <https://web.archive.org/web/20111018053717/http://www.pubad.gov.lk/Holidays/Public%20&%20Bank%20Holidays%202004.pdf>
59
- * <https://web.archive.org/web/20241120204015/https://documents.gov.lk/en/calendar.php>
57
+ * [2003](https://web.archive.org/web/20110722150724/http://www.pubad.gov.lk/Holidays/holidays%202003.htm)
58
+ * [2004](https://web.archive.org/web/20111018053717/http://www.pubad.gov.lk/Holidays/Public%20&%20Bank%20Holidays%202004.pdf)
59
+ * [2005-2025](https://web.archive.org/web/20241120204015/https://documents.gov.lk/en/calendar.php)
60
+ * [2026](https://archive.org/details/2438-22-e)
60
61
 
61
62
  Cross-Checked With:
62
63
  * <https://web.archive.org/web/20111018053927/http://www.pubad.gov.lk/Holidays/Public%20&%20Bank%20Holidays%202005.pdf>
@@ -82,11 +83,11 @@ class SriLanka(
82
83
  # %s (estimated).
83
84
  estimated_label = tr("%s (අනුමානිත)")
84
85
  supported_languages = ("en_US", "si_LK", "ta_LK")
85
- # Sri Lanka's Holidays Act (No. 29 of 1971) was first proclaimed on SEP 2nd, 1971
86
- # but the earliest citable calendar online is from 2003.
87
- # As there's no source for future Poya dates, end year is capped at 2025.
88
- start_year = 1972
89
- end_year = 2025
86
+ # Sri Lanka's Holidays Act (No. 29 of 1971) was first proclaimed on September 2nd, 1971
87
+ # but the earliest citable online calendar reference is from 2003. As Poya dates are
88
+ # approved on a yearly basis by the Poya committee, the end year is capped at 2026.
89
+ start_year = 2003
90
+ end_year = 2026
90
91
 
91
92
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
92
93
  """
@@ -94,12 +95,18 @@ class SriLanka(
94
95
  islamic_show_estimated:
95
96
  Whether to add "estimated" label to Islamic holidays name
96
97
  if holiday date is estimated.
98
+
99
+ In Sri Lanka, the dates of the Islamic calendar usually fall a day later than
100
+ the corresponding dates in the Umm al-Qura calendar.
97
101
  """
98
102
  ChristianHolidays.__init__(self)
99
103
  HinduCalendarHolidays.__init__(self, SriLankaHinduHolidays)
100
104
  InternationalHolidays.__init__(self)
101
105
  IslamicHolidays.__init__(
102
- self, cls=SriLankaIslamicHolidays, show_estimated=islamic_show_estimated
106
+ self,
107
+ cls=SriLankaIslamicHolidays,
108
+ show_estimated=islamic_show_estimated,
109
+ calendar_delta_days=+1,
103
110
  )
104
111
  SinhalaCalendarHolidays.__init__(self)
105
112
  StaticHolidays.__init__(self, cls=SriLankaStaticHolidays)
@@ -111,6 +118,7 @@ class SriLanka(
111
118
  # Tamil Thai Pongal Day.
112
119
  name = tr("දෙමළ තෛපොංැලල් දිනය")
113
120
  thai_pongal_years_jan_14 = {
121
+ # Sri Lanka's isn't an exact match with India's, i.e. 2026, used with caution.
114
122
  2005,
115
123
  2006,
116
124
  2009,
@@ -148,13 +156,19 @@ class SriLanka(
148
156
  # Day Before Sinhala and Tamil New Year.
149
157
  self._add_holiday(tr("සිංහල හා දෙමළ අලුත් අවුරුදු දිනට පෙර දිනය"), _timedelta(dt, -1))
150
158
 
159
+ # Good Friday.
160
+ self._add_good_friday(tr("මහ සිකුරාදා දිනය"))
161
+
151
162
  # International Workers' Day.
152
163
  self._add_labor_day(tr("ලොක කම්කරු දිනය"))
153
164
 
165
+ # Christmas Day.
166
+ self._add_christmas_day(tr("නත්තල් උත්සව දිනය"))
167
+
154
168
  # Hindu Holidays.
155
169
 
156
170
  maha_sivarathri_dates = {
157
- # The one used in Sri Lanka isn't an exact match with India, used with caution.
171
+ # Sri Lanka's isn't an exact match with India's, i.e. 2010, used with caution.
158
172
  2003: (MAR, 1),
159
173
  2004: (FEB, 18),
160
174
  2005: (MAR, 8),
@@ -178,25 +192,16 @@ class SriLanka(
178
192
  2023: (FEB, 18),
179
193
  2024: (MAR, 8),
180
194
  2025: (FEB, 26),
195
+ 2026: (FEB, 15),
181
196
  }
182
- maha_sivarathri_date = maha_sivarathri_dates.get(self._year)
183
- if maha_sivarathri_date:
184
- # Maha Sivarathri Day.
185
- self._add_holiday(tr("මහ සිවරාත්රි දිනය"), maha_sivarathri_date)
197
+ # Maha Sivarathri Day.
198
+ self._add_holiday(tr("මහ සිවරාත්රි දිනය"), maha_sivarathri_dates.get(self._year))
186
199
 
187
200
  # Deepavali was a working day in 2003.
188
201
  if self._year >= 2004:
189
202
  # Deepavali Festival Day.
190
203
  self._add_diwali(tr("දීපවාලි උත්සව දිනය"))
191
204
 
192
- # Christian Holidays.
193
-
194
- # Good Friday.
195
- self._add_good_friday(tr("මහ සිකුරාදා දිනය"))
196
-
197
- # Christmas Day.
198
- self._add_christmas_day(tr("නත්තල් උත්සව දිනය"))
199
-
200
205
  # Poya Holidays.
201
206
  # All Adhi Poya Holidays will instead be added in StaticHolidays.
202
207
 
@@ -213,11 +218,10 @@ class SriLanka(
213
218
  self._add_bak_poya(tr("බක් පුර පසළොස්වක පෝය දිනය"))
214
219
 
215
220
  # Vesak Full Moon Poya Day.
216
- dt = self._add_vesak_poya(tr("වෙසක් පුර පසළොස්වක පෝය දිනය"))
221
+ vesak_poya = self._add_vesak_poya(tr("වෙසක් පුර පසළොස්වක පෝය දිනය"))
217
222
 
218
- if self._year >= 2003:
219
- # Day Following Vesak Full Moon Poya Day.
220
- self._add_holiday(tr("වෙසක් පුර පසළොස්වක පෝය දිනට පසු දිනය"), _timedelta(dt, +1))
223
+ # Day Following Vesak Full Moon Poya Day.
224
+ self._add_holiday(tr("වෙසක් පුර පසළොස්වක පෝය දිනට පසු දිනය"), _timedelta(vesak_poya, +1))
221
225
 
222
226
  # Poson Full Moon Poya Day.
223
227
  self._add_poson_poya(tr("පොසොන් පුර පසළොස්වක පෝය දිනය"))
@@ -285,79 +289,40 @@ class SriLankaHinduHolidays(_CustomHinduHolidays):
285
289
  2023: (NOV, 12),
286
290
  2024: (OCT, 31),
287
291
  2025: (OCT, 20),
292
+ 2026: (NOV, 8),
288
293
  }
289
294
 
290
295
 
291
296
  class SriLankaIslamicHolidays(_CustomIslamicHolidays):
292
- EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2003, 2025)
297
+ # https://web.archive.org/web/20111103102902/http://www.adaderana.lk:80/news.php?nid=15606
298
+ # https://web.archive.org/web/20121029024049/http://www.adaderana.lk:80/news.php?nid=20136
299
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2003, 2026)
293
300
  EID_AL_ADHA_DATES = {
294
- 2003: (FEB, 12),
301
+ 2004: (FEB, 1),
302
+ 2005: (JAN, 21),
295
303
  2006: ((JAN, 11), (DEC, 31)),
296
- 2007: (DEC, 21),
297
- 2008: (DEC, 9),
298
- 2009: (NOV, 28),
299
- 2010: (NOV, 17),
300
- # https://web.archive.org/web/20111103102902/http://www.adaderana.lk:80/news.php?nid=15606
301
- 2011: (NOV, 7),
302
- # https://web.archive.org/web/20121029024049/http://www.adaderana.lk:80/news.php?nid=20136
303
- 2012: (OCT, 27),
304
- 2013: (OCT, 16),
305
- 2014: (OCT, 5),
306
- 2015: (SEP, 24),
307
- 2016: (SEP, 12),
308
- 2018: (AUG, 22),
309
- 2019: (AUG, 12),
310
- 2020: (AUG, 1),
311
- 2021: (JUL, 21),
312
- 2022: (JUL, 10),
313
- 2023: (JUN, 29),
314
- 2024: (JUN, 17),
315
- 2025: (JUN, 7),
304
+ 2017: (SEP, 1),
305
+ 2026: (MAY, 28),
316
306
  }
317
307
 
318
- EID_AL_FITR_DATES_CONFIRMED_YEARS = (2003, 2025)
308
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2003, 2026)
319
309
  EID_AL_FITR_DATES = {
320
- 2003: (NOV, 26),
321
- 2005: (NOV, 4),
322
- 2006: (OCT, 24),
323
- 2009: (SEP, 21),
324
- 2011: (AUG, 31),
325
- 2013: (AUG, 9),
326
- 2014: (JUL, 29),
327
- 2015: (JUL, 18),
328
- 2017: (JUN, 26),
329
- 2019: (JUN, 5),
330
- 2020: (MAY, 25),
331
- 2021: (MAY, 14),
332
- 2022: (MAY, 3),
333
- 2023: (APR, 22),
334
- 2024: (APR, 11),
335
- 2025: (MAR, 31),
310
+ 2004: (NOV, 14),
311
+ 2007: (OCT, 13),
312
+ 2008: (OCT, 1),
313
+ 2010: (SEP, 10),
314
+ 2012: (AUG, 19),
315
+ 2016: (JUL, 6),
316
+ 2018: (JUN, 15),
317
+ 2026: (MAR, 21),
336
318
  }
337
319
 
338
- MAWLID_DATES_CONFIRMED_YEARS = (2003, 2025)
320
+ MAWLID_DATES_CONFIRMED_YEARS = (2003, 2026)
339
321
  MAWLID_DATES = {
340
- 2003: (MAY, 14),
341
- 2004: (MAY, 2),
342
- 2005: (APR, 22),
343
- 2006: (APR, 11),
344
- 2007: (APR, 1),
345
- 2009: (MAR, 10),
346
- 2010: (FEB, 27),
347
- 2011: (FEB, 16),
348
- 2012: (FEB, 5),
349
- 2013: (JAN, 25),
350
- 2014: (JAN, 14),
322
+ 2008: (MAR, 20),
351
323
  2015: (JAN, 4),
352
- 2016: (DEC, 12),
353
- 2017: (DEC, 1),
354
- 2019: (NOV, 10),
355
- 2020: (OCT, 30),
356
- 2021: (OCT, 19),
357
- 2022: (OCT, 9),
358
- 2023: (SEP, 28),
359
- 2024: (SEP, 16),
360
- 2025: (SEP, 5),
324
+ 2018: (NOV, 20),
325
+ 2026: (AUG, 26),
361
326
  }
362
327
 
363
328
 
@@ -444,7 +409,7 @@ class SriLankaStaticHolidays:
444
409
  ),
445
410
  2019: (
446
411
  (APR, 15, special_bank_holiday_name),
447
- # MAY 20 got upgraded to Special Public Holiday.
412
+ # May 20th, 2019 got upgraded to Special Public Holiday.
448
413
  (NOV, 11, special_bank_holiday_name),
449
414
  ),
450
415
  2020: (APR, 14, special_bank_holiday_name),
@@ -453,7 +418,7 @@ class SriLankaStaticHolidays:
453
418
  (DEC, 24, half_day_special_bank_holiday_name),
454
419
  ),
455
420
  2022: (
456
- # MAY 2 got upgraded to Special Public Holiday.
421
+ # May 2nd got upgraded to Special Public Holiday.
457
422
  (OCT, 10, special_bank_holiday_name),
458
423
  (DEC, 26, special_bank_holiday_name),
459
424
  ),
@@ -465,7 +430,7 @@ class SriLankaStaticHolidays:
465
430
  2020: (JUN, 4, public_sector_holiday_name),
466
431
  2022: (
467
432
  (JUN, 13, public_sector_holiday_name),
468
- # All Friday between JUN 15, 2022 to AUG 2, 2022.
433
+ # All Friday between June 15th, 2022 to August 2nd, 2022.
469
434
  (JUN, 17, public_sector_holiday_name),
470
435
  (JUN, 24, public_sector_holiday_name),
471
436
  (JUL, 1, public_sector_holiday_name),
@@ -480,7 +445,7 @@ class SriLankaStaticHolidays:
480
445
  2004: (JUL, 31, adhi_esala_poya_name),
481
446
  2007: (MAY, 31, adhi_poson_poya_name),
482
447
  2010: (APR, 28, adhi_vesak_poya_name),
483
- # 2011, MAY 2 confirmed as not getting upgrade to Special Public Holiday.
448
+ # May 2nd, 2011 confirmed as not getting upgrade to Special Public Holiday.
484
449
  2012: (
485
450
  (MAY, 7, special_public_holiday_name),
486
451
  (AUG, 31, adhi_binara_poya_name),
@@ -507,8 +472,10 @@ class SriLankaStaticHolidays:
507
472
  (APR, 15, special_public_holiday_name),
508
473
  (SEP, 29, special_public_holiday_name),
509
474
  ),
475
+ 2026: (MAY, 30, adhi_poson_poya_name),
510
476
  }
511
477
 
512
478
  special_workday_holidays = {
513
- 2003: (OCT, 24, tr("දීපවාලි උත්සව දිනය")), # Deepavali Festival Day.
479
+ # Deepavali Festival Day.
480
+ 2003: (OCT, 24, tr("දීපවාලි උත්සව දිනය")),
514
481
  }
@@ -108,14 +108,13 @@ class Suriname(
108
108
  self._add_holiday_oct_10(tr("Dag der Marrons"))
109
109
 
110
110
  if self._year >= 1976:
111
- name = (
111
+ self._add_holiday_nov_25(
112
112
  # Independence Day.
113
113
  tr("Onafhankelijkheidsdag")
114
114
  if self._year >= 2008
115
115
  # Republic Day.
116
116
  else tr("Dag van de Republiek")
117
117
  )
118
- self._add_holiday_nov_25(name)
119
118
 
120
119
  # Christmas Day.
121
120
  self._add_christmas_day(tr("Eerste Kerstdag"))
@@ -39,7 +39,7 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays):
39
39
  default_language = "sv"
40
40
  supported_languages = ("en_US", "sv", "th", "uk")
41
41
 
42
- def __init__(self, include_sundays: bool = True, *args, **kwargs):
42
+ def __init__(self, *args, include_sundays: bool = True, **kwargs):
43
43
  """
44
44
  Args:
45
45
  include_sundays:
@@ -12,10 +12,17 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
- from holidays.calendars.gregorian import APR, THU, _timedelta, _get_nth_weekday_of_month
15
+ from holidays.calendars.gregorian import MAR, APR, MON, THU, _timedelta, _get_nth_weekday_of_month
16
16
  from holidays.constants import HALF_DAY, OPTIONAL, PUBLIC
17
17
  from holidays.groups import ChristianHolidays, InternationalHolidays
18
- from holidays.observed_holiday_base import ObservedHolidayBase, MON_ONLY, TUE_TO_NONE, SAT_TO_NONE
18
+ from holidays.observed_holiday_base import (
19
+ ObservedHolidayBase,
20
+ MON_ONLY,
21
+ TUE_TO_NONE,
22
+ SAT_TO_NONE,
23
+ SUN_TO_NONE,
24
+ ALL_TO_NEXT_MON,
25
+ )
19
26
 
20
27
 
21
28
  class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
@@ -23,6 +30,11 @@ class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
23
30
 
24
31
  References:
25
32
  * <https://web.archive.org/web/20250201054902/https://www.bj.admin.ch/dam/bj/de/data/publiservice/service/zivilprozessrecht/kant-feiertage.pdf>
33
+ * <https://web.archive.org/web/20251002085718/https://www.zuerich.com/en/inform-plan/useful-information-and-services/opening-hours-and-public-holidays/feiertage>
34
+ * <https://web.archive.org/web/20251008032850/https://www.stadt-zuerich.ch/de/politik-und-verwaltung/arbeiten-bei-der-stadt/gut-zu-wissen/ferien-urlaub/feiertage-betriebsferientage-bft.html>
35
+ * <https://web.archive.org/web/20230423124030/https://zuercher-bankenverband.ch/zbv/assets/uploads/2021/09/2022-Feiertagsuebersicht.pdf>
36
+ * <https://web.archive.org/web/20251008045946/https://zuercher-bankenverband.ch/zbv/assets/uploads/2022/09/2023-Feiertagsuebersicht.pdf>
37
+ * <https://web.archive.org/web/20251003094601/https://www.timeanddate.com/calendar/seasons.html?year=1900&n=268>
26
38
  * <https://de.wikipedia.org/wiki/Feiertage_in_der_Schweiz>
27
39
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Switzerland>
28
40
  """
@@ -92,7 +104,7 @@ class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
92
104
  "Zürich": "ZH",
93
105
  }
94
106
  supported_categories = (HALF_DAY, OPTIONAL, PUBLIC)
95
- supported_languages = ("de", "en_US", "fr", "it", "uk")
107
+ supported_languages = ("de", "en_US", "fr", "it", "th", "uk")
96
108
 
97
109
  def __init__(self, *args, **kwargs):
98
110
  ChristianHolidays.__init__(self)
@@ -713,9 +725,80 @@ class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
713
725
  # Whit Monday.
714
726
  self._add_whit_monday(tr("Pfingstmontag"))
715
727
 
728
+ if self._year >= 1899:
729
+ # Knabenschiessen.
730
+ name = tr("Knabenschiessen")
731
+ self._add_holiday_2nd_sun_of_sep(name)
732
+ self._add_holiday_1_day_prior_2nd_sun_of_sep(name)
733
+
716
734
  # Saint Stephen's Day.
717
735
  self._add_christmas_day_two(tr("Stephanstag"))
718
736
 
737
+ def _populate_subdiv_zh_common(self):
738
+ """Populate list of holidays observed by both `HALF_DAY` and `OPTIONAL` categories."""
739
+ # Day before Good Friday.
740
+ self._add_holy_thursday(tr("Vortag vor Karfreitag"))
741
+
742
+ if self._year >= 1902:
743
+ # Sechseläuten.
744
+ name = tr("Sechseläuten")
745
+ # Third Monday in April but not in Holy Week.
746
+ if self._year >= 1952:
747
+ dt = _get_nth_weekday_of_month(3, MON, APR, self._year)
748
+ self._add_holiday(
749
+ name, _timedelta(dt, +7) if dt == _timedelta(self._easter_sunday, +1) else dt
750
+ )
751
+ # From 1902-1951 this was the First Monday following the Vernal Equinox.
752
+ else:
753
+ self._move_holiday_forced(
754
+ self._add_holiday(name, self._vernal_equinox_date), rule=ALL_TO_NEXT_MON
755
+ )
756
+
757
+ # Christmas Eve.
758
+ self._add_christmas_eve(tr("Heiligabend"))
759
+
760
+ # New Year's Eve.
761
+ self._add_new_years_eve(tr("Vortag vor Neujahr"))
762
+
763
+ def _populate_subdiv_zh_half_day_holidays(self):
764
+ self._populate_subdiv_zh_common()
765
+
766
+ if self._year >= 1899:
767
+ # Knabenschiessen.
768
+ self._add_holiday_1_day_past_2nd_sun_of_sep(tr("Knabenschiessen"))
769
+
770
+ # Day before Ascension Day.
771
+ self._add_holiday_38_days_past_easter(tr("Vortag vor Auffahrt"))
772
+
773
+ def _populate_subdiv_zh_optional_holidays(self):
774
+ self._populate_subdiv_zh_common()
775
+
776
+ dec_25 = self._christmas_day
777
+
778
+ # This is only granted if end-year bridge holidays <= 2.
779
+ if self._is_tuesday(dec_25) or self._is_wednesday(dec_25) or self._is_thursday(dec_25):
780
+ # Bridge Holiday for Ascension Day.
781
+ self._add_holiday_40_days_past_easter(tr("Brückentag nach Auffahrt"))
782
+
783
+ # This is only granted if end-year bridge holidays <= 3.
784
+ if self._year >= 1899 and not self._is_weekend(dec_25):
785
+ # Knabenschiessen.
786
+ self._add_holiday_1_day_past_2nd_sun_of_sep(tr("Knabenschiessen"))
787
+
788
+ # Bridge Holiday.
789
+ name = tr("Brückentag")
790
+ self._add_observed(self._add_holiday_dec_27(name), rule=SAT_TO_NONE + SUN_TO_NONE)
791
+ self._add_observed(self._add_holiday_dec_28(name), rule=SAT_TO_NONE + SUN_TO_NONE)
792
+ self._add_observed(self._add_holiday_dec_29(name), rule=SAT_TO_NONE + SUN_TO_NONE)
793
+ self._add_observed(self._add_holiday_dec_30(name), rule=SAT_TO_NONE + SUN_TO_NONE)
794
+
795
+ @property
796
+ def _vernal_equinox_date(self) -> tuple[int, int]:
797
+ """Return the Vernal Equinox date for Zurich (1902-1951)."""
798
+ return MAR, 20 if (
799
+ (self._year >= 1916 and self._year % 4 == 0) or self._year == 1949
800
+ ) else 21
801
+
719
802
 
720
803
  class CH(Switzerland):
721
804
  pass
@@ -13,7 +13,7 @@
13
13
  from __future__ import annotations
14
14
 
15
15
  from gettext import gettext as tr
16
- from typing import Optional, TYPE_CHECKING
16
+ from typing import TYPE_CHECKING
17
17
 
18
18
  from holidays.calendars.gregorian import (
19
19
  JAN,
@@ -112,7 +112,7 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
112
112
  return weekend
113
113
 
114
114
  def _populate_observed(
115
- self, dts: set[date], rule: Optional[ObservedRule] = None, since: int = 2015
115
+ self, dts: set[date], rule: ObservedRule | None = None, since: int = 2015
116
116
  ) -> None:
117
117
  """
118
118
  Taiwan's General Observance Rule first started in 2015 as per
@@ -134,7 +134,7 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
134
134
  dt,
135
135
  name,
136
136
  # Children's Day falls on the same day as Tomb-Sweeping Day.
137
- CHILDRENS_DAY_RULE if name == childrens_day and len(names) > 1 else rule,
137
+ rule=CHILDRENS_DAY_RULE if name == childrens_day and len(names) > 1 else rule,
138
138
  )
139
139
 
140
140
  def _populate_public_holidays(self):
@@ -121,11 +121,17 @@ class Tanzania(
121
121
  islamic_show_estimated:
122
122
  Whether to add "estimated" label to Islamic holidays name
123
123
  if holiday date is estimated.
124
+
125
+ In Tanzania, the dates of the Islamic calendar usually fall a day later than
126
+ the corresponding dates in the Umm al-Qura calendar.
124
127
  """
125
128
  ChristianHolidays.__init__(self)
126
129
  InternationalHolidays.__init__(self)
127
130
  IslamicHolidays.__init__(
128
- self, cls=TanzaniaIslamicHolidays, show_estimated=islamic_show_estimated
131
+ self,
132
+ cls=TanzaniaIslamicHolidays,
133
+ show_estimated=islamic_show_estimated,
134
+ calendar_delta_days=+1,
129
135
  )
130
136
  StaticHolidays.__init__(self, TanzaniaStaticHolidays)
131
137
  super().__init__(*args, **kwargs)
@@ -155,7 +161,7 @@ class Tanzania(
155
161
  else:
156
162
  rule = SAT_SUN_TO_NEXT_MON
157
163
  for name in self.get_list(dt):
158
- self._add_observed(dt, name, rule)
164
+ self._add_observed(dt, name, rule=rule)
159
165
 
160
166
  def _populate_bank_holidays(self):
161
167
  # Sikukuu ya Pasaka.
@@ -324,16 +330,11 @@ class TanzaniaIslamicHolidays(_CustomIslamicHolidays):
324
330
  2004: (FEB, 2),
325
331
  2006: (JAN, 9),
326
332
  2007: (JAN, 1),
327
- 2014: (OCT, 5),
328
- 2016: (SEP, 16),
329
- 2017: (SEP, 2),
330
- 2018: (AUG, 22),
333
+ 2013: (OCT, 15),
334
+ 2015: (SEP, 23),
335
+ 2016: (SEP, 13),
331
336
  2019: (AUG, 13),
332
- 2021: (JUL, 21),
333
- 2022: (JUL, 10),
334
- 2023: (JUN, 29),
335
- 2024: (JUN, 17),
336
- 2025: (JUN, 7),
337
+ 2020: (JUL, 31),
337
338
  }
338
339
 
339
340
  EID_AL_FITR_DATES_CONFIRMED_YEARS = (2013, 2025)
@@ -360,15 +361,10 @@ class TanzaniaIslamicHolidays(_CustomIslamicHolidays):
360
361
  2004: (OCT, 18),
361
362
  2006: (OCT, 29),
362
363
  2007: (OCT, 13),
363
- 2014: (JUL, 29),
364
- 2015: (JUL, 18),
365
- 2016: (JUL, 7),
366
- 2017: (JUN, 26),
367
- 2019: (JUN, 5),
368
- 2021: (MAY, 14),
369
- 2022: (MAY, 3),
370
- 2023: (APR, 22),
371
- 2025: (MAR, 31),
364
+ 2013: (AUG, 8),
365
+ 2018: (JUN, 15),
366
+ 2020: (MAY, 24),
367
+ 2024: (APR, 10),
372
368
  }
373
369
 
374
370
  MAWLID_DATES_CONFIRMED_YEARS = (2013, 2025)
@@ -395,16 +391,10 @@ class TanzaniaIslamicHolidays(_CustomIslamicHolidays):
395
391
  2004: (MAY, 2),
396
392
  2006: (APR, 10),
397
393
  2007: (MAR, 31),
398
- 2014: (JAN, 14),
394
+ 2013: (JAN, 24),
399
395
  2015: ((JAN, 3), (DEC, 24)),
400
- 2016: (DEC, 12),
401
- 2017: (DEC, 1),
402
- 2018: (NOV, 21),
403
- 2019: (NOV, 10),
404
- 2021: (OCT, 19),
405
- 2022: (OCT, 9),
406
- 2023: (SEP, 28),
407
- 2024: (SEP, 16),
396
+ 2020: (OCT, 29),
397
+ 2025: (SEP, 4),
408
398
  }
409
399
 
410
400
 
@@ -681,14 +681,15 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC
681
681
  # **For pre-1941 data, Buddhist Era year starts on APR 1st.
682
682
 
683
683
  if 1915 <= self._year <= 1925 or self._year >= 1938:
684
- name = (
685
- # Makha Bucha.
686
- tr("วันมาฆบูชา")
687
- if self._year >= 1938
688
- # Makha Bucha, the Fourfold Assembly Day.
689
- else tr("มาฆบูชา จาตุรงฅ์สันนิบาต")
684
+ self._add_observed(
685
+ self._add_makha_bucha(
686
+ # Makha Bucha.
687
+ tr("วันมาฆบูชา")
688
+ if self._year >= 1938
689
+ # Makha Bucha, the Fourfold Assembly Day.
690
+ else tr("มาฆบูชา จาตุรงฅ์สันนิบาต")
691
+ )
690
692
  )
691
- self._add_observed(self._add_makha_bucha(name))
692
693
 
693
694
  # วันวิสาขบูชา
694
695
  # Status: In-Use.
@@ -87,7 +87,7 @@ class TrinidadAndTobago(
87
87
  )
88
88
  super().__init__(*args, **kwargs)
89
89
 
90
- def _populate_observed(self, dts: set[date], multiple: bool = False) -> None:
90
+ def _populate_observed(self, dts: set[date], *, multiple: bool = False) -> None:
91
91
  for dt in sorted(dts):
92
92
  self._add_observed(
93
93
  dt,
@@ -54,7 +54,7 @@ class Ukraine(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
54
54
  # https://web.archive.org/web/20240315074159/http://zakon.rada.gov.ua/laws/show/576-14
55
55
  return date(1995, JAN, 27) <= dt <= date(1998, JAN, 9) or dt >= date(1999, APR, 23)
56
56
 
57
- def _populate_common(self, is_martial_law: bool = False):
57
+ def _populate_common(self, *, is_martial_law: bool = False):
58
58
  # There is no public holidays in Ukraine during the period of martial law
59
59
  # https://web.archive.org/web/20250418204733/https://zakon.rada.gov.ua/laws/show/2136-20
60
60
  # law is in force from March 15, 2022
@@ -11,7 +11,6 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from gettext import gettext as tr
14
- from typing import Union
15
14
 
16
15
  from holidays.calendars.gregorian import APR, MAY, JUN, JUL, SEP, DEC
17
16
  from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
@@ -42,7 +41,7 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
42
41
  default_language = "en_GB"
43
42
  # %s (observed).
44
43
  observed_label = tr("%s (observed)")
45
- subdivisions: Union[tuple[()], tuple[str, ...]] = (
44
+ subdivisions: tuple[()] | tuple[str, ...] = (
46
45
  "ENG", # England
47
46
  "NIR", # Northern Ireland
48
47
  "SCT", # Scotland
@@ -128,7 +127,7 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
128
127
  def _populate_subdiv_nir_public_holidays(self):
129
128
  if self._year >= 1903:
130
129
  # Saint Patrick's Day.
131
- self._add_observed(self._add_holiday_mar_17(tr("Saint Patrick's Day")))
130
+ self._add_observed(self._add_saint_patricks_day(tr("Saint Patrick's Day")))
132
131
 
133
132
  # Easter Monday.
134
133
  self._add_easter_monday(tr("Easter Monday"))
@@ -11,7 +11,6 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from gettext import gettext as tr
14
- from typing import Union
15
14
 
16
15
  from holidays.calendars.gregorian import (
17
16
  FEB,
@@ -115,7 +114,7 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
115
114
  supported_languages = ("en_US", "th")
116
115
  # Independence Declared on July 4th, 1776.
117
116
  start_year = 1777
118
- subdivisions: Union[tuple[()], tuple[str, ...]] = (
117
+ subdivisions: tuple[()] | tuple[str, ...] = (
119
118
  "AK", # Alaska.
120
119
  "AL", # Alabama.
121
120
  "AR", # Arkansas.
@@ -249,7 +248,7 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
249
248
  kwargs.setdefault("observed_since", 1953)
250
249
  super().__init__(*args, **kwargs)
251
250
 
252
- def _populate_common(self, include_federal: bool = False):
251
+ def _populate_common(self, *, include_federal: bool = False):
253
252
  """
254
253
  Populates common US holidays.
255
254
 
@@ -1339,7 +1338,7 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
1339
1338
  # Started in Boston in 1737 for the US.
1340
1339
 
1341
1340
  # Saint Patrick's Day.
1342
- self._add_holiday_mar_17(tr("Saint Patrick's Day"))
1341
+ self._add_saint_patricks_day(tr("Saint Patrick's Day"))
1343
1342
 
1344
1343
  # Mother's Day.
1345
1344
  # Starts to be observed by most US states by 1911.