holidays 0.55__py3-none-any.whl → 0.56__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. holidays/__init__.py +1 -1
  2. holidays/countries/__init__.py +2 -0
  3. holidays/countries/australia.py +1 -1
  4. holidays/countries/austria.py +10 -10
  5. holidays/countries/bosnia_and_herzegovina.py +8 -12
  6. holidays/countries/brunei.py +6 -0
  7. holidays/countries/cambodia.py +20 -3
  8. holidays/countries/canada.py +6 -6
  9. holidays/countries/croatia.py +1 -1
  10. holidays/countries/cyprus.py +1 -1
  11. holidays/countries/dominica.py +130 -0
  12. holidays/countries/dominican_republic.py +7 -12
  13. holidays/countries/haiti.py +134 -0
  14. holidays/countries/hongkong.py +1 -1
  15. holidays/countries/hungary.py +6 -0
  16. holidays/countries/ireland.py +6 -6
  17. holidays/countries/isle_of_man.py +1 -0
  18. holidays/countries/italy.py +113 -5
  19. holidays/countries/laos.py +24 -62
  20. holidays/countries/liechtenstein.py +1 -1
  21. holidays/countries/luxembourg.py +1 -1
  22. holidays/countries/malaysia.py +16 -38
  23. holidays/countries/malta.py +3 -3
  24. holidays/countries/new_zealand.py +68 -43
  25. holidays/countries/philippines.py +215 -26
  26. holidays/countries/portugal.py +7 -7
  27. holidays/countries/russia.py +382 -3
  28. holidays/countries/slovakia.py +1 -1
  29. holidays/countries/spain.py +8 -8
  30. holidays/countries/switzerland.py +3 -3
  31. holidays/countries/united_kingdom.py +12 -22
  32. holidays/countries/united_states.py +2 -2
  33. holidays/groups/christian.py +19 -0
  34. holidays/locale/ar/LC_MESSAGES/CA.mo +0 -0
  35. holidays/locale/ar/LC_MESSAGES/CA.po +6 -6
  36. holidays/locale/de/LC_MESSAGES/AT.po +6 -6
  37. holidays/locale/de/LC_MESSAGES/CH.po +3 -3
  38. holidays/locale/de/LC_MESSAGES/LI.po +1 -1
  39. holidays/locale/de/LC_MESSAGES/LU.po +1 -1
  40. holidays/locale/en_CA/LC_MESSAGES/CA.po +6 -6
  41. holidays/locale/en_US/LC_MESSAGES/AT.mo +0 -0
  42. holidays/locale/en_US/LC_MESSAGES/AT.po +14 -14
  43. holidays/locale/en_US/LC_MESSAGES/BG.mo +0 -0
  44. holidays/locale/en_US/LC_MESSAGES/BG.po +3 -3
  45. holidays/locale/en_US/LC_MESSAGES/CA.mo +0 -0
  46. holidays/locale/en_US/LC_MESSAGES/CA.po +11 -11
  47. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  48. holidays/locale/en_US/LC_MESSAGES/CH.po +9 -8
  49. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  50. holidays/locale/en_US/LC_MESSAGES/ES.po +16 -16
  51. holidays/locale/en_US/LC_MESSAGES/HR.mo +0 -0
  52. holidays/locale/en_US/LC_MESSAGES/HR.po +4 -4
  53. holidays/locale/en_US/LC_MESSAGES/HT.mo +0 -0
  54. holidays/locale/en_US/LC_MESSAGES/HT.po +127 -0
  55. holidays/locale/en_US/LC_MESSAGES/LI.mo +0 -0
  56. holidays/locale/en_US/LC_MESSAGES/LI.po +4 -4
  57. holidays/locale/en_US/LC_MESSAGES/LU.mo +0 -0
  58. holidays/locale/en_US/LC_MESSAGES/LU.po +4 -4
  59. holidays/locale/en_US/LC_MESSAGES/MT.mo +0 -0
  60. holidays/locale/en_US/LC_MESSAGES/MT.po +8 -8
  61. holidays/locale/en_US/LC_MESSAGES/PT.mo +0 -0
  62. holidays/locale/en_US/LC_MESSAGES/PT.po +16 -16
  63. holidays/locale/en_US/LC_MESSAGES/SK.mo +0 -0
  64. holidays/locale/en_US/LC_MESSAGES/SK.po +4 -4
  65. holidays/locale/es/LC_MESSAGES/ES.po +7 -7
  66. holidays/locale/es/LC_MESSAGES/HT.mo +0 -0
  67. holidays/locale/es/LC_MESSAGES/HT.po +127 -0
  68. holidays/locale/fr/LC_MESSAGES/CA.mo +0 -0
  69. holidays/locale/fr/LC_MESSAGES/CA.po +6 -6
  70. holidays/locale/fr/LC_MESSAGES/CH.po +3 -3
  71. holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
  72. holidays/locale/fr/LC_MESSAGES/LU.po +2 -2
  73. holidays/locale/fr_HT/LC_MESSAGES/HT.mo +0 -0
  74. holidays/locale/fr_HT/LC_MESSAGES/HT.po +127 -0
  75. holidays/locale/hr/LC_MESSAGES/HR.po +1 -1
  76. holidays/locale/ht/LC_MESSAGES/HT.mo +0 -0
  77. holidays/locale/ht/LC_MESSAGES/HT.po +127 -0
  78. holidays/locale/it/LC_MESSAGES/CH.po +3 -3
  79. holidays/locale/lb/LC_MESSAGES/LU.po +1 -1
  80. holidays/locale/mt/LC_MESSAGES/MT.po +3 -3
  81. holidays/locale/pt_PT/LC_MESSAGES/PT.po +7 -7
  82. holidays/locale/sk/LC_MESSAGES/SK.po +1 -1
  83. holidays/locale/th/LC_MESSAGES/CA.mo +0 -0
  84. holidays/locale/th/LC_MESSAGES/CA.po +6 -6
  85. holidays/locale/uk/LC_MESSAGES/AT.po +6 -6
  86. holidays/locale/uk/LC_MESSAGES/CH.po +3 -3
  87. holidays/locale/uk/LC_MESSAGES/ES.po +7 -7
  88. holidays/locale/uk/LC_MESSAGES/HR.po +1 -1
  89. holidays/locale/uk/LC_MESSAGES/LI.po +1 -1
  90. holidays/locale/uk/LC_MESSAGES/LU.po +1 -1
  91. holidays/locale/uk/LC_MESSAGES/PT.po +7 -7
  92. holidays/locale/uk/LC_MESSAGES/SK.po +1 -1
  93. holidays/registry.py +2 -0
  94. {holidays-0.55.dist-info → holidays-0.56.dist-info}/METADATA +17 -7
  95. {holidays-0.55.dist-info → holidays-0.56.dist-info}/RECORD +99 -89
  96. {holidays-0.55.dist-info → holidays-0.56.dist-info}/WHEEL +1 -1
  97. {holidays-0.55.dist-info → holidays-0.56.dist-info}/AUTHORS +0 -0
  98. {holidays-0.55.dist-info → holidays-0.56.dist-info}/LICENSE +0 -0
  99. {holidays-0.55.dist-info → holidays-0.56.dist-info}/top_level.txt +0 -0
holidays/__init__.py CHANGED
@@ -23,7 +23,7 @@ from holidays.holiday_base import *
23
23
  from holidays.registry import EntityLoader
24
24
  from holidays.utils import *
25
25
 
26
- __version__ = "0.55"
26
+ __version__ = "0.56"
27
27
 
28
28
 
29
29
  EntityLoader.load("countries", globals())
@@ -53,6 +53,7 @@ from .cyprus import Cyprus, CY, CYP
53
53
  from .czechia import Czechia, CZ, CZE
54
54
  from .denmark import Denmark, DK, DNK
55
55
  from .djibouti import Djibouti, DJ, DJI
56
+ from .dominica import Dominica, DM, DMA
56
57
  from .dominican_republic import DominicanRepublic, DO, DOM
57
58
  from .ecuador import Ecuador, EC, ECU
58
59
  from .egypt import Egypt, EG, EGY
@@ -70,6 +71,7 @@ from .greece import Greece, GR, GRC
70
71
  from .greenland import Greenland, GL, GRL
71
72
  from .guam import Guam, GU, GUM, HolidaysGU
72
73
  from .guatemala import Guatemala, GT, GUA
74
+ from .haiti import Haiti, HT, HTI
73
75
  from .honduras import Honduras, HN, HND
74
76
  from .hongkong import HongKong, HK, HKG
75
77
  from .hungary import Hungary, HU, HUN
@@ -696,7 +696,7 @@ class Australia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
696
696
 
697
697
  # Easter Tuesday.
698
698
  if self._year <= 2010:
699
- self._add_holiday_2_days_past_easter("Easter Tuesday")
699
+ self._add_easter_tuesday("Easter Tuesday")
700
700
 
701
701
  # ANZAC Day.
702
702
  if self._year >= 1921:
@@ -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
 
@@ -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.
@@ -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
@@ -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
@@ -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:
@@ -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"))
@@ -0,0 +1,134 @@
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 gettext import gettext as tr
14
+
15
+ from holidays.constants import OPTIONAL, PUBLIC
16
+ from holidays.groups import ChristianHolidays, InternationalHolidays
17
+ from holidays.holiday_base import HolidayBase
18
+
19
+
20
+ class Haiti(HolidayBase, ChristianHolidays, InternationalHolidays):
21
+ """
22
+ References:
23
+ - https://www.wipo.int/wipolex/en/legislation/details/7837
24
+ - https://haitiwonderland.com/haiti/histoire/jours-feries-en-haiti/27
25
+ - https://www.haiti-reference.info/pages/plan/generalites/calendrier-dhaiti/
26
+ """
27
+
28
+ country = "HT"
29
+ supported_categories = (OPTIONAL, PUBLIC)
30
+ default_language = "fr_HT"
31
+ supported_languages = ("en_US", "es", "fr_HT", "ht")
32
+
33
+ def __init__(self, *args, **kwargs):
34
+ ChristianHolidays.__init__(self)
35
+ InternationalHolidays.__init__(self)
36
+ super().__init__(*args, **kwargs)
37
+
38
+ def _populate_public_holidays(self):
39
+ # 1987 Constitution.
40
+ if self._year <= 1986:
41
+ return None
42
+
43
+ # ARTICLE 275.1 : National Holidays.
44
+ # Both Battle of Vertieres Day and Armed Forces Day are on Nov 18, declared discretely.
45
+
46
+ # National Independence Day.
47
+ self._add_holiday_jan_1(tr("Fête de l'Indépendance Nationale"))
48
+
49
+ # Ancestry Day.
50
+ self._add_holiday_jan_2(tr("Jour des Aïeux"))
51
+
52
+ # Agriculture and Labor Day.
53
+ self._add_labor_day(tr("Fête de l'Agriculture et du Travail"))
54
+
55
+ # Flag Day and University Day.
56
+ self._add_holiday_may_18(tr("Fête du Drapeau et de l'Université"))
57
+
58
+ # Commemoration of the Battle of Vertieres.
59
+ self._add_holiday_nov_18(tr("Commémoration de la Bataille de Vertières"))
60
+
61
+ # Armed Forces Day.
62
+ self._add_holiday_nov_18(tr("Jour des Forces Armées"))
63
+
64
+ # Other Common Holidays.
65
+
66
+ # New Year's Day.
67
+ self._add_new_years_day(tr("Nouvel An"))
68
+
69
+ # Carnival.
70
+ self._add_carnival_sunday(tr("Carnaval"))
71
+
72
+ # Shrove Monday.
73
+ self._add_carnival_monday(tr("Lundi Gras"))
74
+
75
+ # Fat Tuesday.
76
+ self._add_carnival_tuesday(tr("Mardi Gras"))
77
+
78
+ # Good Friday.
79
+ self._add_good_friday(tr("Vendredi Saint"))
80
+
81
+ # Easter.
82
+ self._add_easter_sunday(tr("Pâques"))
83
+
84
+ # Corpus Christi.
85
+ self._add_corpus_christi_day(tr("Fête-Dieu"))
86
+
87
+ # Assumption of Mary.
88
+ self._add_assumption_of_mary_day(tr("Assomption de Marie"))
89
+
90
+ # Death of Dessalines.
91
+ self._add_holiday_oct_17(tr("Mort de Dessalines"))
92
+
93
+ # All Saints' Day.
94
+ self._add_all_saints_day(tr("La Toussaint"))
95
+
96
+ # Day of the Dead.
97
+ self._add_all_souls_day(tr("Fête des Morts"))
98
+
99
+ # Christmas Day.
100
+ self._add_christmas_day(tr("Noël"))
101
+
102
+ def _populate_optional_holidays(self):
103
+ # 1987 Constitution.
104
+ if self._year <= 1986:
105
+ return None
106
+
107
+ # Ash Wednesday.
108
+ self._add_ash_wednesday(tr("Mercredi des Cendres"))
109
+
110
+ # Maundy Thursday.
111
+ self._add_holy_thursday(tr("Jeudi Saint"))
112
+
113
+ # National Sovereignty Day.
114
+ self._add_holiday_may_23(tr("Fête de la Souveraineté Nationale"))
115
+
116
+ # Feast of Lady of Perpetual Help, Patroness of Haiti.
117
+ self._add_holiday_jun_27(tr("Fête de Notre-Dame du Perpétuel Secours, patronne d'Haiti"))
118
+
119
+ # Ascension.
120
+ self._add_ascension_thursday(tr("Ascension"))
121
+
122
+ # Birth Anniversary of Jean-Jacques Dessalines.
123
+ self._add_holiday_sep_20(tr("Anniversaire de Naissance de Jean-Jacques Dessalines"))
124
+
125
+ # Discovery Day.
126
+ self._add_holiday_dec_5(tr("Jour de la Découverte"))
127
+
128
+
129
+ class HT(Haiti):
130
+ pass
131
+
132
+
133
+ class HTI(Haiti):
134
+ pass
@@ -277,7 +277,7 @@ class HongKong(
277
277
  # Easter Monday.
278
278
  if self._year >= 1968 and dt_qingming == self._easter_sunday:
279
279
  # 復活節星期一翌日.
280
- self._add_holiday_2_days_past_easter("The day following Easter Monday")
280
+ self._add_easter_tuesday("The day following Easter Monday")
281
281
  else:
282
282
  # 復活節星期一.
283
283
  self._add_easter_monday("Easter Monday")
@@ -39,6 +39,7 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
39
39
  - `2021 <https://njt.hu/jogszabaly/2020-14-20-7Q>`_
40
40
  - `2022 <https://njt.hu/jogszabaly/2021-23-20-7Q>`_
41
41
  - `2024 <https://njt.hu/jogszabaly/2023-15-20-8P>`_
42
+ - `2025 <https://njt.hu/jogszabaly/2024-11-20-2X>`_
42
43
  """
43
44
 
44
45
  country = "HU"
@@ -193,4 +194,9 @@ class HungaryStaticHolidays:
193
194
  (DEC, 24, DEC, 7),
194
195
  (DEC, 27, DEC, 14),
195
196
  ),
197
+ 2025: (
198
+ (MAY, 2, MAY, 17),
199
+ (OCT, 24, OCT, 18),
200
+ (DEC, 24, DEC, 13),
201
+ ),
196
202
  }
@@ -38,17 +38,17 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
38
38
  if self._year >= 1975:
39
39
  self._add_new_years_day("New Year's Day")
40
40
 
41
- # St. Brigid's Day.
41
+ # Saint Brigid's Day.
42
42
  if self._year >= 2023:
43
- name = "St. Brigid's Day"
43
+ name = "Saint Brigid's Day"
44
44
  if self._is_friday(FEB, 1):
45
45
  self._add_holiday_feb_1(name)
46
46
  else:
47
47
  self._add_holiday_1st_mon_from_feb_1(name)
48
48
 
49
- # St. Patrick's Day.
49
+ # Saint Patrick's Day.
50
50
  if self._year >= 1903:
51
- self._add_holiday_mar_17("St. Patrick's Day")
51
+ self._add_holiday_mar_17("Saint Patrick's Day")
52
52
 
53
53
  # Easter Monday.
54
54
  self._add_easter_monday("Easter Monday")
@@ -78,8 +78,8 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
78
78
  # Christmas Day.
79
79
  self._add_christmas_day("Christmas Day")
80
80
 
81
- # St. Stephen's Day.
82
- self._add_christmas_day_two("St. Stephen's Day")
81
+ # Saint Stephen's Day.
82
+ self._add_christmas_day_two("Saint Stephen's Day")
83
83
 
84
84
 
85
85
  class IE(Ireland):
@@ -20,6 +20,7 @@ class IsleOfMan(UnitedKingdom):
20
20
 
21
21
  country = "IM"
22
22
  subdivisions = () # Override UnitedKingdom subdivisions.
23
+ subdivisions_aliases = {} # Override UnitedKingdom subdivisions aliases.
23
24
 
24
25
  def __init__(self, *args, **kwargs): # Override UnitedKingdom __init__().
25
26
  ChristianHolidays.__init__(self)