holidays 0.78__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 (105) 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 +16 -4
  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 +13 -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 +5 -37
  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/guinea.py +5 -27
  32. holidays/countries/guinea_bissau.py +100 -0
  33. holidays/countries/guyana.py +2 -17
  34. holidays/countries/india.py +12 -25
  35. holidays/countries/indonesia.py +6 -158
  36. holidays/countries/iran.py +16 -126
  37. holidays/countries/iraq.py +276 -0
  38. holidays/countries/kazakhstan.py +2 -18
  39. holidays/countries/kenya.py +2 -8
  40. holidays/countries/kiribati.py +124 -0
  41. holidays/countries/lebanon.py +5 -87
  42. holidays/countries/liberia.py +80 -0
  43. holidays/countries/libya.py +5 -37
  44. holidays/countries/malaysia.py +9 -130
  45. holidays/countries/mali.py +4 -9
  46. holidays/countries/mauritius.py +1 -2
  47. holidays/countries/montenegro.py +3 -18
  48. holidays/countries/nepal.py +42 -44
  49. holidays/countries/niger.py +14 -74
  50. holidays/countries/north_macedonia.py +3 -39
  51. holidays/countries/oman.py +6 -28
  52. holidays/countries/pakistan.py +5 -30
  53. holidays/countries/palestine.py +2 -5
  54. holidays/countries/philippines.py +3 -33
  55. holidays/countries/qatar.py +3 -45
  56. holidays/countries/saudi_arabia.py +3 -0
  57. holidays/countries/senegal.py +6 -16
  58. holidays/countries/sierra_leone.py +4 -20
  59. holidays/countries/singapore.py +3 -59
  60. holidays/countries/south_georgia_and_the_south_sandwich_islands.py +160 -0
  61. holidays/countries/spain.py +3 -10
  62. holidays/countries/sri_lanka.py +3 -14
  63. holidays/countries/suriname.py +11 -19
  64. holidays/countries/syrian_arab_republic.py +134 -0
  65. holidays/countries/tanzania.py +3 -9
  66. holidays/countries/timor_leste.py +2 -17
  67. holidays/countries/togo.py +4 -29
  68. holidays/countries/trinidad_and_tobago.py +2 -9
  69. holidays/countries/turkey.py +2 -116
  70. holidays/countries/turkmenistan.py +158 -0
  71. holidays/countries/united_arab_emirates.py +5 -29
  72. holidays/countries/uzbekistan.py +3 -31
  73. holidays/countries/yemen.py +8 -52
  74. holidays/groups/__init__.py +2 -0
  75. holidays/groups/christian.py +48 -12
  76. holidays/groups/international.py +17 -1
  77. holidays/groups/islamic.py +1 -1
  78. holidays/groups/mandaean.py +107 -0
  79. holidays/groups/tibetan.py +153 -0
  80. holidays/holiday_base.py +14 -0
  81. holidays/locale/ar/LC_MESSAGES/BH.mo +0 -0
  82. holidays/locale/ar/LC_MESSAGES/IQ.mo +0 -0
  83. holidays/locale/ar/LC_MESSAGES/SY.mo +0 -0
  84. holidays/locale/en_GM/LC_MESSAGES/GM.mo +0 -0
  85. holidays/locale/en_GS/LC_MESSAGES/GS.mo +0 -0
  86. holidays/locale/en_US/LC_MESSAGES/BH.mo +0 -0
  87. holidays/locale/en_US/LC_MESSAGES/CL.mo +0 -0
  88. holidays/locale/en_US/LC_MESSAGES/GM.mo +0 -0
  89. holidays/locale/en_US/LC_MESSAGES/GS.mo +0 -0
  90. holidays/locale/en_US/LC_MESSAGES/GW.mo +0 -0
  91. holidays/locale/en_US/LC_MESSAGES/IQ.mo +0 -0
  92. holidays/locale/en_US/LC_MESSAGES/SY.mo +0 -0
  93. holidays/locale/en_US/LC_MESSAGES/TM.mo +0 -0
  94. holidays/locale/pt_GW/LC_MESSAGES/GW.mo +0 -0
  95. holidays/locale/ru/LC_MESSAGES/TM.mo +0 -0
  96. holidays/locale/tk/LC_MESSAGES/TM.mo +0 -0
  97. holidays/locale/uk/LC_MESSAGES/CL.mo +0 -0
  98. holidays/registry.py +13 -0
  99. holidays/version.py +1 -1
  100. {holidays-0.78.dist-info → holidays-0.79.dist-info}/METADATA +68 -5
  101. {holidays-0.78.dist-info → holidays-0.79.dist-info}/RECORD +105 -78
  102. {holidays-0.78.dist-info → holidays-0.79.dist-info}/licenses/CONTRIBUTORS +2 -0
  103. {holidays-0.78.dist-info → holidays-0.79.dist-info}/WHEEL +0 -0
  104. {holidays-0.78.dist-info → holidays-0.79.dist-info}/licenses/LICENSE +0 -0
  105. {holidays-0.78.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
  }
@@ -13,23 +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 (
17
- JAN,
18
- MAR,
19
- APR,
20
- MAY,
21
- JUN,
22
- JUL,
23
- AUG,
24
- SEP,
25
- OCT,
26
- MON,
27
- TUE,
28
- WED,
29
- FRI,
30
- SAT,
31
- SUN,
32
- )
16
+ from holidays.calendars.gregorian import JAN, APR, MAY, JUL, AUG, SEP, MON, TUE, WED, FRI, SAT, SUN
33
17
  from holidays.calendars.julian import JULIAN_CALENDAR
34
18
  from holidays.constants import GOVERNMENT, PUBLIC, SCHOOL
35
19
  from holidays.groups import (
@@ -183,40 +167,24 @@ class EGY(Egypt):
183
167
 
184
168
 
185
169
  class EgyptIslamicHolidays(_CustomIslamicHolidays):
170
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
186
171
  EID_AL_ADHA_DATES = {
187
- 2020: (JUL, 31),
188
- 2021: (JUL, 20),
189
172
  2022: (JUL, 10),
190
- 2023: (JUN, 28),
191
- 2024: (JUN, 16),
192
- 2025: (JUN, 6),
193
173
  }
194
174
 
175
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2020, 2025)
195
176
  EID_AL_FITR_DATES = {
196
- 2020: (MAY, 24),
197
- 2021: (MAY, 13),
198
177
  2022: (MAY, 1),
199
- 2023: (APR, 21),
200
- 2024: (APR, 10),
201
- 2025: (MAR, 30),
202
178
  }
203
179
 
180
+ HIJRI_NEW_YEAR_DATES_CONFIRMED_YEARS = (2020, 2025)
204
181
  HIJRI_NEW_YEAR_DATES = {
205
- 2020: (AUG, 20),
206
182
  2021: (AUG, 11),
207
- 2022: (JUL, 30),
208
- 2023: (JUL, 19),
209
- 2024: (JUL, 7),
210
- 2025: (JUN, 26),
211
183
  }
212
184
 
185
+ MAWLID_DATES_CONFIRMED_YEARS = (2020, 2025)
213
186
  MAWLID_DATES = {
214
- 2020: (OCT, 29),
215
- 2021: (OCT, 18),
216
- 2022: (OCT, 8),
217
187
  2023: (SEP, 28),
218
- 2024: (SEP, 15),
219
- 2025: (SEP, 4),
220
188
  }
221
189
 
222
190
 
@@ -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
  }
@@ -0,0 +1,168 @@
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 import _CustomIslamicHolidays
16
+ from holidays.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
17
+ from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
18
+ from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_MON
19
+
20
+
21
+ class Gambia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
22
+ """Gambia holidays.
23
+
24
+ References:
25
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_the_Gambia>
26
+ * <https://web.archive.org/web/20230610113952/https://www.visitthegambia.gm/public-holidays/>
27
+ * <https://web.archive.org/web/20250803084358/https://www.op.gov.gm/media-advisory-public-holidays>
28
+ """
29
+
30
+ country = "GM"
31
+ default_language = "en_GM"
32
+ # %s (estimated).
33
+ estimated_label = tr("%s (estimated)")
34
+ # %s (observed).
35
+ observed_label = tr("%s (observed)")
36
+ # %s (observed, estimated).
37
+ observed_estimated_label = tr("%s (observed, estimated)")
38
+ start_year = 1966
39
+ supported_languages = ("en_GM", "en_US")
40
+
41
+ def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
42
+ """
43
+ Args:
44
+ islamic_show_estimated:
45
+ Whether to add "estimated" label to Islamic holidays name
46
+ if holiday date is estimated.
47
+ """
48
+ ChristianHolidays.__init__(self)
49
+ InternationalHolidays.__init__(self)
50
+ IslamicHolidays.__init__(
51
+ self, cls=GambiaIslamicHolidays, show_estimated=islamic_show_estimated
52
+ )
53
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
54
+ kwargs.setdefault("observed_since", 2021)
55
+ super().__init__(*args, **kwargs)
56
+
57
+ def _populate_public_holidays(self):
58
+ # New Year's Day.
59
+ self._add_observed(self._add_new_years_day(tr("New Year's Day")))
60
+
61
+ # Independence Day.
62
+ self._add_observed(self._add_holiday_feb_18(tr("Independence Day")))
63
+
64
+ # Good Friday.
65
+ self._add_good_friday(tr("Good Friday"))
66
+
67
+ # Easter Monday.
68
+ self._add_easter_monday(tr("Easter Monday"))
69
+
70
+ # Labor Day.
71
+ self._add_observed(self._add_labor_day(tr("Labour Day")))
72
+
73
+ # Africa Liberation Day.
74
+ self._add_observed(self._add_africa_day(tr("Africa Liberation Day")))
75
+
76
+ # July 22 Revolution Day.
77
+ self._add_observed(self._add_holiday_jul_22(tr("July 22 Revolution Day")))
78
+
79
+ # Assumption Day.
80
+ self._add_observed(self._add_assumption_of_mary_day(tr("Feast of the Assumption")))
81
+
82
+ # Christmas Day.
83
+ self._add_christmas_day(tr("Christmas Day"))
84
+
85
+ # Boxing Day.
86
+ self._add_observed(self._add_christmas_day_two(tr("Boxing Day")))
87
+
88
+ # Ashura.
89
+ for dt in self._add_ashura_day(tr("Yawmul Ashura")):
90
+ self._add_observed(dt)
91
+
92
+ # Prophet's Birthday.
93
+ for dt in self._add_mawlid_day(tr("Mawlid Nabi")):
94
+ self._add_observed(dt)
95
+
96
+ # Laylat al-Qadr.
97
+ for dt in self._add_laylat_al_qadr_day(tr("Lialat-Ul-Qadr")):
98
+ self._add_observed(dt)
99
+
100
+ # Eid al-Fitr.
101
+ name = tr("Koriteh")
102
+ self._add_eid_al_fitr_day(name)
103
+ if self._year >= 2021:
104
+ for dt in self._add_eid_al_fitr_day_two(name):
105
+ self._add_observed(dt)
106
+
107
+ # Eid al-Adha.
108
+ name = tr("Tobaski")
109
+ self._add_eid_al_adha_day(name)
110
+ if self._year >= 2021:
111
+ for dt in self._add_eid_al_adha_day_two(name):
112
+ self._add_observed(dt)
113
+
114
+
115
+ class GM(Gambia):
116
+ pass
117
+
118
+
119
+ class GMB(Gambia):
120
+ pass
121
+
122
+
123
+ class GambiaIslamicHolidays(_CustomIslamicHolidays):
124
+ # https://web.archive.org/web/20240716225449/https://www.timeanddate.com/holidays/gambia/ashura
125
+ ASHURA_DATES_CONFIRMED_YEARS = (2015, 2025)
126
+ ASHURA_DATES = {
127
+ 2015: (OCT, 24),
128
+ 2016: (OCT, 12),
129
+ 2017: (OCT, 1),
130
+ 2019: (SEP, 10),
131
+ 2021: (AUG, 19),
132
+ }
133
+
134
+ # https://web.archive.org/web/20241209170416/https://www.timeanddate.com/holidays/gambia/eid-al-adha
135
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2015, 2025)
136
+ EID_AL_ADHA_DATES = {
137
+ 2015: (SEP, 24),
138
+ 2016: (SEP, 13),
139
+ 2017: (SEP, 2),
140
+ 2018: (AUG, 22),
141
+ }
142
+
143
+ # https://web.archive.org/web/20241204114244/https://www.timeanddate.com/holidays/gambia/eid-al-fitr
144
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2015, 2025)
145
+ EID_AL_FITR_DATES = {
146
+ 2015: (JUL, 18),
147
+ 2016: (JUL, 7),
148
+ 2017: (JUN, 26),
149
+ 2020: (MAY, 23),
150
+ }
151
+
152
+ # https://web.archive.org/web/20241209070551/https://www.timeanddate.com/holidays/gambia/laylat-al-qadr
153
+ LAYLAT_AL_QADR_DATES_CONFIRMED_YEARS = (2015, 2025)
154
+ LAYLAT_AL_QADR_DATES = {
155
+ 2016: (JUL, 3),
156
+ 2022: (APR, 29),
157
+ }
158
+
159
+ # https://web.archive.org/web/20240909111449/https://www.timeanddate.com/holidays/gambia/prophet-birthday
160
+ MAWLID_DATES_CONFIRMED_YEARS = (2016, 2024)
161
+ MAWLID_DATES = {
162
+ 2016: (DEC, 12),
163
+ 2017: (DEC, 1),
164
+ 2018: (NOV, 21),
165
+ 2021: (OCT, 19),
166
+ 2023: (SEP, 28),
167
+ 2024: (SEP, 16),
168
+ }
@@ -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, DEC
16
+ from holidays.calendars.gregorian import MAR, APR, JUN, JUL, AUG, SEP, NOV, DEC
17
17
  from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
18
18
  from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON
19
19
 
@@ -125,58 +125,36 @@ class GIN(Guinea):
125
125
 
126
126
 
127
127
  class GuineaIslamicHolidays(_CustomIslamicHolidays):
128
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2015, 2025)
128
129
  EID_AL_ADHA_DATES = {
129
130
  2015: (SEP, 24),
130
131
  2016: (SEP, 13),
131
132
  2017: (SEP, 2),
132
133
  2018: (AUG, 22),
133
- 2019: (AUG, 11),
134
- 2020: (JUL, 31),
135
- 2021: (JUL, 20),
136
134
  2022: (JUL, 10),
137
- 2023: (JUN, 28),
138
- 2024: (JUN, 16),
139
135
  2025: (JUN, 7),
140
136
  }
141
137
 
138
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2015, 2025)
142
139
  EID_AL_FITR_DATES = {
143
140
  2015: (JUL, 18),
144
141
  2016: (JUL, 7),
145
142
  2017: (JUN, 26),
146
- 2018: (JUN, 15),
147
- 2019: (JUN, 4),
148
- 2020: (MAY, 24),
149
- 2021: (MAY, 13),
150
- 2022: (MAY, 2),
151
- 2023: (APR, 21),
152
- 2024: (APR, 10),
153
143
  2025: (MAR, 31),
154
144
  }
155
145
 
146
+ MAWLID_DATES_CONFIRMED_YEARS = (2015, 2025)
156
147
  MAWLID_DATES = {
157
148
  2015: (DEC, 24),
158
149
  2016: (DEC, 12),
159
150
  2017: (DEC, 1),
160
- 2018: (NOV, 20),
161
151
  2019: (NOV, 10),
162
- 2020: (OCT, 29),
163
- 2021: (OCT, 18),
164
- 2022: (OCT, 8),
165
- 2023: (SEP, 27),
166
- 2024: (SEP, 15),
167
152
  2025: (SEP, 5),
168
153
  }
169
154
 
155
+ LAYLAT_AL_QADR_DATES_CONFIRMED_YEARS = (2015, 2025)
170
156
  LAYLAT_AL_QADR_DATES = {
171
- 2015: (JUL, 14),
172
157
  2016: (JUL, 3),
173
- 2017: (JUN, 22),
174
158
  2018: (JUN, 12),
175
- 2019: (JUN, 1),
176
- 2020: (MAY, 20),
177
- 2021: (MAY, 9),
178
159
  2022: (APR, 29),
179
- 2023: (APR, 18),
180
- 2024: (APR, 6),
181
- 2025: (MAR, 27),
182
160
  }
@@ -0,0 +1,100 @@
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 import _CustomIslamicHolidays
16
+ from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
17
+ from holidays.holiday_base import HolidayBase
18
+
19
+
20
+ class GuineaBissau(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
21
+ """Guinea-Bissau holidays.
22
+
23
+ References:
24
+ * [Ley núm. 7/2022, de 18 de julio, que aprueba el Código del Trabajo](https://archive.org/details/742984686-co-digo-de-trabalho-lei-no-7-2022)
25
+ """
26
+
27
+ country = "GW"
28
+ default_language = "pt_GW"
29
+ # %s (estimated).
30
+ estimated_label = tr("%s (prevista)")
31
+ # %s (observed).
32
+ observed_label = tr("%s (ponte)")
33
+ # %s (estimated, observed).
34
+ observed_estimated_label = tr("%s (prevista, ponte)")
35
+ supported_languages = ("en_US", "pt_GW")
36
+ start_year = 2023
37
+
38
+ def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
39
+ """
40
+ Args:
41
+ islamic_show_estimated:
42
+ Whether to add "estimated" label to Islamic holidays name
43
+ if holiday date is estimated.
44
+ """
45
+ ChristianHolidays.__init__(self)
46
+ InternationalHolidays.__init__(self)
47
+ IslamicHolidays.__init__(
48
+ self, cls=GuineaBissauIslamicHolidays, show_estimated=islamic_show_estimated
49
+ )
50
+ super().__init__(*args, **kwargs)
51
+
52
+ def _populate_public_holidays(self):
53
+ # New Year's Day.
54
+ self._add_new_years_day(tr("Ano Novo"))
55
+
56
+ # National Heroes' Day.
57
+ self._add_holiday_jan_20(tr("Dia dos Heróis Nacionais"))
58
+
59
+ # Day of the Beginning of the Armed Struggle.
60
+ self._add_holiday_jan_23(tr("Dia do Início da Luta Armada"))
61
+
62
+ # International Women's Day.
63
+ self._add_womens_day(tr("Dia Internacional da Mulher"))
64
+
65
+ # Easter Sunday.
66
+ self._add_easter_sunday(tr("Páscoa"))
67
+
68
+ # Worker's Day.
69
+ self._add_labor_day(tr("Dia do Trabalhador"))
70
+
71
+ # Pidjiguiti Day.
72
+ self._add_holiday_aug_3(tr("Dia de Pidjiguiti"))
73
+
74
+ # Independence Day.
75
+ self._add_holiday_sep_24(tr("Dia da Independência"))
76
+
77
+ # Christmas Day.
78
+ self._add_christmas_day(tr("Dia de Natal"))
79
+
80
+ # Eid al-Fitr.
81
+ self._add_eid_al_fitr_day(tr("Korité"))
82
+
83
+ # Eid al-Adha.
84
+ self._add_eid_al_adha_day(tr("Tabaski"))
85
+
86
+
87
+ class GW(GuineaBissau):
88
+ pass
89
+
90
+
91
+ class GNB(GuineaBissau):
92
+ pass
93
+
94
+
95
+ class GuineaBissauIslamicHolidays(_CustomIslamicHolidays):
96
+ # http://web.archive.org/web/20250811201914/https://www.timeanddate.com/holidays/guinea-bissau/eid-al-adha
97
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2023, 2025)
98
+
99
+ # http://web.archive.org/web/20250811202225/https://www.timeanddate.com/holidays/guinea-bissau/eid-al-fitr
100
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2023, 2025)