holidays 0.55__py3-none-any.whl → 0.57__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 (152) hide show
  1. holidays/__init__.py +1 -1
  2. holidays/calendars/thai.py +67 -16
  3. holidays/constants.py +1 -0
  4. holidays/countries/__init__.py +2 -0
  5. holidays/countries/australia.py +180 -144
  6. holidays/countries/austria.py +10 -10
  7. holidays/countries/bahrain.py +4 -4
  8. holidays/countries/bosnia_and_herzegovina.py +8 -12
  9. holidays/countries/brunei.py +8 -2
  10. holidays/countries/cambodia.py +23 -6
  11. holidays/countries/canada.py +6 -6
  12. holidays/countries/croatia.py +1 -1
  13. holidays/countries/cyprus.py +1 -1
  14. holidays/countries/djibouti.py +1 -1
  15. holidays/countries/dominica.py +130 -0
  16. holidays/countries/dominican_republic.py +7 -12
  17. holidays/countries/germany.py +30 -12
  18. holidays/countries/haiti.py +134 -0
  19. holidays/countries/hongkong.py +1 -1
  20. holidays/countries/hungary.py +6 -0
  21. holidays/countries/indonesia.py +1 -1
  22. holidays/countries/iran.py +1 -1
  23. holidays/countries/ireland.py +6 -6
  24. holidays/countries/isle_of_man.py +1 -0
  25. holidays/countries/italy.py +113 -5
  26. holidays/countries/jersey.py +20 -17
  27. holidays/countries/jordan.py +1 -1
  28. holidays/countries/kuwait.py +1 -1
  29. holidays/countries/laos.py +27 -65
  30. holidays/countries/liechtenstein.py +1 -1
  31. holidays/countries/luxembourg.py +1 -1
  32. holidays/countries/malaysia.py +16 -38
  33. holidays/countries/malta.py +3 -3
  34. holidays/countries/new_zealand.py +68 -43
  35. holidays/countries/philippines.py +215 -26
  36. holidays/countries/portugal.py +7 -7
  37. holidays/countries/russia.py +382 -3
  38. holidays/countries/slovakia.py +1 -1
  39. holidays/countries/south_korea.py +2 -0
  40. holidays/countries/spain.py +8 -8
  41. holidays/countries/switzerland.py +3 -3
  42. holidays/countries/tanzania.py +1 -1
  43. holidays/countries/thailand.py +2 -2
  44. holidays/countries/timor_leste.py +2 -2
  45. holidays/countries/united_kingdom.py +12 -22
  46. holidays/countries/united_states.py +9 -2
  47. holidays/groups/christian.py +19 -0
  48. holidays/holiday_base.py +0 -3
  49. holidays/locale/ar/LC_MESSAGES/BH.po +4 -4
  50. holidays/locale/ar/LC_MESSAGES/CA.mo +0 -0
  51. holidays/locale/ar/LC_MESSAGES/CA.po +6 -6
  52. holidays/locale/ar/LC_MESSAGES/DJ.po +1 -1
  53. holidays/locale/ar/LC_MESSAGES/JO.po +1 -1
  54. holidays/locale/ar/LC_MESSAGES/KW.po +1 -1
  55. holidays/locale/de/LC_MESSAGES/AT.po +6 -6
  56. holidays/locale/de/LC_MESSAGES/CH.po +3 -3
  57. holidays/locale/de/LC_MESSAGES/LI.po +1 -1
  58. holidays/locale/de/LC_MESSAGES/LU.po +1 -1
  59. holidays/locale/en_AU/LC_MESSAGES/AU.mo +0 -0
  60. holidays/locale/en_AU/LC_MESSAGES/AU.po +177 -0
  61. holidays/locale/en_CA/LC_MESSAGES/CA.po +6 -6
  62. holidays/locale/en_US/LC_MESSAGES/AT.mo +0 -0
  63. holidays/locale/en_US/LC_MESSAGES/AT.po +14 -14
  64. holidays/locale/en_US/LC_MESSAGES/AU.mo +0 -0
  65. holidays/locale/en_US/LC_MESSAGES/AU.po +177 -0
  66. holidays/locale/en_US/LC_MESSAGES/BG.mo +0 -0
  67. holidays/locale/en_US/LC_MESSAGES/BG.po +3 -3
  68. holidays/locale/en_US/LC_MESSAGES/BH.po +4 -4
  69. holidays/locale/en_US/LC_MESSAGES/BN.mo +0 -0
  70. holidays/locale/en_US/LC_MESSAGES/BN.po +8 -8
  71. holidays/locale/en_US/LC_MESSAGES/CA.mo +0 -0
  72. holidays/locale/en_US/LC_MESSAGES/CA.po +11 -11
  73. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  74. holidays/locale/en_US/LC_MESSAGES/CH.po +9 -8
  75. holidays/locale/en_US/LC_MESSAGES/DJ.mo +0 -0
  76. holidays/locale/en_US/LC_MESSAGES/DJ.po +5 -5
  77. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  78. holidays/locale/en_US/LC_MESSAGES/ES.po +16 -16
  79. holidays/locale/en_US/LC_MESSAGES/HR.mo +0 -0
  80. holidays/locale/en_US/LC_MESSAGES/HR.po +4 -4
  81. holidays/locale/en_US/LC_MESSAGES/HT.mo +0 -0
  82. holidays/locale/en_US/LC_MESSAGES/HT.po +127 -0
  83. holidays/locale/en_US/LC_MESSAGES/ID.mo +0 -0
  84. holidays/locale/en_US/LC_MESSAGES/ID.po +5 -5
  85. holidays/locale/en_US/LC_MESSAGES/IR.mo +0 -0
  86. holidays/locale/en_US/LC_MESSAGES/IR.po +5 -5
  87. holidays/locale/en_US/LC_MESSAGES/JO.mo +0 -0
  88. holidays/locale/en_US/LC_MESSAGES/JO.po +6 -5
  89. holidays/locale/en_US/LC_MESSAGES/KW.mo +0 -0
  90. holidays/locale/en_US/LC_MESSAGES/KW.po +6 -5
  91. holidays/locale/en_US/LC_MESSAGES/LI.mo +0 -0
  92. holidays/locale/en_US/LC_MESSAGES/LI.po +4 -4
  93. holidays/locale/en_US/LC_MESSAGES/LU.mo +0 -0
  94. holidays/locale/en_US/LC_MESSAGES/LU.po +4 -4
  95. holidays/locale/en_US/LC_MESSAGES/MT.mo +0 -0
  96. holidays/locale/en_US/LC_MESSAGES/MT.po +8 -8
  97. holidays/locale/en_US/LC_MESSAGES/PT.mo +0 -0
  98. holidays/locale/en_US/LC_MESSAGES/PT.po +16 -16
  99. holidays/locale/en_US/LC_MESSAGES/SK.mo +0 -0
  100. holidays/locale/en_US/LC_MESSAGES/SK.po +4 -4
  101. holidays/locale/en_US/LC_MESSAGES/TL.mo +0 -0
  102. holidays/locale/en_US/LC_MESSAGES/TL.po +8 -8
  103. holidays/locale/en_US/LC_MESSAGES/TZ.mo +0 -0
  104. holidays/locale/en_US/LC_MESSAGES/TZ.po +6 -6
  105. holidays/locale/es/LC_MESSAGES/ES.po +7 -7
  106. holidays/locale/es/LC_MESSAGES/HT.mo +0 -0
  107. holidays/locale/es/LC_MESSAGES/HT.po +127 -0
  108. holidays/locale/fa/LC_MESSAGES/IR.po +1 -1
  109. holidays/locale/fr/LC_MESSAGES/CA.mo +0 -0
  110. holidays/locale/fr/LC_MESSAGES/CA.po +6 -6
  111. holidays/locale/fr/LC_MESSAGES/CH.po +3 -3
  112. holidays/locale/fr/LC_MESSAGES/DJ.po +1 -1
  113. holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
  114. holidays/locale/fr/LC_MESSAGES/LU.po +2 -2
  115. holidays/locale/fr_HT/LC_MESSAGES/HT.mo +0 -0
  116. holidays/locale/fr_HT/LC_MESSAGES/HT.po +127 -0
  117. holidays/locale/hr/LC_MESSAGES/HR.po +1 -1
  118. holidays/locale/ht/LC_MESSAGES/HT.mo +0 -0
  119. holidays/locale/ht/LC_MESSAGES/HT.po +127 -0
  120. holidays/locale/id/LC_MESSAGES/ID.po +1 -1
  121. holidays/locale/it/LC_MESSAGES/CH.po +3 -3
  122. holidays/locale/lb/LC_MESSAGES/LU.po +1 -1
  123. holidays/locale/ms/LC_MESSAGES/BN.po +2 -2
  124. holidays/locale/mt/LC_MESSAGES/MT.po +3 -3
  125. holidays/locale/pt_PT/LC_MESSAGES/PT.po +7 -7
  126. holidays/locale/pt_TL/LC_MESSAGES/TL.po +2 -2
  127. holidays/locale/sk/LC_MESSAGES/SK.po +1 -1
  128. holidays/locale/sw/LC_MESSAGES/TZ.po +1 -1
  129. holidays/locale/tet/LC_MESSAGES/TL.po +2 -2
  130. holidays/locale/th/LC_MESSAGES/AU.mo +0 -0
  131. holidays/locale/th/LC_MESSAGES/AU.po +177 -0
  132. holidays/locale/th/LC_MESSAGES/BN.po +2 -2
  133. holidays/locale/th/LC_MESSAGES/CA.mo +0 -0
  134. holidays/locale/th/LC_MESSAGES/CA.po +6 -6
  135. holidays/locale/th/LC_MESSAGES/DE.mo +0 -0
  136. holidays/locale/th/LC_MESSAGES/DE.po +113 -0
  137. holidays/locale/uk/LC_MESSAGES/AT.po +6 -6
  138. holidays/locale/uk/LC_MESSAGES/CH.po +3 -3
  139. holidays/locale/uk/LC_MESSAGES/ES.po +7 -7
  140. holidays/locale/uk/LC_MESSAGES/HR.po +1 -1
  141. holidays/locale/uk/LC_MESSAGES/ID.po +1 -1
  142. holidays/locale/uk/LC_MESSAGES/LI.po +1 -1
  143. holidays/locale/uk/LC_MESSAGES/LU.po +1 -1
  144. holidays/locale/uk/LC_MESSAGES/PT.po +7 -7
  145. holidays/locale/uk/LC_MESSAGES/SK.po +1 -1
  146. holidays/registry.py +2 -0
  147. {holidays-0.55.dist-info → holidays-0.57.dist-info}/AUTHORS +1 -0
  148. {holidays-0.55.dist-info → holidays-0.57.dist-info}/METADATA +21 -11
  149. {holidays-0.55.dist-info → holidays-0.57.dist-info}/RECORD +152 -134
  150. {holidays-0.55.dist-info → holidays-0.57.dist-info}/WHEEL +1 -1
  151. {holidays-0.55.dist-info → holidays-0.57.dist-info}/LICENSE +0 -0
  152. {holidays-0.55.dist-info → holidays-0.57.dist-info}/top_level.txt +0 -0
@@ -107,7 +107,7 @@ class Austria(HolidayBase, ChristianHolidays, InternationalHolidays):
107
107
  # Christmas Day.
108
108
  self._add_christmas_day(tr("Christtag"))
109
109
 
110
- # St. Stephen's Day.
110
+ # Saint Stephen's Day.
111
111
  self._add_christmas_day_two(tr("Stefanitag"))
112
112
 
113
113
  def _populate_bank_holidays(self):
@@ -121,43 +121,43 @@ class Austria(HolidayBase, ChristianHolidays, InternationalHolidays):
121
121
  self._add_new_years_eve(tr("Silvester"))
122
122
 
123
123
  def _populate_subdiv_1_bank_holidays(self):
124
- # St. Martin's Day.
124
+ # Saint Martin's Day.
125
125
  self._add_holiday_nov_11(tr("Hl. Martin"))
126
126
 
127
127
  def _populate_subdiv_2_bank_holidays(self):
128
- # St. Joseph's Day.
128
+ # Saint Joseph's Day.
129
129
  self._add_saint_josephs_day(tr("Hl. Josef"))
130
130
 
131
131
  # 1920 Carinthian plebiscite.
132
132
  self._add_holiday_oct_10(tr("Tag der Volksabstimmung"))
133
133
 
134
134
  def _populate_subdiv_3_bank_holidays(self):
135
- # St. Leopold's Day.
135
+ # Saint Leopold's Day.
136
136
  self._add_holiday_nov_15(tr("Hl. Leopold"))
137
137
 
138
138
  def _populate_subdiv_4_bank_holidays(self):
139
139
  if self._year >= 2004:
140
- # St. Florian's Day.
140
+ # Saint Florian's Day.
141
141
  self._add_holiday_may_4(tr("Hl. Florian"))
142
142
 
143
143
  def _populate_subdiv_5_bank_holidays(self):
144
- # St. Rupert's Day.
144
+ # Saint Rupert's Day.
145
145
  self._add_holiday_sep_24(tr("Hl. Rupert"))
146
146
 
147
147
  def _populate_subdiv_6_bank_holidays(self):
148
- # St. Joseph's Day.
148
+ # Saint Joseph's Day.
149
149
  self._add_saint_josephs_day(tr("Hl. Josef"))
150
150
 
151
151
  def _populate_subdiv_7_bank_holidays(self):
152
- # St. Joseph's Day.
152
+ # Saint Joseph's Day.
153
153
  self._add_saint_josephs_day(tr("Hl. Josef"))
154
154
 
155
155
  def _populate_subdiv_8_bank_holidays(self):
156
- # St. Joseph's Day.
156
+ # Saint Joseph's Day.
157
157
  self._add_saint_josephs_day(tr("Hl. Josef"))
158
158
 
159
159
  def _populate_subdiv_9_bank_holidays(self):
160
- # St. Leopold's Day.
160
+ # Saint Leopold's Day.
161
161
  self._add_holiday_nov_15(tr("Hl. Leopold"))
162
162
 
163
163
 
@@ -46,16 +46,16 @@ class Bahrain(HolidayBase, InternationalHolidays, IslamicHolidays):
46
46
  # Labor Day.
47
47
  self._add_labor_day(tr("عيد العمال"))
48
48
 
49
- # Eid Al Fitr.
49
+ # Eid al-Fitr.
50
50
  eid_al_fitr = tr("عيد الفطر")
51
51
  self._add_eid_al_fitr_day(eid_al_fitr)
52
52
  self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر"))
53
- # Eid Al Fitr Holiday.
53
+ # Eid al-Fitr Holiday.
54
54
  self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))
55
55
 
56
- # Eid Al Adha.
56
+ # Eid al-Adha.
57
57
  self._add_eid_al_adha_day(tr("عيد الأضحى"))
58
- # Eid Al Adha Holiday.
58
+ # Eid al-Adha Holiday.
59
59
  self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
60
60
  self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى"))
61
61
 
@@ -64,11 +64,14 @@ class BosniaAndHerzegovina(
64
64
  "BRC", # Brčko distrikt
65
65
  "SRP", # Republika Srpska
66
66
  )
67
- _deprecated_subdivisions = (
68
- "BD",
69
- "FBiH",
70
- "RS",
71
- )
67
+ subdivisions_aliases = {
68
+ "Federacija Bosne i Hercegovine": "BIH",
69
+ "FBiH": "BIH",
70
+ "Brčko distrikt": "BRC",
71
+ "BD": "BRC",
72
+ "Republika Srpska": "SRP",
73
+ "RS": "SRP",
74
+ }
72
75
 
73
76
  def __init__(self, *args, **kwargs):
74
77
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
@@ -90,13 +93,6 @@ class BosniaAndHerzegovina(
90
93
  # Eid al-Adha.
91
94
  self._add_eid_al_adha_day(tr("Kurban Bajram"))
92
95
 
93
- if self.subdiv == "BD":
94
- self._populate_subdiv_brc_public_holidays()
95
- elif self.subdiv == "FBiH":
96
- self._populate_subdiv_bih_public_holidays()
97
- elif self.subdiv == "RS":
98
- self._populate_subdiv_srp_public_holidays()
99
-
100
96
  def _populate_subdiv_holidays(self):
101
97
  if not self.subdiv:
102
98
  # New Year's Day.
@@ -156,7 +156,7 @@ class Brunei(
156
156
  # Israk dan Mikraj
157
157
  # Status: In-Use.
158
158
 
159
- # Isra Mi'raj
159
+ # Isra' and Mi'raj
160
160
  for dt in self._add_isra_and_miraj_day(tr("Israk dan Mikraj")):
161
161
  self._add_observed(dt)
162
162
 
@@ -210,7 +210,7 @@ class Brunei(
210
210
  # Maulidur Rasul
211
211
  # Status: In-Use.
212
212
 
213
- # Birth of the Prophet
213
+ # Prophet's Birthday
214
214
  for dt in self._add_mawlid_day(tr("Maulidur Rasul")):
215
215
  self._add_observed(dt)
216
216
 
@@ -249,6 +249,7 @@ class BruneiIslamicHolidays(_CustomIslamicHolidays):
249
249
  2021: (JUL, 20),
250
250
  2022: (JUL, 10),
251
251
  2023: (JUN, 29),
252
+ 2024: (JUN, 17),
252
253
  }
253
254
 
254
255
  EID_AL_FITR_DATES = {
@@ -304,6 +305,7 @@ class BruneiIslamicHolidays(_CustomIslamicHolidays):
304
305
  2021: (AUG, 10),
305
306
  2022: (JUL, 30),
306
307
  2023: (JUL, 19),
308
+ 2024: (JUL, 7),
307
309
  }
308
310
 
309
311
  ISRA_AND_MIRAJ_DATES = {
@@ -331,6 +333,7 @@ class BruneiIslamicHolidays(_CustomIslamicHolidays):
331
333
  2021: (MAR, 11),
332
334
  2022: (MAR, 1),
333
335
  2023: (FEB, 18),
336
+ 2024: (FEB, 8),
334
337
  }
335
338
 
336
339
  MAWLID_DATES = {
@@ -358,6 +361,7 @@ class BruneiIslamicHolidays(_CustomIslamicHolidays):
358
361
  2021: (OCT, 19),
359
362
  2022: (OCT, 8),
360
363
  2023: (SEP, 28),
364
+ 2024: (SEP, 16),
361
365
  }
362
366
 
363
367
  NUZUL_AL_QURAN_DATES = {
@@ -385,6 +389,7 @@ class BruneiIslamicHolidays(_CustomIslamicHolidays):
385
389
  2021: (APR, 29),
386
390
  2022: (APR, 19),
387
391
  2023: (APR, 8),
392
+ 2024: (MAR, 28),
388
393
  }
389
394
 
390
395
  RAMADAN_BEGINNING_DATES = {
@@ -412,6 +417,7 @@ class BruneiIslamicHolidays(_CustomIslamicHolidays):
412
417
  2021: (APR, 13),
413
418
  2022: (APR, 3),
414
419
  2023: (MAR, 23),
420
+ 2024: (MAR, 12),
415
421
  }
416
422
 
417
423
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
- from holidays.calendars.gregorian import MAY, AUG, SEP, _timedelta
15
+ from holidays.calendars.gregorian import APR, MAY, AUG, SEP, _timedelta
16
16
  from holidays.calendars.thai import KHMER_CALENDAR
17
17
  from holidays.groups import InternationalHolidays, StaticHolidays, ThaiCalendarHolidays
18
18
  from holidays.holiday_base import HolidayBase
@@ -39,8 +39,8 @@ class Cambodia(HolidayBase, InternationalHolidays, StaticHolidays, ThaiCalendarH
39
39
  - Exact Public Holidays as per Cambodia's Official Gazette are only
40
40
  available from 2015 onwards.
41
41
 
42
- - Cambodian Lunar Calendar Holidays only work from 1941 (B.E. 2485) onwards until 2057
43
- (B.E. 2601) as we only have Thai year-type data for cross-checking until then.
42
+ - Cambodian Lunar Calendar Holidays only work from 1941 (B.E. 2485) onwards until 2157
43
+ (B.E. 2701) as we only have Thai year-type data for cross-checking until then.
44
44
 
45
45
 
46
46
  Country created by: `PPsyrius <https://github.com/PPsyrius>`__
@@ -86,12 +86,25 @@ class Cambodia(HolidayBase, InternationalHolidays, StaticHolidays, ThaiCalendarH
86
86
 
87
87
  # ពិធីបុណ្យចូលឆ្នាំថ្មីប្រពៃណីជាតិ
88
88
  # Status: In-Use.
89
- # Usually falls on April 13th except for 2017-2018 and 2021-2023 for years 2001-2050.
89
+ # Usually falls on April 13th except for 2017-2018, 2021-2023, 2025-2027, 2029-2031
90
+ # for years 2001-2050.
90
91
 
91
92
  if self._year != 2020:
92
93
  # Khmer New Year's Day
93
94
  sangkranta = tr("ពិធីបុណ្យចូលឆ្នាំថ្មីប្រពៃណីជាតិ")
94
- sangkranta_years_apr_14 = {2017, 2018, 2021, 2022, 2023}
95
+ sangkranta_years_apr_14 = {
96
+ 2017,
97
+ 2018,
98
+ 2021,
99
+ 2022,
100
+ 2023,
101
+ 2025,
102
+ 2026,
103
+ 2027,
104
+ 2029,
105
+ 2030,
106
+ 2031,
107
+ }
95
108
  dt = (
96
109
  self._add_holiday_apr_14(sangkranta)
97
110
  if self._year in sangkranta_years_apr_14
@@ -215,7 +228,7 @@ class Cambodia(HolidayBase, InternationalHolidays, StaticHolidays, ThaiCalendarH
215
228
 
216
229
  # Cambodian Lunar Calendar Holidays
217
230
  # See `_ThaiLunisolar` in holidays/utils.py for more details.
218
- # Cambodian Lunar Calendar Holidays only work from 1941 to 2057.
231
+ # Cambodian Lunar Calendar Holidays only work from 1941 to 2157.
219
232
 
220
233
  # ពិធីបុណ្យមាឃបូជា
221
234
  # Status: Defunct.
@@ -284,6 +297,9 @@ class CambodiaStaticHolidays:
284
297
  # Special Public Holiday
285
298
  special_in_lieu_holidays = tr("ថ្ងៃឈប់សម្រាកសងជំនួស")
286
299
 
300
+ # Khmer New Year's Day
301
+ sangkranta = tr("ពិធីបុណ្យចូលឆ្នាំថ្មីប្រពៃណីជាតិ")
302
+
287
303
  special_public_holidays = {
288
304
  2016: (
289
305
  (MAY, 2, special_in_lieu_holidays),
@@ -299,4 +315,5 @@ class CambodiaStaticHolidays:
299
315
  (AUG, 20, sangkranta_in_lieu_covid),
300
316
  (AUG, 21, sangkranta_in_lieu_covid),
301
317
  ),
318
+ 2024: (APR, 16, sangkranta),
302
319
  }
@@ -294,16 +294,16 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
294
294
 
295
295
  def _populate_subdiv_nl_optional_holidays(self):
296
296
  if self._year >= 1900:
297
- # St. Patrick's Day.
298
- self._add_holiday(tr("St. Patrick's Day"), self._get_nearest_monday(MAR, 17))
297
+ # Saint Patrick's Day.
298
+ self._add_holiday(tr("Saint Patrick's Day"), self._get_nearest_monday(MAR, 17))
299
299
 
300
300
  if self._year >= 1990:
301
301
  # Nearest Monday to April 23
302
302
  # 4/26 is the Monday closer to 4/23 in 2010
303
303
  # but the holiday was observed on 4/19? Crazy Newfies!
304
304
  dt = date(2010, APR, 19) if self._year == 2010 else self._get_nearest_monday(APR, 23)
305
- # St. George's Day.
306
- self._add_holiday(tr("St. George's Day"), dt)
305
+ # Saint George's Day.
306
+ self._add_holiday(tr("Saint George's Day"), dt)
307
307
 
308
308
  if self._year >= 1997:
309
309
  # Discovery Day.
@@ -429,8 +429,8 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
429
429
 
430
430
  if self._year >= 1925:
431
431
  self._add_observed(
432
- # St. Jean Baptiste Day.
433
- self._add_saint_johns_day(tr("St. Jean Baptiste Day")),
432
+ # Saint John the Baptist Day.
433
+ self._add_saint_johns_day(tr("Saint Jean Baptiste Day")),
434
434
  rule=SUN_TO_NEXT_MON,
435
435
  )
436
436
 
@@ -100,7 +100,7 @@ class Croatia(HolidayBase, ChristianHolidays, InternationalHolidays):
100
100
  # Christmas Day.
101
101
  self._add_christmas_day(tr("Božić"))
102
102
 
103
- # St. Stephen's Day.
103
+ # Saint Stephen's Day.
104
104
  self._add_christmas_day_two(tr("Sveti Stjepan"))
105
105
 
106
106
 
@@ -92,7 +92,7 @@ class Cyprus(HolidayBase, ChristianHolidays, InternationalHolidays):
92
92
  return None
93
93
 
94
94
  # Easter Tuesday.
95
- self._add_holiday_2_days_past_easter(tr("Τρίτη της Διακαινησίμου"))
95
+ self._add_easter_tuesday(tr("Τρίτη της Διακαινησίμου"))
96
96
 
97
97
  def _populate_optional_holidays(self):
98
98
  if self._year <= 1960:
@@ -51,7 +51,7 @@ class Djibouti(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHol
51
51
  # Christmas Day.
52
52
  self._add_christmas_day(tr("Noël"))
53
53
 
54
- # Isra and Miraj.
54
+ # Isra' and Mi'raj.
55
55
  self._add_isra_and_miraj_day(tr("Al Isra et Al Mirague"))
56
56
 
57
57
  # Eid al-Fitr.
@@ -0,0 +1,130 @@
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/python-holidays
11
+ # License: MIT (see LICENSE file)
12
+
13
+ from holidays.calendars.gregorian import JAN, JUL, SEP
14
+ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
15
+ from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON, SUN_TO_NEXT_TUE
16
+
17
+
18
+ class Dominica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
19
+ """
20
+ References:
21
+ - https://www.dominica.gov.dm/laws/chapters/chap19-10.pdf
22
+ - https://pressroomopm.gov.dm/notice-public-holiday-order-2022/
23
+ - https://en.wikipedia.org/wiki/Public_holidays_in_Dominica
24
+ - https://dominica.gov.dm/laws/1998/sro1-1998.pdf
25
+
26
+ Cross-Checked With:
27
+ - https://www.dominica-weekly.com/images/dominica-calendar-2010/1600-1280.jpg # 2010
28
+ - https://dominicaconsulategreece.com/dominica/public-holidays/ # 2011-2020
29
+ - http://www.q95da.com/news/q95-news-received-on-december-29-2020-at-731pm-the-official-public-holiday-calendar-for-2021-approved-by-the-government-of-dominica
30
+ - https://dominica.gov.dm/about-dominica/public-holidays # 2022-2024
31
+
32
+ While Labour Day is listed in the 1990 amendment as May 1st, this has, de facto, been
33
+ made 1st Monday of May since at least 2010.
34
+
35
+ Where in any year two public holidays fall on the same day, then the next succeeding day
36
+ not being itself a public holiday shall be observed as a public holiday. In practice, this
37
+ only applies to Holidays which falls on Saturday or Sunday.
38
+ """
39
+
40
+ country = "DM"
41
+ observed_label = "%s (observed)"
42
+
43
+ def __init__(self, *args, **kwargs):
44
+ ChristianHolidays.__init__(self)
45
+ InternationalHolidays.__init__(self)
46
+ StaticHolidays.__init__(self, DominicaStaticHolidays)
47
+ kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
48
+ super().__init__(*args, **kwargs)
49
+
50
+ def _populate_public_holidays(self):
51
+ # Public Holidays Act, L.I. 12 of 1990 Amendment.
52
+ if self._year <= 1989:
53
+ return None
54
+
55
+ # New Year's Day.
56
+ self._add_observed(self._add_new_years_day("New Year's Day"))
57
+
58
+ # Carnival Monday.
59
+ self._add_carnival_monday("Carnival Monday")
60
+
61
+ # Carnival Tuesday.
62
+ self._add_carnival_tuesday("Carnival Tuesday")
63
+
64
+ # Good Friday.
65
+ self._add_good_friday("Good Friday")
66
+
67
+ # Easter Monday.
68
+ self._add_easter_monday("Easter Monday")
69
+
70
+ # Labour Day.
71
+ labour_day_name = "Labour Day"
72
+ if self._year >= 2010:
73
+ self._add_holiday_1st_mon_of_may(labour_day_name)
74
+ else:
75
+ self._add_observed(self._add_labor_day(labour_day_name))
76
+
77
+ # Whit Monday.
78
+ self._add_whit_monday("Whit Monday")
79
+
80
+ first_monday_of_august_holiday_name = (
81
+ # Emancipation Day.
82
+ "Emancipation Day"
83
+ if self._year >= 1998
84
+ # First Monday of August.
85
+ else "First Monday of August"
86
+ )
87
+ self._add_holiday_1st_mon_of_aug(first_monday_of_august_holiday_name)
88
+
89
+ # Independence Day.
90
+ self._add_observed(self._add_holiday_nov_3("Independence Day"), rule=SUN_TO_NEXT_TUE)
91
+
92
+ # National Day of Community Service .
93
+ self._add_observed(self._add_holiday_nov_4("National Day of Community Service"))
94
+
95
+ # Christmas Day.
96
+ self._add_observed(self._add_christmas_day("Christmas Day"), rule=SUN_TO_NEXT_TUE)
97
+
98
+ # Boxing Day.
99
+ self._add_observed(self._add_christmas_day_two("Boxing Day"))
100
+
101
+
102
+ class DM(Dominica):
103
+ pass
104
+
105
+
106
+ class DMA(Dominica):
107
+ pass
108
+
109
+
110
+ class DominicaStaticHolidays:
111
+ """
112
+ References
113
+ - https://qppstudio-public-holidays-news.blogspot.com/2009/07/dominica-declares-july-28-public.html
114
+ - https://dominica.gov.dm/laws/2009/sro35-2009.pdf
115
+ - https://dominica.gov.dm/laws/2009/sro55-2009.pdf
116
+ - https://emonewsdm.com/thursday-september-19-2019-declared-public-holiday-in-dominica/
117
+ """
118
+
119
+ # Special Public Holidays.
120
+ special_public_holiday_name = "Special Public Holiday"
121
+
122
+ special_public_holidays = {
123
+ 2009: (
124
+ (JUL, 28, special_public_holiday_name),
125
+ (SEP, 3, special_public_holiday_name),
126
+ ),
127
+ 2010: (JAN, 4, special_public_holiday_name),
128
+ # Post-Hurricane Maria Thanksgiving Celebrations.
129
+ 2019: (SEP, 19, "Post-Hurricane Maria Thanksgiving Celebrations"),
130
+ }
@@ -10,10 +10,8 @@
10
10
  # Website: https://github.com/vacanza/python-holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
- from datetime import date
14
13
  from gettext import gettext as tr
15
14
 
16
- from holidays.calendars.gregorian import JUN
17
15
  from holidays.groups import ChristianHolidays, InternationalHolidays
18
16
  from holidays.observed_holiday_base import (
19
17
  ObservedHolidayBase,
@@ -39,11 +37,11 @@ class DominicanRepublic(ObservedHolidayBase, ChristianHolidays, InternationalHol
39
37
  kwargs.setdefault("observed_rule", TUE_WED_TO_PREV_MON + THU_FRI_TO_NEXT_MON)
40
38
  super().__init__(*args, **kwargs)
41
39
 
42
- def _is_observed(self, dt: date) -> bool:
43
- # Law No. 139-97 - Holidays Dominican Republic - Jun 27, 1997
44
- return dt >= date(1997, JUN, 27)
45
-
46
40
  def _populate_public_holidays(self):
41
+ # Law No. 139-97 - Holidays Dominican Republic (Jun 27, 1997).
42
+ if self._year <= 1997:
43
+ return None
44
+
47
45
  # New Year's Day.
48
46
  self._add_new_years_day(tr("Año Nuevo"))
49
47
 
@@ -72,12 +70,9 @@ class DominicanRepublic(ObservedHolidayBase, ChristianHolidays, InternationalHol
72
70
  self._add_corpus_christi_day(tr("Corpus Christi"))
73
71
 
74
72
  # Restoration Day.
75
- name = tr("Día de la Restauración")
76
- # Judgment No. 14 of Feb 20, 2008 of the Supreme Court of Justice
77
- if self._year <= 2007 and self._year % 4 == 0:
78
- self._add_holiday_aug_16(name)
79
- else:
80
- self._move_holiday(self._add_holiday_aug_16(name))
73
+ aug_16 = self._add_holiday_aug_16(tr("Día de la Restauración"))
74
+ if self._year % 4 != 0:
75
+ self._move_holiday(aug_16)
81
76
 
82
77
  # Our Lady of Mercedes Day.
83
78
  self._add_holiday_sep_24(tr("Día de las Mercedes"))
@@ -13,6 +13,7 @@
13
13
  from gettext import gettext as tr
14
14
 
15
15
  from holidays.calendars.gregorian import MAY, OCT
16
+ from holidays.constants import CATHOLIC, PUBLIC
16
17
  from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
17
18
  from holidays.holiday_base import HolidayBase
18
19
 
@@ -54,13 +55,14 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
54
55
 
55
56
  country = "DE"
56
57
  default_language = "de"
57
- supported_languages = ("de", "en_US", "uk")
58
+ supported_categories = (CATHOLIC, PUBLIC)
59
+ supported_languages = ("de", "en_US", "th", "uk")
58
60
  subdivisions = (
61
+ # ISO 3166-2:DE
59
62
  "BB",
60
63
  "BE",
61
64
  "BW",
62
65
  "BY",
63
- "BYP",
64
66
  "HB",
65
67
  "HE",
66
68
  "HH",
@@ -74,6 +76,25 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
74
76
  "ST",
75
77
  "TH",
76
78
  )
79
+ subdivisions_aliases = {
80
+ "Brandenburg": "BB",
81
+ "Berlin": "BE",
82
+ "Baden-Württemberg": "BW",
83
+ "Bayern": "BY",
84
+ "Bremen": "HB",
85
+ "Hessen": "HE",
86
+ "Hamburg": "HH",
87
+ "Mecklenburg-Vorpommern": "MV",
88
+ "Niedersachsen": "NI",
89
+ "Nordrhein-Westfalen": "NW",
90
+ "Rheinland-Pfalz": "RP",
91
+ "Schleswig-Holstein": "SH",
92
+ "Saarland": "SL",
93
+ "Sachsen": "SN",
94
+ "Sachsen-Anhalt": "ST",
95
+ "Thüringen": "TH",
96
+ }
97
+ _deprecated_subdivisions = ("BYP",)
77
98
 
78
99
  def __init__(self, *args, **kwargs) -> None:
79
100
  ChristianHolidays.__init__(self)
@@ -117,6 +138,9 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
117
138
  # Second Day of Christmas.
118
139
  self._add_christmas_day_two(tr("Zweiter Weihnachtstag"))
119
140
 
141
+ if self.subdiv == "BYP":
142
+ self._populate_subdiv_by_public_holidays()
143
+
120
144
  def _populate_subdiv_bb_public_holidays(self):
121
145
  if self._year <= 1989:
122
146
  return None
@@ -161,20 +185,14 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
161
185
  self._add_epiphany_day(tr("Heilige Drei Könige"))
162
186
  self._add_corpus_christi_day(tr("Fronleichnam"))
163
187
 
164
- # Assumption Day.
165
- self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
166
-
167
188
  self._add_all_saints_day(tr("Allerheiligen"))
168
189
 
169
- def _populate_subdiv_byp_public_holidays(self):
170
- if self._year <= 1989:
190
+ def _populate_subdiv_by_catholic_holidays(self):
191
+ if self._year <= 1990:
171
192
  return None
172
193
 
173
- if self._year >= 1991:
174
- self._add_epiphany_day(tr("Heilige Drei Könige"))
175
- self._add_corpus_christi_day(tr("Fronleichnam"))
176
-
177
- self._add_all_saints_day(tr("Allerheiligen"))
194
+ # Assumption Day.
195
+ self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
178
196
 
179
197
  def _populate_subdiv_hb_public_holidays(self):
180
198
  if self._year <= 1989: