holidays 0.81__py3-none-any.whl → 0.83__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 (141) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/burmese.py +319 -0
  3. holidays/calendars/hebrew.py +2 -2
  4. holidays/calendars/islamic.py +26 -6
  5. holidays/calendars/thai.py +49 -2
  6. holidays/countries/__init__.py +11 -0
  7. holidays/countries/afghanistan.py +7 -5
  8. holidays/countries/algeria.py +89 -24
  9. holidays/countries/antarctica.py +58 -0
  10. holidays/countries/azerbaijan.py +1 -1
  11. holidays/countries/bouvet_island.py +31 -0
  12. holidays/countries/brazil.py +1 -1
  13. holidays/countries/british_indian_ocean_territory.py +31 -0
  14. holidays/countries/bulgaria.py +6 -1
  15. holidays/countries/canada.py +27 -13
  16. holidays/countries/chile.py +9 -8
  17. holidays/countries/cuba.py +3 -4
  18. holidays/countries/denmark.py +18 -6
  19. holidays/countries/djibouti.py +1 -1
  20. holidays/countries/fiji.py +2 -3
  21. holidays/countries/finland.py +3 -6
  22. holidays/countries/guyana.py +24 -32
  23. holidays/countries/heard_island_and_mcdonald_islands.py +31 -0
  24. holidays/countries/hungary.py +4 -5
  25. holidays/countries/india.py +27 -78
  26. holidays/countries/iran.py +133 -269
  27. holidays/countries/ireland.py +1 -1
  28. holidays/countries/israel.py +1 -1
  29. holidays/countries/japan.py +22 -18
  30. holidays/countries/jordan.py +6 -3
  31. holidays/countries/kuwait.py +6 -3
  32. holidays/countries/macau.py +5 -8
  33. holidays/countries/malaysia.py +14 -3
  34. holidays/countries/mauritius.py +10 -9
  35. holidays/countries/montserrat.py +1 -1
  36. holidays/countries/myanmar.py +194 -0
  37. holidays/countries/nepal.py +11 -30
  38. holidays/countries/netherlands.py +28 -24
  39. holidays/countries/new_zealand.py +75 -31
  40. holidays/countries/nigeria.py +53 -75
  41. holidays/countries/north_korea.py +161 -0
  42. holidays/countries/norway.py +24 -9
  43. holidays/countries/oman.py +6 -2
  44. holidays/countries/paraguay.py +70 -23
  45. holidays/countries/portugal.py +5 -6
  46. holidays/countries/qatar.py +5 -2
  47. holidays/countries/rwanda.py +8 -3
  48. holidays/countries/saudi_arabia.py +6 -5
  49. holidays/countries/serbia.py +5 -0
  50. holidays/countries/slovakia.py +23 -4
  51. holidays/countries/south_africa.py +96 -53
  52. holidays/countries/south_korea.py +6 -1
  53. holidays/countries/spain.py +4 -4
  54. holidays/countries/sri_lanka.py +21 -58
  55. holidays/countries/sudan.py +6 -3
  56. holidays/countries/suriname.py +1 -2
  57. holidays/countries/sweden.py +1 -1
  58. holidays/countries/switzerland.py +255 -6
  59. holidays/countries/taiwan.py +23 -3
  60. holidays/countries/tanzania.py +25 -30
  61. holidays/countries/thailand.py +29 -7
  62. holidays/countries/tonga.py +6 -1
  63. holidays/countries/trinidad_and_tobago.py +7 -2
  64. holidays/countries/ukraine.py +1 -1
  65. holidays/countries/united_arab_emirates.py +9 -2
  66. holidays/countries/united_kingdom.py +1 -1
  67. holidays/countries/united_states.py +18 -2
  68. holidays/countries/uruguay.py +6 -1
  69. holidays/countries/vietnam.py +6 -1
  70. holidays/countries/western_sahara.py +92 -0
  71. holidays/countries/yemen.py +6 -3
  72. holidays/groups/__init__.py +1 -0
  73. holidays/groups/balinese_saka.py +1 -1
  74. holidays/groups/buddhist.py +3 -3
  75. holidays/groups/burmese.py +273 -0
  76. holidays/groups/chinese.py +30 -2
  77. holidays/groups/christian.py +10 -0
  78. holidays/groups/custom.py +8 -2
  79. holidays/groups/eastern.py +26 -0
  80. holidays/groups/hebrew.py +16 -14
  81. holidays/groups/hindu.py +23 -15
  82. holidays/groups/international.py +1 -1
  83. holidays/groups/islamic.py +52 -50
  84. holidays/groups/mongolian.py +6 -3
  85. holidays/groups/sinhala.py +9 -11
  86. holidays/groups/tibetan.py +8 -6
  87. holidays/holiday_base.py +26 -26
  88. holidays/ical.py +6 -4
  89. holidays/locale/ar/LC_MESSAGES/DZ.mo +0 -0
  90. holidays/locale/ar/LC_MESSAGES/EH.mo +0 -0
  91. holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
  92. holidays/locale/de/LC_MESSAGES/CH.mo +0 -0
  93. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  94. holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
  95. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  96. holidays/locale/en_US/LC_MESSAGES/DZ.mo +0 -0
  97. holidays/locale/en_US/LC_MESSAGES/EH.mo +0 -0
  98. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  99. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  100. holidays/locale/en_US/LC_MESSAGES/JP.mo +0 -0
  101. holidays/locale/en_US/LC_MESSAGES/KP.mo +0 -0
  102. holidays/locale/en_US/LC_MESSAGES/MM.mo +0 -0
  103. holidays/locale/en_US/LC_MESSAGES/NL.mo +0 -0
  104. holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
  105. holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
  106. holidays/locale/es/LC_MESSAGES/EH.mo +0 -0
  107. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  108. holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
  109. holidays/locale/fr/LC_MESSAGES/CH.mo +0 -0
  110. holidays/locale/fr/LC_MESSAGES/DZ.mo +0 -0
  111. holidays/locale/fr/LC_MESSAGES/EH.mo +0 -0
  112. holidays/locale/fy/LC_MESSAGES/NL.mo +0 -0
  113. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  114. holidays/locale/it/LC_MESSAGES/CH.mo +0 -0
  115. holidays/locale/ja/LC_MESSAGES/JP.mo +0 -0
  116. holidays/locale/ko_KP/LC_MESSAGES/KP.mo +0 -0
  117. holidays/locale/my/LC_MESSAGES/MM.mo +0 -0
  118. holidays/locale/nl/LC_MESSAGES/NL.mo +0 -0
  119. holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
  120. holidays/locale/th/LC_MESSAGES/CH.mo +0 -0
  121. holidays/locale/th/LC_MESSAGES/DK.mo +0 -0
  122. holidays/locale/th/LC_MESSAGES/JP.mo +0 -0
  123. holidays/locale/th/LC_MESSAGES/MM.mo +0 -0
  124. holidays/locale/th/LC_MESSAGES/NL.mo +0 -0
  125. holidays/locale/th/LC_MESSAGES/US.mo +0 -0
  126. holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
  127. holidays/locale/uk/LC_MESSAGES/CH.mo +0 -0
  128. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  129. holidays/locale/uk/LC_MESSAGES/NL.mo +0 -0
  130. holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
  131. holidays/no_holiday_base.py +21 -0
  132. holidays/observed_holiday_base.py +16 -4
  133. holidays/registry.py +8 -0
  134. holidays/utils.py +5 -5
  135. holidays/version.py +1 -1
  136. {holidays-0.81.dist-info → holidays-0.83.dist-info}/METADATA +63 -19
  137. {holidays-0.81.dist-info → holidays-0.83.dist-info}/RECORD +141 -118
  138. {holidays-0.81.dist-info → holidays-0.83.dist-info}/licenses/CONTRIBUTORS +2 -0
  139. {holidays-0.81.dist-info → holidays-0.83.dist-info}/WHEEL +0 -0
  140. {holidays-0.81.dist-info → holidays-0.83.dist-info}/licenses/LICENSE +0 -0
  141. {holidays-0.81.dist-info → holidays-0.83.dist-info}/top_level.txt +0 -0
@@ -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)
@@ -144,85 +156,122 @@ class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
144
156
  self._add_christmas_day_two(tr("Stephanstag"))
145
157
 
146
158
  def _populate_subdiv_ar_public_holidays(self):
159
+ # Good Friday.
147
160
  self._add_good_friday(tr("Karfreitag"))
148
161
 
162
+ # Easter Monday.
149
163
  self._add_easter_monday(tr("Ostermontag"))
150
164
 
165
+ # Whit Monday.
151
166
  self._add_whit_monday(tr("Pfingstmontag"))
152
167
 
153
168
  self._add_observed(
154
- self._add_christmas_day_two(tr("Stephanstag")), rule=TUE_TO_NONE + SAT_TO_NONE
169
+ # Saint Stephen's Day.
170
+ self._add_christmas_day_two(tr("Stephanstag")),
171
+ rule=TUE_TO_NONE + SAT_TO_NONE,
155
172
  )
156
173
 
157
174
  def _populate_subdiv_ai_public_holidays(self):
175
+ # Good Friday.
158
176
  self._add_good_friday(tr("Karfreitag"))
159
177
 
178
+ # Easter Monday.
160
179
  self._add_easter_monday(tr("Ostermontag"))
161
180
 
181
+ # Whit Monday.
162
182
  self._add_whit_monday(tr("Pfingstmontag"))
163
183
 
184
+ # Corpus Christi.
164
185
  self._add_corpus_christi_day(tr("Fronleichnam"))
165
186
 
187
+ # Assumption Day.
166
188
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
167
189
 
190
+ # All Saints' Day.
168
191
  self._add_all_saints_day(tr("Allerheiligen"))
169
192
 
193
+ # Immaculate Conception.
170
194
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
171
195
 
172
196
  self._add_observed(
173
- self._add_christmas_day_two(tr("Stephanstag")), rule=TUE_TO_NONE + SAT_TO_NONE
197
+ # Saint Stephen's Day.
198
+ self._add_christmas_day_two(tr("Stephanstag")),
199
+ rule=TUE_TO_NONE + SAT_TO_NONE,
174
200
  )
175
201
 
176
202
  def _populate_subdiv_bl_public_holidays(self):
203
+ # Good Friday.
177
204
  self._add_good_friday(tr("Karfreitag"))
178
205
 
206
+ # Easter Monday.
179
207
  self._add_easter_monday(tr("Ostermontag"))
180
208
 
209
+ # Labor Day.
181
210
  self._add_labor_day(tr("Tag der Arbeit"))
182
211
 
212
+ # Whit Monday.
183
213
  self._add_whit_monday(tr("Pfingstmontag"))
184
214
 
215
+ # Saint Stephen's Day.
185
216
  self._add_christmas_day_two(tr("Stephanstag"))
186
217
 
187
218
  def _populate_subdiv_bs_public_holidays(self):
219
+ # Good Friday.
188
220
  self._add_good_friday(tr("Karfreitag"))
189
221
 
222
+ # Easter Monday.
190
223
  self._add_easter_monday(tr("Ostermontag"))
191
224
 
225
+ # Labor Day.
192
226
  self._add_labor_day(tr("Tag der Arbeit"))
193
227
 
228
+ # Whit Monday.
194
229
  self._add_whit_monday(tr("Pfingstmontag"))
195
230
 
231
+ # Saint Stephen's Day.
196
232
  self._add_christmas_day_two(tr("Stephanstag"))
197
233
 
198
234
  def _populate_subdiv_be_public_holidays(self):
235
+ # Saint Berchtold's Day.
199
236
  self._add_new_years_day_two(tr("Berchtoldstag"))
200
237
 
238
+ # Good Friday.
201
239
  self._add_good_friday(tr("Karfreitag"))
202
240
 
241
+ # Easter Monday.
203
242
  self._add_easter_monday(tr("Ostermontag"))
204
243
 
244
+ # Whit Monday.
205
245
  self._add_whit_monday(tr("Pfingstmontag"))
206
246
 
247
+ # Saint Stephen's Day.
207
248
  self._add_christmas_day_two(tr("Stephanstag"))
208
249
 
209
250
  def _populate_subdiv_fr_public_holidays(self):
251
+ # Good Friday.
210
252
  self._add_good_friday(tr("Karfreitag"))
211
253
 
212
254
  def _populate_subdiv_fr_optional_holidays(self):
255
+ # Saint Berchtold's Day.
213
256
  self._add_new_years_day_two(tr("Berchtoldstag"))
214
257
 
258
+ # Easter Monday.
215
259
  self._add_easter_monday(tr("Ostermontag"))
216
260
 
261
+ # Whit Monday.
217
262
  self._add_whit_monday(tr("Pfingstmontag"))
218
263
 
264
+ # Saint Stephen's Day.
219
265
  self._add_christmas_day_two(tr("Stephanstag"))
220
266
 
221
267
  def _populate_subdiv_ge_public_holidays(self):
268
+ # Good Friday.
222
269
  self._add_good_friday(tr("Karfreitag"))
223
270
 
271
+ # Easter Monday.
224
272
  self._add_easter_monday(tr("Ostermontag"))
225
273
 
274
+ # Whit Monday.
226
275
  self._add_whit_monday(tr("Pfingstmontag"))
227
276
 
228
277
  # Genevan Fast.
@@ -241,70 +290,98 @@ class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
241
290
  _timedelta(dt, +7) if dt == _timedelta(self._easter_sunday, -3) else dt,
242
291
  )
243
292
 
293
+ # Good Friday.
244
294
  self._add_good_friday(tr("Karfreitag"))
245
295
 
296
+ # Easter Monday.
246
297
  self._add_easter_monday(tr("Ostermontag"))
247
298
 
299
+ # Whit Monday.
248
300
  self._add_whit_monday(tr("Pfingstmontag"))
249
301
 
302
+ # All Saints' Day.
250
303
  self._add_all_saints_day(tr("Allerheiligen"))
251
304
 
305
+ # Saint Stephen's Day.
252
306
  self._add_christmas_day_two(tr("Stephanstag"))
253
307
 
254
308
  def _populate_subdiv_gl_optional_holidays(self):
309
+ # Saint Berchtold's Day.
255
310
  self._add_new_years_day_two(tr("Berchtoldstag"))
256
311
 
257
312
  def _populate_subdiv_gr_public_holidays(self):
313
+ # Easter Monday.
258
314
  self._add_easter_monday(tr("Ostermontag"))
259
315
 
316
+ # Whit Monday.
260
317
  self._add_whit_monday(tr("Pfingstmontag"))
261
318
 
319
+ # Saint Stephen's Day.
262
320
  self._add_christmas_day_two(tr("Stephanstag"))
263
321
 
264
322
  def _populate_subdiv_gr_optional_holidays(self):
323
+ # Good Friday.
265
324
  self._add_good_friday(tr("Karfreitag"))
266
325
 
267
326
  def _populate_subdiv_ju_public_holidays(self):
327
+ # Saint Berchtold's Day.
268
328
  self._add_new_years_day_two(tr("Berchtoldstag"))
269
329
 
330
+ # Good Friday.
270
331
  self._add_good_friday(tr("Karfreitag"))
271
332
 
333
+ # Easter Monday.
272
334
  self._add_easter_monday(tr("Ostermontag"))
273
335
 
336
+ # Labor Day.
274
337
  self._add_labor_day(tr("Tag der Arbeit"))
275
338
 
339
+ # Whit Monday.
276
340
  self._add_whit_monday(tr("Pfingstmontag"))
277
341
 
342
+ # Corpus Christi.
278
343
  self._add_corpus_christi_day(tr("Fronleichnam"))
279
344
 
280
345
  # Independence Day.
281
346
  self._add_holiday_jun_23(tr("Fest der Unabhängigkeit"))
282
347
 
348
+ # Assumption Day.
283
349
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
284
350
 
351
+ # All Saints' Day.
285
352
  self._add_all_saints_day(tr("Allerheiligen"))
286
353
 
287
354
  def _populate_subdiv_lu_public_holidays(self):
355
+ # Saint Berchtold's Day.
288
356
  self._add_new_years_day_two(tr("Berchtoldstag"))
289
357
 
358
+ # Good Friday.
290
359
  self._add_good_friday(tr("Karfreitag"))
291
360
 
361
+ # Easter Monday.
292
362
  self._add_easter_monday(tr("Ostermontag"))
293
363
 
364
+ # Whit Monday.
294
365
  self._add_whit_monday(tr("Pfingstmontag"))
295
366
 
367
+ # Corpus Christi.
296
368
  self._add_corpus_christi_day(tr("Fronleichnam"))
297
369
 
370
+ # Assumption Day.
298
371
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
299
372
 
373
+ # All Saints' Day.
300
374
  self._add_all_saints_day(tr("Allerheiligen"))
301
375
 
376
+ # Immaculate Conception.
302
377
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
303
378
 
379
+ # Saint Stephen's Day.
304
380
  self._add_christmas_day_two(tr("Stephanstag"))
305
381
 
306
382
  def _populate_subdiv_ne_public_holidays(self):
307
383
  self._add_observed(
384
+ # Saint Berchtold's Day.
308
385
  self._add_new_years_day_two(tr("Berchtoldstag")),
309
386
  rule=MON_ONLY, # Jan 2 is public holiday only when it falls on Monday.
310
387
  )
@@ -312,244 +389,416 @@ class Switzerland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
312
389
  # Republic Day.
313
390
  self._add_holiday_mar_1(tr("Jahrestag der Ausrufung der Republik"))
314
391
 
392
+ # Good Friday.
315
393
  self._add_good_friday(tr("Karfreitag"))
316
394
 
395
+ # Labor Day.
317
396
  self._add_labor_day(tr("Tag der Arbeit"))
318
397
 
398
+ # Corpus Christi.
319
399
  self._add_corpus_christi_day(tr("Fronleichnam"))
320
400
 
401
+ # Saint Stephen's Day.
321
402
  self._add_observed(self._add_christmas_day_two(tr("Stephanstag")), rule=MON_ONLY)
322
403
 
323
404
  def _populate_subdiv_nw_public_holidays(self):
324
405
  # Saint Joseph's Day.
325
406
  self._add_saint_josephs_day(tr("Josefstag"))
326
407
 
408
+ # Good Friday.
327
409
  self._add_good_friday(tr("Karfreitag"))
328
410
 
411
+ # Corpus Christi.
329
412
  self._add_corpus_christi_day(tr("Fronleichnam"))
330
413
 
414
+ # Assumption Day.
331
415
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
332
416
 
417
+ # All Saints' Day.
333
418
  self._add_all_saints_day(tr("Allerheiligen"))
334
419
 
420
+ # Immaculate Conception.
335
421
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
336
422
 
337
423
  def _populate_subdiv_nw_optional_holidays(self):
424
+ # Saint Berchtold's Day.
338
425
  self._add_new_years_day_two(tr("Berchtoldstag"))
339
426
 
427
+ # Easter Monday.
340
428
  self._add_easter_monday(tr("Ostermontag"))
341
429
 
430
+ # Whit Monday.
342
431
  self._add_whit_monday(tr("Pfingstmontag"))
343
432
 
433
+ # Saint Stephen's Day.
344
434
  self._add_christmas_day_two(tr("Stephanstag"))
345
435
 
346
436
  def _populate_subdiv_ow_public_holidays(self):
437
+ # Good Friday.
347
438
  self._add_good_friday(tr("Karfreitag"))
348
439
 
440
+ # Corpus Christi.
349
441
  self._add_corpus_christi_day(tr("Fronleichnam"))
350
442
 
443
+ # Assumption Day.
351
444
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
352
445
 
353
446
  # Saint Nicholas of Flüe.
354
447
  self._add_holiday_sep_25(tr("Bruder Klaus"))
355
448
 
449
+ # All Saints' Day.
356
450
  self._add_all_saints_day(tr("Allerheiligen"))
357
451
 
452
+ # Immaculate Conception.
358
453
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
359
454
 
360
455
  def _populate_subdiv_ow_optional_holidays(self):
456
+ # Saint Berchtold's Day.
361
457
  self._add_new_years_day_two(tr("Berchtoldstag"))
362
458
 
459
+ # Easter Monday.
363
460
  self._add_easter_monday(tr("Ostermontag"))
364
461
 
462
+ # Whit Monday.
365
463
  self._add_whit_monday(tr("Pfingstmontag"))
366
464
 
465
+ # Saint Stephen's Day.
367
466
  self._add_christmas_day_two(tr("Stephanstag"))
368
467
 
369
468
  def _populate_subdiv_sg_public_holidays(self):
469
+ # Good Friday.
370
470
  self._add_good_friday(tr("Karfreitag"))
371
471
 
472
+ # Easter Monday.
372
473
  self._add_easter_monday(tr("Ostermontag"))
373
474
 
475
+ # Whit Monday.
374
476
  self._add_whit_monday(tr("Pfingstmontag"))
375
477
 
478
+ # All Saints' Day.
376
479
  self._add_all_saints_day(tr("Allerheiligen"))
377
480
 
481
+ # Saint Stephen's Day.
378
482
  self._add_christmas_day_two(tr("Stephanstag"))
379
483
 
380
484
  def _populate_subdiv_sg_optional_holidays(self):
485
+ # Saint Berchtold's Day.
381
486
  self._add_new_years_day_two(tr("Berchtoldstag"))
382
487
 
383
488
  def _populate_subdiv_sh_public_holidays(self):
489
+ # Good Friday.
384
490
  self._add_good_friday(tr("Karfreitag"))
385
491
 
492
+ # Easter Monday.
386
493
  self._add_easter_monday(tr("Ostermontag"))
387
494
 
495
+ # Labor Day.
388
496
  self._add_labor_day(tr("Tag der Arbeit"))
389
497
 
498
+ # Whit Monday.
390
499
  self._add_whit_monday(tr("Pfingstmontag"))
391
500
 
501
+ # Saint Stephen's Day.
392
502
  self._add_christmas_day_two(tr("Stephanstag"))
393
503
 
394
504
  def _populate_subdiv_sh_optional_holidays(self):
505
+ # Saint Berchtold's Day.
395
506
  self._add_new_years_day_two(tr("Berchtoldstag"))
396
507
 
397
508
  def _populate_subdiv_sz_public_holidays(self):
398
509
  # Epiphany.
399
510
  self._add_epiphany_day(tr("Heilige Drei Könige"))
400
511
 
512
+ # Saint Joseph's Day.
401
513
  self._add_saint_josephs_day(tr("Josefstag"))
402
514
 
515
+ # Good Friday.
403
516
  self._add_good_friday(tr("Karfreitag"))
404
517
 
518
+ # Easter Monday.
405
519
  self._add_easter_monday(tr("Ostermontag"))
406
520
 
521
+ # Whit Monday.
407
522
  self._add_whit_monday(tr("Pfingstmontag"))
408
523
 
524
+ # Corpus Christi.
409
525
  self._add_corpus_christi_day(tr("Fronleichnam"))
410
526
 
527
+ # Assumption Day.
411
528
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
412
529
 
530
+ # All Saints' Day.
413
531
  self._add_all_saints_day(tr("Allerheiligen"))
414
532
 
533
+ # Immaculate Conception.
415
534
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
416
535
 
536
+ # Saint Stephen's Day.
417
537
  self._add_christmas_day_two(tr("Stephanstag"))
418
538
 
419
539
  def _populate_subdiv_so_public_holidays(self):
540
+ # Good Friday.
420
541
  self._add_good_friday(tr("Karfreitag"))
421
542
 
422
543
  def _populate_subdiv_so_half_day_holidays(self):
544
+ # Labor Day.
423
545
  self._add_labor_day(tr("Tag der Arbeit"))
424
546
 
425
547
  def _populate_subdiv_so_optional_holidays(self):
548
+ # Saint Berchtold's Day.
426
549
  self._add_new_years_day_two(tr("Berchtoldstag"))
427
550
 
428
551
  def _populate_subdiv_tg_public_holidays(self):
552
+ # Saint Berchtold's Day.
429
553
  self._add_new_years_day_two(tr("Berchtoldstag"))
430
554
 
555
+ # Labor Day.
431
556
  self._add_labor_day(tr("Tag der Arbeit"))
432
557
 
558
+ # Good Friday.
433
559
  self._add_good_friday(tr("Karfreitag"))
434
560
 
561
+ # Easter Monday.
435
562
  self._add_easter_monday(tr("Ostermontag"))
436
563
 
564
+ # Whit Monday.
437
565
  self._add_whit_monday(tr("Pfingstmontag"))
438
566
 
567
+ # Saint Stephen's Day.
439
568
  self._add_christmas_day_two(tr("Stephanstag"))
440
569
 
441
570
  def _populate_subdiv_ti_public_holidays(self):
571
+ # Epiphany.
442
572
  self._add_epiphany_day(tr("Heilige Drei Könige"))
443
573
 
574
+ # Saint Joseph's Day.
444
575
  self._add_saint_josephs_day(tr("Josefstag"))
445
576
 
577
+ # Easter Monday.
446
578
  self._add_easter_monday(tr("Ostermontag"))
447
579
 
580
+ # Labor Day.
448
581
  self._add_labor_day(tr("Tag der Arbeit"))
449
582
 
583
+ # Whit Monday.
450
584
  self._add_whit_monday(tr("Pfingstmontag"))
451
585
 
586
+ # Corpus Christi.
452
587
  self._add_corpus_christi_day(tr("Fronleichnam"))
453
588
 
454
589
  # Saints Peter and Paul.
455
590
  self._add_saints_peter_and_paul_day(tr("Peter und Paul"))
456
591
 
592
+ # Assumption Day.
457
593
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
458
594
 
595
+ # All Saints' Day.
459
596
  self._add_all_saints_day(tr("Allerheiligen"))
460
597
 
598
+ # Immaculate Conception.
461
599
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
462
600
 
601
+ # Saint Stephen's Day.
463
602
  self._add_christmas_day_two(tr("Stephanstag"))
464
603
 
465
604
  def _populate_subdiv_ur_public_holidays(self):
605
+ # Epiphany.
466
606
  self._add_epiphany_day(tr("Heilige Drei Könige"))
467
607
 
608
+ # Saint Joseph's Day.
468
609
  self._add_saint_josephs_day(tr("Josefstag"))
469
610
 
611
+ # Good Friday.
470
612
  self._add_good_friday(tr("Karfreitag"))
471
613
 
614
+ # Easter Monday.
472
615
  self._add_easter_monday(tr("Ostermontag"))
473
616
 
617
+ # Whit Monday.
474
618
  self._add_whit_monday(tr("Pfingstmontag"))
475
619
 
620
+ # Corpus Christi.
476
621
  self._add_corpus_christi_day(tr("Fronleichnam"))
477
622
 
623
+ # Assumption Day.
478
624
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
479
625
 
626
+ # All Saints' Day.
480
627
  self._add_all_saints_day(tr("Allerheiligen"))
481
628
 
629
+ # Immaculate Conception.
482
630
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
483
631
 
484
632
  self._add_observed(
485
- self._add_christmas_day_two(tr("Stephanstag")), rule=TUE_TO_NONE + SAT_TO_NONE
633
+ # Saint Stephen's Day.
634
+ self._add_christmas_day_two(tr("Stephanstag")),
635
+ rule=TUE_TO_NONE + SAT_TO_NONE,
486
636
  )
487
637
 
488
638
  def _populate_subdiv_vd_public_holidays(self):
639
+ # Saint Berchtold's Day.
489
640
  self._add_new_years_day_two(tr("Berchtoldstag"))
490
641
 
642
+ # Good Friday.
491
643
  self._add_good_friday(tr("Karfreitag"))
492
644
 
645
+ # Easter Monday.
493
646
  self._add_easter_monday(tr("Ostermontag"))
494
647
 
648
+ # Whit Monday.
495
649
  self._add_whit_monday(tr("Pfingstmontag"))
496
650
 
497
651
  # Prayer Monday.
498
652
  self._add_holiday_1_day_past_3rd_sun_of_sep(tr("Bettagsmontag"))
499
653
 
500
654
  def _populate_subdiv_vs_public_holidays(self):
655
+ # Saint Joseph's Day.
501
656
  self._add_saint_josephs_day(tr("Josefstag"))
502
657
 
658
+ # Corpus Christi.
503
659
  self._add_corpus_christi_day(tr("Fronleichnam"))
504
660
 
661
+ # Assumption Day.
505
662
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
506
663
 
664
+ # All Saints' Day.
507
665
  self._add_all_saints_day(tr("Allerheiligen"))
508
666
 
667
+ # Immaculate Conception.
509
668
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
510
669
 
511
670
  def _populate_subdiv_vs_optional_holidays(self):
671
+ # Saint Berchtold's Day.
512
672
  self._add_new_years_day_two(tr("Berchtoldstag"))
513
673
 
674
+ # Easter Monday.
514
675
  self._add_easter_monday(tr("Ostermontag"))
515
676
 
677
+ # Whit Monday.
516
678
  self._add_whit_monday(tr("Pfingstmontag"))
517
679
 
680
+ # Saint Stephen's Day.
518
681
  self._add_christmas_day_two(tr("Stephanstag"))
519
682
 
520
683
  def _populate_subdiv_zg_public_holidays(self):
684
+ # Good Friday.
521
685
  self._add_good_friday(tr("Karfreitag"))
522
686
 
687
+ # Corpus Christi.
523
688
  self._add_corpus_christi_day(tr("Fronleichnam"))
524
689
 
690
+ # Assumption Day.
525
691
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
526
692
 
693
+ # All Saints' Day.
527
694
  self._add_all_saints_day(tr("Allerheiligen"))
528
695
 
696
+ # Immaculate Conception.
529
697
  self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
530
698
 
531
699
  def _populate_subdiv_zg_optional_holidays(self):
700
+ # Saint Berchtold's Day.
532
701
  self._add_new_years_day_two(tr("Berchtoldstag"))
533
702
 
703
+ # Easter Monday.
534
704
  self._add_easter_monday(tr("Ostermontag"))
535
705
 
706
+ # Whit Monday.
536
707
  self._add_whit_monday(tr("Pfingstmontag"))
537
708
 
709
+ # Saint Stephen's Day.
538
710
  self._add_christmas_day_two(tr("Stephanstag"))
539
711
 
540
712
  def _populate_subdiv_zh_public_holidays(self):
713
+ # Saint Berchtold's Day.
541
714
  self._add_new_years_day_two(tr("Berchtoldstag"))
542
715
 
716
+ # Good Friday.
543
717
  self._add_good_friday(tr("Karfreitag"))
544
718
 
719
+ # Easter Monday.
545
720
  self._add_easter_monday(tr("Ostermontag"))
546
721
 
722
+ # Labor Day.
547
723
  self._add_labor_day(tr("Tag der Arbeit"))
548
724
 
725
+ # Whit Monday.
549
726
  self._add_whit_monday(tr("Pfingstmontag"))
550
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
+
734
+ # Saint Stephen's Day.
551
735
  self._add_christmas_day_two(tr("Stephanstag"))
552
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
+
553
802
 
554
803
  class CH(Switzerland):
555
804
  pass