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,8 @@
13
13
  from datetime import date
14
14
  from gettext import gettext as tr
15
15
 
16
- from holidays.calendars.gregorian import JAN, FEB, SEP, NOV, THU, FRI, SAT, _timedelta
16
+ from holidays.calendars import _CustomIslamicHolidays
17
+ from holidays.calendars.gregorian import SEP, NOV, THU, FRI, SAT, _timedelta
17
18
  from holidays.groups import IslamicHolidays, StaticHolidays
18
19
  from holidays.observed_holiday_base import (
19
20
  ObservedHolidayBase,
@@ -30,9 +31,10 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
30
31
  """Saudi Arabia holidays.
31
32
 
32
33
  References:
33
- * <https://laboreducation.hrsd.gov.sa/en/gallery/274>
34
+ * <https://ar.wikipedia.org/wiki/قائمة_العطل_الرسمية_في_السعودية>
34
35
  * <https://web.archive.org/web/20240610223551/http://laboreducation.hrsd.gov.sa/en/labor-education/322>
35
36
  * <https://web.archive.org/web/20250329052253/https://english.alarabiya.net/News/gulf/2022/01/27/Saudi-Arabia-to-commemorate-Founding-Day-on-Feb-22-annually-Royal-order>
37
+ * [2015 (1436 AH) Dhu al-Hijjah begin on September 15](https://web.archive.org/web/20250430191246/https://qna.org.qa/en/news/news-details?id=saudi-arabia-eid-aladha-to-start-on-september-24&date=14/09/2015)
36
38
  """
37
39
 
38
40
  country = "SA"
@@ -45,26 +47,29 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
45
47
  observed_estimated_label = tr("%s (المقدرة، ملاحظة)")
46
48
  supported_languages = ("ar", "en_US")
47
49
 
48
- def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
49
- """
50
+ def __init__(self, *args, islamic_show_estimated: bool = False, **kwargs):
51
+ """Saudi Arabia has traditionally used the Umm al-Qura calendar
52
+ for administrative purposes.
53
+
50
54
  Args:
51
55
  islamic_show_estimated:
52
56
  Whether to add "estimated" label to Islamic holidays name
53
57
  if holiday date is estimated.
54
58
  """
55
- IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
59
+ IslamicHolidays.__init__(
60
+ self, cls=SaudiArabiaIslamicHolidays, show_estimated=islamic_show_estimated
61
+ )
56
62
  StaticHolidays.__init__(self, SaudiArabiaStaticHolidays)
57
63
  kwargs.setdefault("observed_rule", FRI_TO_PREV_THU + SAT_TO_NEXT_SUN)
58
64
  super().__init__(*args, **kwargs)
59
65
 
60
- def _add_islamic_observed(self, dts: set[date]) -> None:
66
+ def _add_islamic_observed(self, dt: date) -> None:
61
67
  # Observed days are added to make up for any days falling on a weekend.
62
68
  if not self.observed:
63
69
  return None
64
70
  observed_rule = THU_FRI_TO_NEXT_WORKDAY if self._year <= 2012 else FRI_SAT_TO_NEXT_WORKDAY
65
- for dt in dts:
66
- for i in range(4):
67
- self._add_observed(_timedelta(dt, -i), name=self[dt], rule=observed_rule)
71
+ for i in range(4):
72
+ self._add_observed(_timedelta(dt, -i), name=self[dt], rule=observed_rule)
68
73
 
69
74
  def _populate_public_holidays(self):
70
75
  # Weekend used to be THU, FRI before June 28th, 2013.
@@ -77,36 +82,38 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
77
82
  )
78
83
  self.weekend = {THU, FRI} if self._year <= 2012 else {FRI, SAT}
79
84
 
80
- # Eid al-Fitr Holiday
85
+ # Eid al-Fitr Holiday.
81
86
  eid_al_fitr_name = tr("عطلة عيد الفطر")
82
- self._add_eid_al_fitr_day(eid_al_fitr_name)
87
+ eid_al_fitr_dates = self._add_eid_al_fitr_day(eid_al_fitr_name)
83
88
  self._add_eid_al_fitr_day_two(eid_al_fitr_name)
84
89
  self._add_eid_al_fitr_day_three(eid_al_fitr_name)
85
- self._add_islamic_observed(self._add_eid_al_fitr_day_four(eid_al_fitr_name))
86
90
 
87
- # Arafat Day
91
+ for dt in eid_al_fitr_dates:
92
+ if self._islamic_calendar._is_long_ramadan(dt):
93
+ # Add 30 Ramadan.
94
+ self._add_holiday(eid_al_fitr_name, _timedelta(dt, -1))
95
+ self._add_islamic_observed(_timedelta(dt, +2))
96
+ else:
97
+ # Add 4 Shawwal.
98
+ self._add_islamic_observed(self._add_holiday(eid_al_fitr_name, _timedelta(dt, +3)))
99
+
100
+ # Arafat Day.
88
101
  self._add_arafah_day(tr("يوم عرفة"))
89
- # Eid al-Adha Holiday
102
+
103
+ # Eid al-Adha Holiday.
90
104
  name = tr("عطلة عيد الأضحى")
91
105
  self._add_eid_al_adha_day(name)
92
106
  self._add_eid_al_adha_day_two(name)
93
- self._add_islamic_observed(self._add_eid_al_adha_day_three(name))
94
-
95
- # If National Day happens within the Eid al-Fitr Holiday or
96
- # Eid al-Adha Holiday, there is no extra holidays given for it.
97
- if self._year >= 2005:
98
- dt = date(self._year, SEP, 23)
99
- if dt not in self:
100
- # National Day Holiday
101
- self._add_observed(self._add_holiday(tr("اليوم الوطني"), dt))
107
+ for dt in self._add_eid_al_adha_day_three(name):
108
+ self._add_islamic_observed(dt)
102
109
 
103
- # If Founding Day happens within the Eid al-Fitr Holiday or
104
- # Eid al-Adha Holiday, there is no extra holidays given for it.
105
110
  if self._year >= 2022:
106
- dt = date(self._year, FEB, 22)
107
- if dt not in self:
108
- # Founding Day
109
- self._add_observed(self._add_holiday(tr("يوم التأسيسي"), dt))
111
+ # Founding Day.
112
+ self._add_observed(self._add_holiday_feb_22(tr("يوم التأسيسي")))
113
+
114
+ if self._year >= 2005:
115
+ # National Day.
116
+ self._add_observed(self._add_holiday_sep_23(tr("اليوم الوطني")))
110
117
 
111
118
 
112
119
  class SA(SaudiArabia):
@@ -117,13 +124,17 @@ class SAU(SaudiArabia):
117
124
  pass
118
125
 
119
126
 
127
+ class SaudiArabiaIslamicHolidays(_CustomIslamicHolidays):
128
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2001, 2025)
129
+ EID_AL_ADHA_DATES = {
130
+ 2015: (SEP, 24),
131
+ }
132
+
133
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2001, 2025)
134
+
135
+
120
136
  class SaudiArabiaStaticHolidays:
121
137
  special_public_holidays = {
122
- # Celebrate the country's win against Argentina in the World Cup
138
+ # Celebrate the country's win against Argentina in the World Cup.
123
139
  2022: (NOV, 23, tr("يوم وطني")),
124
140
  }
125
-
126
- special_public_holidays_observed = {
127
- # Eid al-Fitr Holiday
128
- 2001: (JAN, 1, tr("عطلة عيد الفطر")),
129
- }
@@ -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 MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, DEC
16
+ from holidays.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, OCT, DEC
17
17
  from holidays.groups import (
18
18
  ChristianHolidays,
19
19
  InternationalHolidays,
@@ -131,15 +131,13 @@ class SEN(Senegal):
131
131
 
132
132
  class SenegalIslamicHolidays(_CustomIslamicHolidays):
133
133
  # https://web.archive.org/web/20250609044648/https://www.timeanddate.com/holidays/senegal/tamkharit
134
+ ASHURA_DATES_CONFIRMED_YEARS = (2020, 2024)
134
135
  ASHURA_DATES = {
135
- 2020: (AUG, 29),
136
- 2021: (AUG, 18),
137
- 2022: (AUG, 8),
138
- 2023: (JUL, 28),
139
136
  2024: (JUL, 17),
140
137
  }
141
138
 
142
139
  # https://web.archive.org/web/20250609061446/https://www.timeanddate.com/holidays/senegal/grand-magal-de-touba
140
+ GRAND_MAGAL_OF_TOUBA_DATES_CONFIRMED_YEARS = (2020, 2024)
143
141
  GRAND_MAGAL_OF_TOUBA_DATES = {
144
142
  2020: (OCT, 6),
145
143
  2021: (SEP, 26),
@@ -149,27 +147,19 @@ class SenegalIslamicHolidays(_CustomIslamicHolidays):
149
147
  }
150
148
 
151
149
  # https://web.archive.org/web/20250609091559/https://www.timeanddate.com/holidays/senegal/maouloud
152
- MAWLID_DATES = {
153
- 2020: (OCT, 29),
154
- 2021: (OCT, 18),
155
- 2022: (OCT, 8),
156
- 2023: (SEP, 27),
157
- 2024: (SEP, 15),
158
- }
150
+ MAWLID_DATES_CONFIRMED_YEARS = (2020, 2024)
159
151
 
160
152
  # https://web.archive.org/web/20250609092813/https://www.timeanddate.com/holidays/senegal/korite
153
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2020, 2025)
161
154
  EID_AL_FITR_DATES = {
162
- 2020: (MAY, 24),
163
155
  2021: (MAY, 12),
164
156
  2022: (MAY, 1),
165
157
  2023: (APR, 22),
166
- 2024: (APR, 10),
167
- 2025: (MAR, 30),
168
158
  }
169
159
 
170
160
  # https://web.archive.org/web/20250609102658/https://www.timeanddate.com/holidays/senegal/tabaski
161
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2024)
171
162
  EID_AL_ADHA_DATES = {
172
- 2020: (JUL, 31),
173
163
  2021: (JUL, 21),
174
164
  2022: (JUL, 10),
175
165
  2023: (JUN, 29),
@@ -12,7 +12,7 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
- from holidays.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
15
+ from holidays.calendars.gregorian import JUN, AUG, NOV
16
16
  from holidays.calendars.islamic import _CustomIslamicHolidays
17
17
  from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
18
18
  from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY
@@ -115,35 +115,19 @@ class SierraLeoneIslamicHolidays(_CustomIslamicHolidays):
115
115
  * <https://web.archive.org/web/20250408204431/https://www.timeanddate.com/holidays/sierra-leone/>
116
116
  """
117
117
 
118
- # Prophet's Birthday
118
+ MAWLID_DATES_CONFIRMED_YEARS = (2018, 2024)
119
119
  MAWLID_DATES = {
120
120
  2018: (NOV, 21),
121
121
  2019: (NOV, 10),
122
- 2020: (OCT, 29),
123
- 2021: (OCT, 18),
124
- 2022: (OCT, 8),
125
- 2023: (SEP, 27),
126
- 2024: (SEP, 15),
127
122
  }
128
123
 
129
- # Eid al-Fitr
124
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2018, 2024)
130
125
  EID_AL_FITR_DATES = {
131
- 2018: (JUN, 15),
132
126
  2019: (JUN, 5),
133
- 2020: (MAY, 24),
134
- 2021: (MAY, 13),
135
- 2022: (MAY, 2),
136
- 2023: (APR, 21),
137
- 2024: (APR, 10),
138
127
  }
139
128
 
140
- # Eid al-Adha
129
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2018, 2024)
141
130
  EID_AL_ADHA_DATES = {
142
131
  2018: (AUG, 22),
143
132
  2019: (AUG, 12),
144
- 2020: (JUL, 31),
145
- 2021: (JUL, 20),
146
- 2022: (JUL, 9),
147
- 2023: (JUN, 28),
148
- 2024: (JUN, 16),
149
133
  }
@@ -182,33 +182,10 @@ class SingaporeBuddhistHolidays(_CustomBuddhistHolidays):
182
182
 
183
183
 
184
184
  class SingaporeChineseHolidays(_CustomChineseHolidays):
185
+ LUNAR_NEW_YEAR_DATES_CONFIRMED_YEARS = (2001, 2026)
185
186
  LUNAR_NEW_YEAR_DATES = {
186
- 2001: (JAN, 24),
187
- 2002: (FEB, 12),
188
- 2003: (FEB, 1),
189
- 2004: (JAN, 22),
190
- 2005: (FEB, 9),
191
187
  2006: (JAN, 30),
192
188
  2007: (FEB, 19),
193
- 2008: (FEB, 7),
194
- 2009: (JAN, 26),
195
- 2010: (FEB, 14),
196
- 2011: (FEB, 3),
197
- 2012: (JAN, 23),
198
- 2013: (FEB, 10),
199
- 2014: (JAN, 31),
200
- 2015: (FEB, 19),
201
- 2016: (FEB, 8),
202
- 2017: (JAN, 28),
203
- 2018: (FEB, 16),
204
- 2019: (FEB, 5),
205
- 2020: (JAN, 25),
206
- 2021: (FEB, 12),
207
- 2022: (FEB, 1),
208
- 2023: (JAN, 22),
209
- 2024: (FEB, 10),
210
- 2025: (JAN, 29),
211
- 2026: (FEB, 17),
212
189
  }
213
190
 
214
191
 
@@ -245,62 +222,29 @@ class SingaporeHinduHolidays(_CustomHinduHolidays):
245
222
 
246
223
 
247
224
  class SingaporeIslamicHolidays(_CustomIslamicHolidays):
248
- # Hari Raya Haji
225
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2001, 2026)
249
226
  EID_AL_ADHA_DATES = {
250
227
  2001: (MAR, 6),
251
228
  2002: (FEB, 23),
252
229
  2003: (FEB, 12),
253
- 2004: (FEB, 1),
254
- 2005: (JAN, 21),
255
- 2006: ((JAN, 10), (DEC, 31)),
256
- 2007: (DEC, 20),
257
- 2008: (DEC, 8),
258
- 2009: (NOV, 27),
259
230
  2010: (NOV, 17),
260
- 2011: (NOV, 6),
261
- 2012: (OCT, 26),
262
- 2013: (OCT, 15),
263
231
  2014: (OCT, 5),
264
232
  2015: (SEP, 24),
265
233
  2016: (SEP, 12),
266
- 2017: (SEP, 1),
267
234
  2018: (AUG, 22),
268
- 2019: (AUG, 11),
269
- 2020: (JUL, 31),
270
- 2021: (JUL, 20),
271
235
  2022: (JUL, 10),
272
236
  2023: (JUN, 29),
273
237
  2024: (JUN, 17),
274
238
  2025: (JUN, 7),
275
- 2026: (MAY, 27),
276
239
  }
277
240
 
278
- # Hari Raya Puasa
241
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2001, 2026)
279
242
  EID_AL_FITR_DATES = {
280
- 2001: (DEC, 16),
281
243
  2002: (DEC, 6),
282
- 2003: (NOV, 25),
283
- 2004: (NOV, 14),
284
- 2005: (NOV, 3),
285
244
  2006: (OCT, 24),
286
- 2007: (OCT, 13),
287
- 2008: (OCT, 1),
288
- 2009: (SEP, 20),
289
- 2010: (SEP, 10),
290
- 2011: (AUG, 30),
291
- 2012: (AUG, 19),
292
- 2013: (AUG, 8),
293
- 2014: (JUL, 28),
294
- 2015: (JUL, 17),
295
- 2016: (JUL, 6),
296
- 2017: (JUN, 25),
297
- 2018: (JUN, 15),
298
245
  2019: (JUN, 5),
299
- 2020: (MAY, 24),
300
- 2021: (MAY, 13),
301
246
  2022: (MAY, 3),
302
247
  2023: (APR, 22),
303
- 2024: (APR, 10),
304
248
  2025: (MAR, 31),
305
249
  2026: (MAR, 21),
306
250
  }
@@ -0,0 +1,160 @@
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 CONTRIBUTORS 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/holidays
11
+ # License: MIT (see LICENSE file)
12
+
13
+ from gettext import gettext as tr
14
+
15
+ from holidays.calendars.gregorian import APR, MAY, JUN, SEP, OCT, NOV
16
+ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
17
+ from holidays.observed_holiday_base import (
18
+ ObservedHolidayBase,
19
+ MON_TO_NEXT_TUE,
20
+ SAT_SUN_TO_NEXT_MON,
21
+ SAT_SUN_TO_NEXT_MON_TUE,
22
+ )
23
+
24
+
25
+ class SouthGeorgiaAndTheSouthSandwichIslands(
26
+ ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays
27
+ ):
28
+ """South Georgia and the South Sandwich Islands holidays.
29
+
30
+ References:
31
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_South_Georgia_and_the_South_Sandwich_Islands>
32
+ * [2012-2013](https://web.archive.org/web/20240810165616/https://laws.gov.gs/wp-content/uploads/2022/05/2012.pdf)
33
+ * [2014](https://web.archive.org/web/20250726194445/https://laws.gov.gs/wp-content/uploads/2022/05/2013.pdf)
34
+ * [2015](https://web.archive.org/web/20240810161237/https://laws.gov.gs/wp-content/uploads/2022/05/2014.pdf)
35
+ * [2016](https://web.archive.org/web/20250726193915/https://laws.gov.gs/wp-content/uploads/2022/05/2015.pdf)
36
+ * [2017](https://web.archive.org/web/20250726193700/https://laws.gov.gs/wp-content/uploads/2022/05/2016.pdf)
37
+ * [2018](https://web.archive.org/web/20240810175520/https://laws.gov.gs/wp-content/uploads/2022/05/2017.pdf)
38
+ * [2019](https://web.archive.org/web/20250726193031/https://laws.gov.gs/wp-content/uploads/2022/05/2018.pdf)
39
+ * [2020](https://web.archive.org/web/20250726192724/https://laws.gov.gs/wp-content/uploads/2022/05/2019.pdf)
40
+ * [2021](https://web.archive.org/web/20210911002738/https://www.gov.gs/docsarchive/Legislation/SGSSI%20Gazette%20No%202%20dated%2023%20December%202020.pdf)
41
+ * [2022](https://web.archive.org/web/20250727082227/https://laws.gov.gs/wp-content/uploads/2022/05/2021.pdf)
42
+ * [2023](https://web.archive.org/web/20240810165140/https://laws.gov.gs/wp-content/uploads/2024/03/Gazette2023.pdf)
43
+ * [2024](https://web.archive.org/web/20240810163638/https://laws.gov.gs/wp-content/uploads/2024/02/SGSSI-Gazette-No-1-dated-27-February-2024.pdf)
44
+ * [2025](https://web.archive.org/web/20250404025158/https://laws.gov.gs/wp-content/uploads/2025/01/SGSSI-Gazette-No-1-dated-30-January-2025.pdf)
45
+ """
46
+
47
+ country = "GS"
48
+ default_language = "en_GS"
49
+ # %s (observed).
50
+ observed_label = tr("%s (observed)")
51
+ supported_languages = ("en_GS", "en_US")
52
+ start_year = 2012
53
+
54
+ def __init__(self, *args, **kwargs):
55
+ ChristianHolidays.__init__(self)
56
+ InternationalHolidays.__init__(self)
57
+ StaticHolidays.__init__(self, SouthGeorgiaAndTheSouthSandwichIslandsStaticHolidays)
58
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
59
+ super().__init__(*args, **kwargs)
60
+
61
+ def _populate_public_holidays(self):
62
+ # New Year's Day.
63
+ self._add_observed(self._add_new_years_day(tr("New Year's Day")))
64
+
65
+ # Possession Day.
66
+ self._add_observed(self._add_holiday_jan_17(tr("Possession Day")))
67
+
68
+ # Good Friday.
69
+ self._add_good_friday(tr("Good Friday"))
70
+
71
+ if self._year <= 2019:
72
+ # Easter Monday.
73
+ self._add_easter_monday(tr("Easter Monday"))
74
+
75
+ if 2018 <= self._year <= 2022:
76
+ # The Queen's Birthday.
77
+ dt = self._add_holiday_apr_21(tr("The Queen's Birthday"))
78
+ if self._year not in {2019, 2020}:
79
+ self._add_observed(dt)
80
+
81
+ # Liberation Day.
82
+ name = tr("Liberation Day")
83
+ self._add_observed(
84
+ self._add_holiday_apr_25(name)
85
+ if self._year >= 2016
86
+ else self._add_holiday_apr_26(name)
87
+ )
88
+
89
+ if self._year >= 2015:
90
+ # Shackleton Day.
91
+ dt = self._add_holiday_may_20(tr("Shackleton Day"))
92
+ if self._year != 2023:
93
+ self._add_observed(dt)
94
+
95
+ # Mid-winter Day.
96
+ dt = self._add_holiday_jun_21(tr("Mid-winter Day"))
97
+ if self._year != 2025:
98
+ self._add_observed(dt)
99
+
100
+ if self._year <= 2021:
101
+ if self._year >= 2015:
102
+ # Toothfish Day.
103
+ self._add_observed(self._add_holiday_sep_4(tr("Toothfish Day")))
104
+ else:
105
+ # Toothfish (End of Season) Day.
106
+ dt = self._add_holiday_sep_14(tr("Toothfish (end of season) Day"))
107
+ if self._year != 2013:
108
+ self._add_observed(dt)
109
+
110
+ if self._year >= 2020:
111
+ # Environment Day.
112
+ dt = self._add_holiday_oct_30(tr("Environment Day"))
113
+ if self._year != 2021:
114
+ self._add_observed(dt)
115
+
116
+ # Placed before Christmas Day for proper observed calculation.
117
+ self._add_observed(
118
+ # Boxing Day.
119
+ self._add_christmas_day_two(tr("Boxing Day")),
120
+ rule=SAT_SUN_TO_NEXT_MON_TUE + MON_TO_NEXT_TUE,
121
+ )
122
+
123
+ # Christmas Day.
124
+ self._add_observed(self._add_christmas_day(tr("Christmas Day")))
125
+
126
+
127
+ class GS(SouthGeorgiaAndTheSouthSandwichIslands):
128
+ pass
129
+
130
+
131
+ class SGS(SouthGeorgiaAndTheSouthSandwichIslands):
132
+ pass
133
+
134
+
135
+ class SouthGeorgiaAndTheSouthSandwichIslandsStaticHolidays:
136
+ """South Georgia and the South Sandwich Islands special holidays."""
137
+
138
+ # The Queen's Platinum Jubilee.
139
+ queens_platinum_jubilee = tr("The Queen's Platinum Jubilee")
140
+
141
+ special_public_holidays = {
142
+ 2022: (
143
+ (JUN, 2, queens_platinum_jubilee),
144
+ (JUN, 3, queens_platinum_jubilee),
145
+ ),
146
+ 2023: (
147
+ # King Charles III's Coronation.
148
+ (MAY, 8, tr("Coronation of King Charles III")),
149
+ # King's Birthday.
150
+ (NOV, 14, tr("King's Birthday")),
151
+ ),
152
+ }
153
+
154
+ special_public_holidays_observed = {
155
+ 2013: (SEP, 13, tr("Toothfish (end of season) Day")),
156
+ 2019: (APR, 23, tr("The Queen's Birthday")),
157
+ 2021: (OCT, 29, tr("Environment Day")),
158
+ 2023: (MAY, 19, tr("Shackleton Day")),
159
+ 2025: (JUN, 20, tr("Mid-winter Day")),
160
+ }
@@ -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 MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
16
+ from holidays.calendars.gregorian import MAR, MAY, JUN, AUG, SEP, OCT, NOV
17
17
  from holidays.groups import (
18
18
  ChristianHolidays,
19
19
  IslamicHolidays,
@@ -717,28 +717,21 @@ class ESP(Spain):
717
717
 
718
718
 
719
719
  class SpainIslamicHolidays(_CustomIslamicHolidays):
720
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2010, 2025)
720
721
  EID_AL_ADHA_DATES = {
721
722
  2010: (NOV, 17),
722
- 2011: (NOV, 6),
723
723
  2012: (OCT, 25),
724
- 2013: (OCT, 15),
725
- 2014: (OCT, 4),
726
724
  2015: (SEP, 25),
727
725
  2016: (SEP, 12),
728
- 2017: (SEP, 1),
729
726
  2018: (AUG, 22),
730
727
  2019: (AUG, 12),
731
- 2020: (JUL, 31),
732
- 2021: (JUL, 20),
733
- 2022: (JUL, 9),
734
728
  2023: (JUN, 29),
735
729
  2024: (JUN, 17),
736
- 2025: (JUN, 6),
737
730
  }
738
731
 
732
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2022, 2025)
739
733
  EID_AL_FITR_DATES = {
740
734
  2022: (MAY, 3),
741
- 2023: (APR, 21),
742
735
  2025: (MAR, 31),
743
736
  }
744
737
 
@@ -289,10 +289,9 @@ class SriLankaHinduHolidays(_CustomHinduHolidays):
289
289
 
290
290
 
291
291
  class SriLankaIslamicHolidays(_CustomIslamicHolidays):
292
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2003, 2025)
292
293
  EID_AL_ADHA_DATES = {
293
294
  2003: (FEB, 12),
294
- 2004: (FEB, 1),
295
- 2005: (JAN, 21),
296
295
  2006: ((JAN, 11), (DEC, 31)),
297
296
  2007: (DEC, 21),
298
297
  2008: (DEC, 9),
@@ -306,7 +305,6 @@ class SriLankaIslamicHolidays(_CustomIslamicHolidays):
306
305
  2014: (OCT, 5),
307
306
  2015: (SEP, 24),
308
307
  2016: (SEP, 12),
309
- 2017: (SEP, 1),
310
308
  2018: (AUG, 22),
311
309
  2019: (AUG, 12),
312
310
  2020: (AUG, 1),
@@ -317,23 +315,17 @@ class SriLankaIslamicHolidays(_CustomIslamicHolidays):
317
315
  2025: (JUN, 7),
318
316
  }
319
317
 
318
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2003, 2025)
320
319
  EID_AL_FITR_DATES = {
321
320
  2003: (NOV, 26),
322
- 2004: (NOV, 14),
323
321
  2005: (NOV, 4),
324
322
  2006: (OCT, 24),
325
- 2007: (OCT, 13),
326
- 2008: (OCT, 1),
327
323
  2009: (SEP, 21),
328
- 2010: (SEP, 10),
329
324
  2011: (AUG, 31),
330
- 2012: (AUG, 19),
331
325
  2013: (AUG, 9),
332
326
  2014: (JUL, 29),
333
327
  2015: (JUL, 18),
334
- 2016: (JUL, 6),
335
328
  2017: (JUN, 26),
336
- 2018: (JUN, 15),
337
329
  2019: (JUN, 5),
338
330
  2020: (MAY, 25),
339
331
  2021: (MAY, 14),
@@ -343,25 +335,22 @@ class SriLankaIslamicHolidays(_CustomIslamicHolidays):
343
335
  2025: (MAR, 31),
344
336
  }
345
337
 
338
+ MAWLID_DATES_CONFIRMED_YEARS = (2003, 2025)
346
339
  MAWLID_DATES = {
347
340
  2003: (MAY, 14),
348
341
  2004: (MAY, 2),
349
342
  2005: (APR, 22),
350
343
  2006: (APR, 11),
351
344
  2007: (APR, 1),
352
- 2008: (MAR, 20),
353
345
  2009: (MAR, 10),
354
346
  2010: (FEB, 27),
355
347
  2011: (FEB, 16),
356
348
  2012: (FEB, 5),
357
349
  2013: (JAN, 25),
358
350
  2014: (JAN, 14),
359
- # Technically 2015 has both JAN 5 and DEC 24
360
- # but this is only observed for JAN 4.
361
351
  2015: (JAN, 4),
362
352
  2016: (DEC, 12),
363
353
  2017: (DEC, 1),
364
- 2018: (NOV, 20),
365
354
  2019: (NOV, 10),
366
355
  2020: (OCT, 30),
367
356
  2021: (OCT, 19),
@@ -14,7 +14,7 @@ from gettext import gettext as tr
14
14
 
15
15
  from holidays import HolidayBase
16
16
  from holidays.calendars import _CustomHinduHolidays, _CustomIslamicHolidays
17
- from holidays.calendars.gregorian import MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
17
+ from holidays.calendars.gregorian import MAR, APR, JUN, JUL, AUG, SEP, OCT, NOV
18
18
  from holidays.groups import (
19
19
  ChineseCalendarHolidays,
20
20
  ChristianHolidays,
@@ -142,6 +142,14 @@ class Suriname(
142
142
  self._add_chinese_new_years_day(tr("Chinees Nieuwjaar"))
143
143
 
144
144
 
145
+ class SR(Suriname):
146
+ pass
147
+
148
+
149
+ class SUR(Suriname):
150
+ pass
151
+
152
+
145
153
  class SurinameHinduHolidays(_CustomHinduHolidays):
146
154
  # https://web.archive.org/web/20241104221047/https://www.timeanddate.com/holidays/suriname/holi-phagwa
147
155
  HOLI_DATES = {
@@ -187,41 +195,25 @@ class SurinameHinduHolidays(_CustomHinduHolidays):
187
195
 
188
196
  class SurinameIslamicHolidays(_CustomIslamicHolidays):
189
197
  # https://web.archive.org/web/20241107062349/https://www.timeanddate.com/holidays/suriname/eid-al-fitr
198
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2014, 2025)
190
199
  EID_AL_FITR_DATES = {
191
200
  2014: (JUL, 29),
192
201
  2015: (JUL, 18),
193
202
  2016: (JUL, 7),
194
203
  2017: (JUN, 26),
195
- 2018: (JUN, 15),
196
204
  2019: (JUN, 5),
197
- 2020: (MAY, 24),
198
- 2021: (MAY, 13),
199
- 2022: (MAY, 2),
200
205
  2023: (APR, 22),
201
- 2024: (APR, 10),
202
206
  2025: (MAR, 31),
203
207
  }
204
208
 
205
209
  # https://web.archive.org/web/20241113121535/https://www.timeanddate.com/holidays/suriname/eid-al-adha
210
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2014, 2025)
206
211
  EID_AL_ADHA_DATES = {
207
212
  2014: (OCT, 5),
208
213
  2015: (SEP, 24),
209
214
  2016: (SEP, 13),
210
215
  2017: (SEP, 2),
211
- 2018: (AUG, 21),
212
216
  2019: (AUG, 12),
213
- 2020: (JUL, 31),
214
- 2021: (JUL, 20),
215
- 2022: (JUL, 9),
216
217
  2023: (JUN, 29),
217
- 2024: (JUN, 16),
218
218
  2025: (JUN, 7),
219
219
  }
220
-
221
-
222
- class SR(Suriname):
223
- pass
224
-
225
-
226
- class SUR(Suriname):
227
- pass