holidays 0.77__py3-none-any.whl → 0.79__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 (121) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/chinese.py +14 -4
  3. holidays/calendars/ethiopian.py +31 -0
  4. holidays/calendars/islamic.py +48 -5
  5. holidays/calendars/julian.py +14 -0
  6. holidays/calendars/mandaean.py +59 -0
  7. holidays/calendars/tibetan.py +1466 -0
  8. holidays/constants.py +2 -0
  9. holidays/countries/__init__.py +14 -0
  10. holidays/countries/afghanistan.py +6 -39
  11. holidays/countries/albania.py +3 -22
  12. holidays/countries/argentina.py +3 -18
  13. holidays/countries/azerbaijan.py +6 -39
  14. holidays/countries/bahrain.py +29 -38
  15. holidays/countries/bhutan.py +194 -0
  16. holidays/countries/bosnia_and_herzegovina.py +2 -27
  17. holidays/countries/brunei.py +7 -117
  18. holidays/countries/burkina_faso.py +4 -15
  19. holidays/countries/cameroon.py +3 -34
  20. holidays/countries/canada.py +2 -1
  21. holidays/countries/central_african_republic.py +3 -16
  22. holidays/countries/chad.py +4 -17
  23. holidays/countries/chile.py +20 -4
  24. holidays/countries/christmas_island.py +4 -15
  25. holidays/countries/cocos_islands.py +5 -24
  26. holidays/countries/egypt.py +175 -51
  27. holidays/countries/ethiopia.py +18 -47
  28. holidays/countries/fiji.py +1 -2
  29. holidays/countries/gabon.py +3 -23
  30. holidays/countries/gambia.py +168 -0
  31. holidays/countries/germany.py +41 -0
  32. holidays/countries/guinea.py +5 -27
  33. holidays/countries/guinea_bissau.py +100 -0
  34. holidays/countries/guyana.py +2 -17
  35. holidays/countries/india.py +12 -25
  36. holidays/countries/indonesia.py +11 -160
  37. holidays/countries/iran.py +16 -126
  38. holidays/countries/iraq.py +276 -0
  39. holidays/countries/kazakhstan.py +2 -18
  40. holidays/countries/kenya.py +2 -8
  41. holidays/countries/kiribati.py +124 -0
  42. holidays/countries/lebanon.py +5 -87
  43. holidays/countries/liberia.py +80 -0
  44. holidays/countries/libya.py +5 -37
  45. holidays/countries/luxembourg.py +13 -0
  46. holidays/countries/malaysia.py +9 -130
  47. holidays/countries/mali.py +4 -9
  48. holidays/countries/mauritius.py +1 -2
  49. holidays/countries/montenegro.py +3 -18
  50. holidays/countries/nepal.py +42 -44
  51. holidays/countries/niger.py +14 -74
  52. holidays/countries/north_macedonia.py +3 -39
  53. holidays/countries/oman.py +6 -28
  54. holidays/countries/pakistan.py +12 -35
  55. holidays/countries/palestine.py +2 -5
  56. holidays/countries/philippines.py +3 -33
  57. holidays/countries/pitcairn_islands.py +85 -0
  58. holidays/countries/qatar.py +3 -45
  59. holidays/countries/saudi_arabia.py +46 -35
  60. holidays/countries/senegal.py +6 -16
  61. holidays/countries/sierra_leone.py +4 -20
  62. holidays/countries/singapore.py +3 -59
  63. holidays/countries/south_georgia_and_the_south_sandwich_islands.py +160 -0
  64. holidays/countries/spain.py +3 -10
  65. holidays/countries/sri_lanka.py +3 -14
  66. holidays/countries/suriname.py +11 -19
  67. holidays/countries/syrian_arab_republic.py +134 -0
  68. holidays/countries/tanzania.py +3 -9
  69. holidays/countries/timor_leste.py +2 -17
  70. holidays/countries/togo.py +4 -29
  71. holidays/countries/trinidad_and_tobago.py +2 -9
  72. holidays/countries/turkey.py +2 -116
  73. holidays/countries/turkmenistan.py +158 -0
  74. holidays/countries/united_arab_emirates.py +5 -29
  75. holidays/countries/uzbekistan.py +3 -31
  76. holidays/countries/yemen.py +8 -52
  77. holidays/groups/__init__.py +2 -0
  78. holidays/groups/christian.py +48 -12
  79. holidays/groups/international.py +17 -1
  80. holidays/groups/islamic.py +1 -11
  81. holidays/groups/mandaean.py +107 -0
  82. holidays/groups/tibetan.py +153 -0
  83. holidays/holiday_base.py +86 -91
  84. holidays/locale/ar/LC_MESSAGES/BH.mo +0 -0
  85. holidays/locale/ar/LC_MESSAGES/IQ.mo +0 -0
  86. holidays/locale/ar/LC_MESSAGES/SY.mo +0 -0
  87. holidays/locale/{ar → ar_EG}/LC_MESSAGES/EG.mo +0 -0
  88. holidays/locale/de/LC_MESSAGES/DE.mo +0 -0
  89. holidays/locale/de/LC_MESSAGES/LU.mo +0 -0
  90. holidays/locale/en_GM/LC_MESSAGES/GM.mo +0 -0
  91. holidays/locale/en_GS/LC_MESSAGES/GS.mo +0 -0
  92. holidays/locale/en_US/LC_MESSAGES/BH.mo +0 -0
  93. holidays/locale/en_US/LC_MESSAGES/CL.mo +0 -0
  94. holidays/locale/en_US/LC_MESSAGES/DE.mo +0 -0
  95. holidays/locale/en_US/LC_MESSAGES/EG.mo +0 -0
  96. holidays/locale/en_US/LC_MESSAGES/GM.mo +0 -0
  97. holidays/locale/en_US/LC_MESSAGES/GS.mo +0 -0
  98. holidays/locale/en_US/LC_MESSAGES/GW.mo +0 -0
  99. holidays/locale/en_US/LC_MESSAGES/IQ.mo +0 -0
  100. holidays/locale/en_US/LC_MESSAGES/LU.mo +0 -0
  101. holidays/locale/en_US/LC_MESSAGES/SY.mo +0 -0
  102. holidays/locale/en_US/LC_MESSAGES/TM.mo +0 -0
  103. holidays/locale/fr/LC_MESSAGES/EG.mo +0 -0
  104. holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
  105. holidays/locale/lb/LC_MESSAGES/LU.mo +0 -0
  106. holidays/locale/pt_GW/LC_MESSAGES/GW.mo +0 -0
  107. holidays/locale/ru/LC_MESSAGES/TM.mo +0 -0
  108. holidays/locale/th/LC_MESSAGES/DE.mo +0 -0
  109. holidays/locale/tk/LC_MESSAGES/TM.mo +0 -0
  110. holidays/locale/uk/LC_MESSAGES/CL.mo +0 -0
  111. holidays/locale/uk/LC_MESSAGES/DE.mo +0 -0
  112. holidays/locale/uk/LC_MESSAGES/LU.mo +0 -0
  113. holidays/registry.py +14 -0
  114. holidays/utils.py +18 -18
  115. holidays/version.py +1 -1
  116. {holidays-0.77.dist-info → holidays-0.79.dist-info}/METADATA +79 -9
  117. {holidays-0.77.dist-info → holidays-0.79.dist-info}/RECORD +121 -92
  118. {holidays-0.77.dist-info → holidays-0.79.dist-info}/licenses/CONTRIBUTORS +3 -0
  119. {holidays-0.77.dist-info → holidays-0.79.dist-info}/WHEEL +0 -0
  120. {holidays-0.77.dist-info → holidays-0.79.dist-info}/licenses/LICENSE +0 -0
  121. {holidays-0.77.dist-info → holidays-0.79.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,7 @@
13
13
  from gettext import gettext as tr
14
14
 
15
15
  from holidays.calendars import _CustomIslamicHolidays
16
- from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
16
+ from holidays.calendars.gregorian import JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
17
17
  from holidays.groups import (
18
18
  ChristianHolidays,
19
19
  InternationalHolidays,
@@ -167,47 +167,34 @@ class CocosIslands(
167
167
 
168
168
 
169
169
  class CocosIslandsIslamicHolidays(_CustomIslamicHolidays):
170
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = ((2007, 2010), (2019, 2025))
170
171
  EID_AL_ADHA_DATES = {
171
- 2007: (DEC, 20),
172
- 2008: (DEC, 8),
173
172
  2009: (NOV, 30),
174
- 2010: (NOV, 16),
175
173
  2013: (OCT, 15),
176
174
  2014: (OCT, 4),
177
175
  2016: (SEP, 13),
178
176
  2017: (SEP, 1),
179
- 2019: (AUG, 11),
180
- 2020: (JUL, 31),
181
- 2021: (JUL, 20),
182
- 2022: (JUL, 9),
183
- 2023: (JUN, 28),
184
177
  2024: (JUN, 17),
185
178
  2025: (JUN, 7),
186
179
  }
187
180
 
181
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = ((2007, 2010), (2019, 2025))
188
182
  EID_AL_FITR_DATES = {
189
183
  2007: (OCT, 15),
190
- 2008: (OCT, 1),
191
184
  2009: (SEP, 21),
192
- 2010: (SEP, 10),
193
185
  2013: (AUG, 8),
194
186
  2014: (JUL, 28),
195
187
  2016: (JUL, 6),
196
188
  2017: (JUN, 24),
197
189
  2019: (JUN, 5),
198
- 2020: (MAY, 24),
199
- 2021: (MAY, 13),
200
190
  2022: (MAY, 3),
201
- 2023: (APR, 21),
202
- 2024: (APR, 10),
203
191
  2025: (MAR, 31),
204
192
  }
205
193
 
194
+ HIJRI_NEW_YEAR_DATES_CONFIRMED_YEARS = (2007, 2010)
206
195
  HIJRI_NEW_YEAR_DATES = {
207
196
  2007: (JAN, 22),
208
197
  2008: (JAN, 10),
209
- 2009: (DEC, 18),
210
- 2010: (DEC, 7),
211
198
  2013: (NOV, 4),
212
199
  2014: (OCT, 25),
213
200
  2016: (OCT, 3),
@@ -215,20 +202,14 @@ class CocosIslandsIslamicHolidays(_CustomIslamicHolidays):
215
202
  2019: (SEP, 1),
216
203
  }
217
204
 
205
+ MAWLID_DATES_CONFIRMED_YEARS = ((2007, 2010), (2019, 2025))
218
206
  MAWLID_DATES = {
219
207
  2007: (APR, 2),
220
- 2008: (MAR, 20),
221
- 2009: (MAR, 9),
222
- 2010: (FEB, 26),
223
208
  2013: (JAN, 24),
224
209
  2014: (JAN, 13),
225
210
  2016: (DEC, 12),
226
211
  2017: (DEC, 1),
227
- 2019: (NOV, 9),
228
- 2020: (OCT, 29),
229
212
  2021: (OCT, 19),
230
- 2022: (OCT, 8),
231
- 2023: (SEP, 27),
232
213
  2024: (SEP, 16),
233
214
  2025: (SEP, 5),
234
215
  }
@@ -12,20 +12,47 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
- from holidays.calendars.gregorian import FRI, SAT
15
+ from holidays.calendars import _CustomIslamicHolidays
16
+ from holidays.calendars.gregorian import JAN, APR, MAY, JUL, AUG, SEP, MON, TUE, WED, FRI, SAT, SUN
16
17
  from holidays.calendars.julian import JULIAN_CALENDAR
17
- from holidays.groups import ChristianHolidays, IslamicHolidays, InternationalHolidays
18
- from holidays.holiday_base import HolidayBase
19
-
20
-
21
- class Egypt(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolidays):
22
- """Egypt holidays."""
18
+ from holidays.constants import GOVERNMENT, PUBLIC, SCHOOL
19
+ from holidays.groups import (
20
+ ChristianHolidays,
21
+ IslamicHolidays,
22
+ InternationalHolidays,
23
+ StaticHolidays,
24
+ )
25
+ from holidays.observed_holiday_base import ObservedHolidayBase, ObservedRule
26
+
27
+ EG_OBSERVED_RULE = ObservedRule({MON: +3, TUE: +2, WED: +1, SUN: +4})
28
+
29
+
30
+ class Egypt(
31
+ ObservedHolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolidays, StaticHolidays
32
+ ):
33
+ """Egypt holidays.
34
+
35
+ References:
36
+ * <https://ar.wikipedia.org/wiki/قائمة_العطل_الرسمية_في_مصر>
37
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Egypt>
38
+ * [National Holidays (Arabic)](https://web.archive.org/web/20250614072551/https://www.presidency.eg/ar/مصر/العطلات-الرسمية/)
39
+ * [National Holidays (English)](https://web.archive.org/web/20250529043734/https://www.presidency.eg/en/مصر/العطلات-الرسمية/)
40
+ * [National Holidays (French)](https://web.archive.org/web/20250608173134/https://www.presidency.eg/fr/مصر/العطلات-الرسمية/)
41
+ * [Ministerial Decision 1193](https://web.archive.org/web/20250423073350/https://manshurat.org/node/44922)
42
+ """
23
43
 
24
44
  country = "EG"
25
- default_language = "ar"
45
+ default_language = "ar_EG"
26
46
  # %s (estimated).
27
47
  estimated_label = tr("%s (المقدرة)")
28
- supported_languages = ("ar", "en_US")
48
+ # %s (observed).
49
+ observed_label = tr("%s (ملاحظة)")
50
+ # %s (observed, estimated).
51
+ observed_estimated_label = tr("%s (المقدرة، ملاحظة)")
52
+ # Republic of Egypt was declared on 18 June 1953.
53
+ start_year = 1954
54
+ supported_categories = (GOVERNMENT, PUBLIC, SCHOOL)
55
+ supported_languages = ("ar_EG", "en_US", "fr")
29
56
  weekend = {FRI, SAT}
30
57
 
31
58
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
@@ -37,67 +64,98 @@ class Egypt(HolidayBase, ChristianHolidays, IslamicHolidays, InternationalHolida
37
64
  """
38
65
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
39
66
  InternationalHolidays.__init__(self)
40
- IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
67
+ IslamicHolidays.__init__(
68
+ self, cls=EgyptIslamicHolidays, show_estimated=islamic_show_estimated
69
+ )
70
+ StaticHolidays.__init__(self, cls=EgyptStaticHolidays)
71
+ kwargs.setdefault("observed_rule", EG_OBSERVED_RULE)
72
+ kwargs.setdefault("observed_since", 2020)
41
73
  super().__init__(*args, **kwargs)
42
74
 
43
75
  def _populate_public_holidays(self):
44
- # New Year's Day.
45
- self._add_new_years_day(tr("رأس السنة الميلادية"))
46
-
47
- # Coptic Christmas Day.
48
- self._add_christmas_day(tr("عيد الميلاد المجيد (تقويم قبطي)"))
49
-
50
- if self._year >= 2012:
51
- # January 25th Revolution.
52
- self._add_holiday_jan_25(tr("عيد ثورة 25 يناير"))
53
- elif self._year >= 2009:
54
- # National Police Day.
55
- self._add_holiday_jan_25(tr("عيد الشرطة"))
56
-
57
- # Coptic Easter.
58
- self._add_easter_sunday(tr("عيد الفصح القبطي"))
76
+ if self._year >= 2002 and self._year not in {2022, 2023}:
77
+ # Coptic Christmas Day.
78
+ self._add_christmas_day(tr("عيد الميلاد المجيد"))
79
+
80
+ if self._year >= 2009:
81
+ self._move_holiday(
82
+ self._add_holiday_jan_25(
83
+ # January 25th Revolution and National Police Day.
84
+ tr("ثورة ٢٥ يناير وعيد الشرطة")
85
+ if self._year >= 2012
86
+ # National Police Day.
87
+ else tr("عيد الشرطة")
88
+ )
89
+ )
90
+
91
+ if self._year >= 1983:
92
+ # Sinai Liberation Day.
93
+ dt = self._add_holiday_apr_25(tr("عيد تحرير سيناء"))
94
+ if self._year != 2022:
95
+ self._move_holiday(dt)
59
96
 
60
97
  # Spring Festival.
61
- self._add_easter_monday(tr("شم النسيم"))
62
-
63
- if self._year > 1982:
64
- # Sinai Liberation Day.
65
- self._add_holiday_apr_25(tr("عيد تحرير سيناء"))
98
+ self._add_easter_monday(tr("عيد شم النسيم"))
66
99
 
67
100
  # Labor Day.
68
- self._add_labor_day(tr("عيد العمال"))
69
-
70
- # Armed Forces Day.
71
- self._add_holiday_oct_6(tr("عيد القوات المسلحة"))
101
+ if self._year != 2024:
102
+ self._move_holiday(self._add_labor_day(tr("عيد العمال")))
72
103
 
73
104
  if self._year >= 2014:
74
105
  # June 30 Revolution Day.
75
- self._add_holiday_jun_30(tr("عيد ثورة 30 يونيو"))
106
+ dt = self._add_holiday_jun_30(tr("عيد ثورة ٣٠ يونيو"))
107
+ if self._year != 2024:
108
+ self._move_holiday(dt)
109
+
110
+ # July 23 Revolution Day.
111
+ dt = self._add_holiday_jul_23(tr("عيد ثورة ٢٣ يوليو"))
112
+ if self._year != 2023:
113
+ self._move_holiday(dt)
114
+
115
+ # Armed Forces Day.
116
+ dt = self._add_holiday_oct_6(tr("عيد القوات المسلحة"))
117
+ if self._year != 2024:
118
+ self._move_holiday(dt)
119
+
120
+ # Islamic New Year.
121
+ for dt in self._add_islamic_new_year_day(tr("رأس السنة الهجرية")):
122
+ self._move_holiday(dt)
76
123
 
77
- if self._year > 1952:
78
- # July 23 Revolution Day.
79
- self._add_holiday_jul_23(tr("عيد ثورة 23 يوليو"))
124
+ # Prophet's Birthday.
125
+ self._add_mawlid_day(tr("المولد النبوي الشريف"))
80
126
 
81
127
  # Eid al-Fitr.
82
- self._add_eid_al_fitr_day(tr("عيد الفطر"))
83
- # Eid al-Fitr Holiday.
84
- self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر"))
85
- self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))
128
+ name = tr("عيد الفطر المبارك")
129
+ self._add_eid_al_fitr_day(name)
130
+ self._add_eid_al_fitr_day_two(name)
86
131
 
87
132
  # Arafat Day.
88
- self._add_arafah_day(tr("يوم عرفة"))
133
+ self._add_arafah_day(tr("وقفة عيد الأضحى المبارك"))
89
134
 
90
135
  # Eid al-Adha.
91
- self._add_eid_al_adha_day(tr("عيد الأضحى"))
92
- # Eid al-Adha Holiday.
93
- self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
94
- self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى"))
136
+ name = tr("عيد الأضحى المبارك")
137
+ self._add_eid_al_adha_day(name)
138
+ self._add_eid_al_adha_day_two(name)
139
+ self._add_eid_al_adha_day_three(name)
95
140
 
96
- # Islamic New Year.
97
- self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
141
+ def _populate_government_holidays(self):
142
+ if self._year >= 2019:
143
+ # Eid al-Fitr.
144
+ name = tr("عيد الفطر المبارك")
145
+ self._add_eid_al_fitr_eve(name)
146
+ self._add_eid_al_fitr_day_three(name)
98
147
 
99
- # Prophet's Birthday.
100
- self._add_mawlid_day(tr("عيد المولد النبوي"))
148
+ if self._year >= 2018:
149
+ # Eid al-Adha.
150
+ self._add_eid_al_adha_day_four(tr("عيد الأضحى المبارك"))
151
+
152
+ def _populate_school_holidays(self):
153
+ if self._year >= 2019:
154
+ # Taba Liberation Day.
155
+ self._add_holiday_mar_19(tr("عيد تحرير طابا"))
156
+
157
+ # Evacuation Day.
158
+ self._add_holiday_jun_18(tr("عيد الجلاء"))
101
159
 
102
160
 
103
161
  class EG(Egypt):
@@ -106,3 +164,69 @@ class EG(Egypt):
106
164
 
107
165
  class EGY(Egypt):
108
166
  pass
167
+
168
+
169
+ class EgyptIslamicHolidays(_CustomIslamicHolidays):
170
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
171
+ EID_AL_ADHA_DATES = {
172
+ 2022: (JUL, 10),
173
+ }
174
+
175
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2020, 2025)
176
+ EID_AL_FITR_DATES = {
177
+ 2022: (MAY, 1),
178
+ }
179
+
180
+ HIJRI_NEW_YEAR_DATES_CONFIRMED_YEARS = (2020, 2025)
181
+ HIJRI_NEW_YEAR_DATES = {
182
+ 2021: (AUG, 11),
183
+ }
184
+
185
+ MAWLID_DATES_CONFIRMED_YEARS = (2020, 2025)
186
+ MAWLID_DATES = {
187
+ 2023: (SEP, 28),
188
+ }
189
+
190
+
191
+ class EgyptStaticHolidays:
192
+ """Egypt special holidays.
193
+
194
+ References:
195
+ * [2022 Coptic Christmas](https://web.archive.org/web/20240227004025/https://english.ahram.org.eg/NewsContent/1/2/454491/Egypt/Society/Thursday-paid-day-off-at-public-sector-in-Egypt-fo.aspx)
196
+ """
197
+
198
+ # Coptic Christmas Day.
199
+ coptic_christmas_day = tr("عيد الميلاد المجيد")
200
+
201
+ # Eid al-Adha.
202
+ eid_al_adha = tr("عيد الأضحى المبارك")
203
+
204
+ # Eid al-Fitr.
205
+ eid_al_fitr = tr("عيد الفطر المبارك")
206
+
207
+ special_public_holidays = {
208
+ 2021: (
209
+ (JUL, 17, eid_al_adha),
210
+ (JUL, 18, eid_al_adha),
211
+ ),
212
+ 2022: (
213
+ (JUL, 13, eid_al_adha),
214
+ (JUL, 14, eid_al_adha),
215
+ ),
216
+ }
217
+
218
+ special_public_holidays_observed = {
219
+ 2022: (
220
+ (JAN, 6, coptic_christmas_day),
221
+ (MAY, 4, eid_al_fitr),
222
+ ),
223
+ 2023: (
224
+ (JAN, 8, coptic_christmas_day),
225
+ (APR, 24, eid_al_fitr),
226
+ # June 30 Revolution Day.
227
+ (JUL, 2, tr("عيد ثورة ٣٠ يونيو")),
228
+ (JUL, 3, eid_al_adha),
229
+ ),
230
+ # Labor Day.
231
+ 2024: (MAY, 5, tr("عيد العمال")),
232
+ }
@@ -10,12 +10,11 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
- from calendar import isleap
14
13
  from gettext import gettext as tr
15
14
 
16
15
  from holidays.calendars import _CustomIslamicHolidays
17
- from holidays.calendars.gregorian import JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
18
- from holidays.calendars.julian import JULIAN_CALENDAR
16
+ from holidays.calendars.ethiopian import ETHIOPIAN_CALENDAR, is_ethiopian_leap_year
17
+ from holidays.calendars.gregorian import AUG, SEP, NOV
19
18
  from holidays.constants import PUBLIC, WORKDAY
20
19
  from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
21
20
  from holidays.holiday_base import HolidayBase
@@ -30,7 +29,7 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
30
29
  * <https://web.archive.org/web/20250427173714/https://www.edarabia.com/ethiopia/public-holidays/>
31
30
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Ethiopia>
32
31
  * <https://en.wikipedia.org/wiki/Nations,_Nationalities_and_Peoples'_Day>
33
- * <https://web.archive.org/web/20250408213218/https://www.timeanddate.com/holidays/ethiopia/>
32
+ * <https://web.archive.org/web/20250811041201/https://www.timeanddate.com/holidays/ethiopia/2025>
34
33
  """
35
34
 
36
35
  country = "ET"
@@ -42,22 +41,6 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
42
41
  supported_categories = (PUBLIC, WORKDAY)
43
42
  supported_languages = ("am", "ar", "en_ET", "en_US")
44
43
 
45
- def _is_leap_year(self) -> bool:
46
- """Determine if the Ethiopian calendar year is a leap year.
47
-
48
- Ethiopian leap years generally align with Gregorian leap years until
49
- February 2100. However, the Ethiopian calendar starts earlier (on September 11),
50
- which affects holidays between September 11 and January 1.
51
-
52
- To account for this shift, the method checks whether next year is a leap year
53
- in the Gregorian calendar.
54
-
55
- Returns:
56
- `True` if the Ethiopian year is a leap year, `False` otherwise.
57
- """
58
-
59
- return isleap(self._year + 1)
60
-
61
44
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
62
45
  """
63
46
  Args:
@@ -65,7 +48,7 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
65
48
  Whether to add "estimated" label to Islamic holidays name
66
49
  if holiday date is estimated.
67
50
  """
68
- ChristianHolidays.__init__(self, JULIAN_CALENDAR)
51
+ ChristianHolidays.__init__(self, ETHIOPIAN_CALENDAR)
69
52
  InternationalHolidays.__init__(self)
70
53
  IslamicHolidays.__init__(
71
54
  self, cls=EthiopiaIslamicHolidays, show_estimated=islamic_show_estimated
@@ -77,7 +60,7 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
77
60
  self._add_christmas_day(tr("የገና ወይም የልደት በዓል"))
78
61
 
79
62
  # Epiphany.
80
- self._add_holiday(tr("የጥምቀት በዓል"), JAN, 20 if super()._is_leap_year() else 19)
63
+ self._add_epiphany_day(tr("የጥምቀት በዓል"))
81
64
 
82
65
  if self._year >= 1996:
83
66
  # Adwa Victory Day.
@@ -100,14 +83,19 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
100
83
  self._add_holiday_may_28(tr("ደርግ የወደቀበት ቀን"))
101
84
 
102
85
  # Ethiopian New Year.
103
- self._add_holiday(tr("የዘመን መለወጫ (እንቁጣጣሽ) በዓል"), SEP, 12 if self._is_leap_year() else 11)
86
+ self._add_ethiopian_new_year(tr("የዘመን መለወጫ (እንቁጣጣሽ) በዓል"))
104
87
 
105
88
  # Finding of True Cross.
106
- self._add_holiday(tr("የመስቀል በዓል"), SEP, 28 if self._is_leap_year() else 27)
89
+ self._add_finding_of_true_cross(tr("የመስቀል በዓል"))
107
90
 
108
91
  if self._year <= 1990:
109
- # Popular Revolution Commemoration Day.
110
- self._add_holiday(tr("የአብዮት ቀን"), SEP, 13 if self._is_leap_year() else 12)
92
+ # Julian Date Drift shouldn't affect this one.
93
+ self._add_holiday(
94
+ # Popular Revolution Commemoration Day.
95
+ tr("የአብዮት ቀን"),
96
+ SEP,
97
+ 13 if is_ethiopian_leap_year(self._year) else 12,
98
+ )
111
99
 
112
100
  # October Revolution Day.
113
101
  self._add_holiday_nov_7(tr("የጥቅምት አብዮት ቀን"))
@@ -139,33 +127,16 @@ class ETH(Ethiopia):
139
127
 
140
128
 
141
129
  class EthiopiaIslamicHolidays(_CustomIslamicHolidays):
130
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2018, 2025)
142
131
  EID_AL_ADHA_DATES = {
143
132
  2018: (AUG, 22),
144
- 2019: (AUG, 11),
145
- 2020: (JUL, 31),
146
- 2021: (JUL, 20),
147
- 2022: (JUL, 9),
148
- 2023: (JUN, 28),
149
- 2024: (JUN, 16),
150
133
  }
151
134
 
152
- EID_AL_FITR_DATES = {
153
- 2018: (JUN, 15),
154
- 2019: (JUN, 4),
155
- 2020: (MAY, 24),
156
- 2021: (MAY, 13),
157
- 2022: (MAY, 2),
158
- 2023: (APR, 21),
159
- 2024: (APR, 10),
160
- 2025: (MAR, 30),
161
- }
135
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2018, 2025)
162
136
 
137
+ MAWLID_DATES_CONFIRMED_YEARS = (2018, 2025)
163
138
  MAWLID_DATES = {
164
139
  2018: (NOV, 21),
165
140
  2019: (NOV, 10),
166
- 2020: (OCT, 29),
167
- 2021: (OCT, 18),
168
- 2022: (OCT, 8),
169
- 2023: (SEP, 27),
170
- 2024: (SEP, 15),
141
+ 2025: (SEP, 5),
171
142
  }
@@ -169,13 +169,12 @@ class FijiHinduHolidays(_CustomHinduHolidays):
169
169
 
170
170
 
171
171
  class FijiIslamicHolidays(_CustomIslamicHolidays):
172
+ MAWLID_DATES_CONFIRMED_YEARS = (2016, 2025)
172
173
  MAWLID_DATES = {
173
174
  2016: (DEC, 12),
174
175
  2017: (DEC, 2),
175
176
  2018: (NOV, 19),
176
- 2019: (NOV, 9),
177
177
  2020: (OCT, 31),
178
- 2021: (OCT, 18),
179
178
  2022: (OCT, 7), # looks like observed on FRI
180
179
  2023: (SEP, 30),
181
180
  2024: (SEP, 16),
@@ -11,7 +11,7 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from holidays.calendars import _CustomIslamicHolidays
14
- from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
14
+ from holidays.calendars.gregorian import FEB, MAR, JUN, JUL, AUG, SEP, OCT, NOV, DEC
15
15
  from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
16
16
  from holidays.holiday_base import HolidayBase
17
17
 
@@ -93,55 +93,35 @@ class GAB(Gabon):
93
93
 
94
94
 
95
95
  class GabonIslamicHolidays(_CustomIslamicHolidays):
96
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2001, 2023)
96
97
  EID_AL_ADHA_DATES = {
97
98
  2001: (MAR, 6),
98
99
  2002: (FEB, 23),
99
100
  2003: (FEB, 12),
100
101
  2004: (FEB, 2),
101
- 2005: (JAN, 21),
102
- 2006: ((JAN, 10), (DEC, 31)),
103
- 2007: (DEC, 20),
104
102
  2008: (DEC, 9),
105
103
  2009: (NOV, 28),
106
104
  2010: (NOV, 17),
107
105
  2011: (NOV, 7),
108
- 2012: (OCT, 26),
109
- 2013: (OCT, 15),
110
106
  2014: (OCT, 5),
111
107
  2015: (SEP, 24),
112
108
  2016: (SEP, 13),
113
109
  2017: (SEP, 2),
114
110
  2018: (AUG, 22),
115
- 2019: (AUG, 11),
116
- 2020: (JUL, 31),
117
- 2021: (JUL, 20),
118
- 2022: (JUL, 9),
119
- 2023: (JUN, 28),
120
111
  }
121
112
 
113
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2001, 2024)
122
114
  EID_AL_FITR_DATES = {
123
115
  2001: (DEC, 17),
124
116
  2002: (DEC, 6),
125
117
  2003: (NOV, 26),
126
- 2004: (NOV, 14),
127
118
  2005: (NOV, 4),
128
119
  2006: (OCT, 24),
129
- 2007: (OCT, 13),
130
120
  2008: (OCT, 2),
131
121
  2009: (SEP, 21),
132
- 2010: (SEP, 10),
133
122
  2011: (AUG, 31),
134
- 2012: (AUG, 19),
135
- 2013: (AUG, 8),
136
123
  2014: (JUL, 29),
137
124
  2015: (JUL, 18),
138
125
  2016: (JUL, 7),
139
126
  2017: (JUN, 26),
140
- 2018: (JUN, 15),
141
- 2019: (JUN, 4),
142
- 2020: (MAY, 24),
143
- 2021: (MAY, 13),
144
- 2022: (MAY, 2),
145
- 2023: (APR, 21),
146
- 2024: (APR, 10),
147
127
  }