holidays 0.76__py3-none-any.whl → 0.78__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.
- holidays/calendars/islamic.py +32 -1
- holidays/countries/__init__.py +20 -0
- holidays/countries/australia.py +6 -8
- holidays/countries/british_virgin_islands.py +6 -6
- holidays/countries/cabo_verde.py +293 -0
- holidays/countries/cayman_islands.py +162 -0
- holidays/countries/central_african_republic.py +143 -0
- holidays/countries/christmas_island.py +215 -0
- holidays/countries/cocos_islands.py +4 -4
- holidays/countries/dr_congo.py +139 -0
- holidays/countries/egypt.py +203 -47
- holidays/countries/faroe_islands.py +102 -0
- holidays/countries/georgia.py +11 -5
- holidays/countries/germany.py +41 -0
- holidays/countries/gibraltar.py +219 -0
- holidays/countries/guernsey.py +6 -6
- holidays/countries/indonesia.py +5 -2
- holidays/countries/japan.py +6 -8
- holidays/countries/jersey.py +2 -2
- holidays/countries/lebanon.py +448 -0
- holidays/countries/luxembourg.py +13 -0
- holidays/countries/mali.py +151 -0
- holidays/countries/montserrat.py +177 -0
- holidays/countries/nepal.py +8 -8
- holidays/countries/new_zealand.py +2 -2
- holidays/countries/niue.py +115 -0
- holidays/countries/norfolk_island.py +129 -0
- holidays/countries/pakistan.py +7 -5
- holidays/countries/palau.py +1 -1
- holidays/countries/palestine.py +177 -0
- holidays/countries/peru.py +12 -0
- holidays/countries/pitcairn_islands.py +85 -0
- holidays/countries/saint_vincent_and_the_grenadines.py +130 -0
- holidays/countries/saudi_arabia.py +43 -35
- holidays/countries/seychelles.py +1 -1
- holidays/countries/solomon_islands.py +2 -2
- holidays/countries/tokelau.py +66 -0
- holidays/countries/turks_and_caicos_islands.py +2 -2
- holidays/countries/united_kingdom.py +2 -2
- holidays/countries/united_states.py +2 -5
- holidays/groups/christian.py +10 -10
- holidays/groups/hebrew.py +2 -2
- holidays/groups/islamic.py +17 -10
- holidays/holiday_base.py +73 -92
- holidays/locale/ar/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/{ar → ar_EG}/LC_MESSAGES/EG.mo +0 -0
- holidays/locale/da/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/de/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/de/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/de/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/en_CX/LC_MESSAGES/CX.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/GI.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/KY.mo +0 -0
- holidays/locale/en_MS/LC_MESSAGES/MS.mo +0 -0
- holidays/locale/en_NF/LC_MESSAGES/NF.mo +0 -0
- holidays/locale/en_NU/LC_MESSAGES/NU.mo +0 -0
- holidays/locale/en_TK/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CX.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/EG.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/VC.mo +0 -0
- holidays/locale/en_VC/LC_MESSAGES/VC.mo +0 -0
- holidays/locale/es/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/fo/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CD.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CF.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/EG.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/is/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/lb/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/no/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/pt_CV/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/sv/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/tkl/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/PE.mo +0 -0
- holidays/observed_holiday_base.py +3 -1
- holidays/registry.py +16 -0
- holidays/utils.py +18 -18
- holidays/version.py +1 -1
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/METADATA +118 -6
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/RECORD +106 -51
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/licenses/CONTRIBUTORS +4 -0
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/WHEEL +0 -0
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,448 @@
|
|
|
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 JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
|
|
17
|
+
from holidays.calendars.julian import JULIAN_CALENDAR
|
|
18
|
+
from holidays.constants import BANK, GOVERNMENT, PUBLIC
|
|
19
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
20
|
+
from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Lebanon(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
24
|
+
"""Lebanon holidays.
|
|
25
|
+
|
|
26
|
+
References:
|
|
27
|
+
* [Decree No. 35 of 1977](https://web.archive.org/web/20250704170408/http://legiliban.ul.edu.lb/LawArticles.aspx?LawTreeSectionID=204659&LawID=202420&language=ar)
|
|
28
|
+
* [Decree No. 2512 of 1985](https://web.archive.org/web/20250704170328/http://legiliban.ul.edu.lb/LawArticles.aspx?LawTreeSectionID=186992&LawID=184753&language=ar)
|
|
29
|
+
* [Decree No. 5112 of 1994](https://web.archive.org/web/20250704170257/http://legiliban.ul.edu.lb/LawArticles.aspx?LawTreeSectionID=173902&LawID=171663&language=ar)
|
|
30
|
+
* [Decree No. 15215 of 2005](https://web.archive.org/web/20250704170428/http://legiliban.ul.edu.lb/LawArticles.aspx?LawTreeSectionID=213954&LawID=211715&language=ar)
|
|
31
|
+
* [Decree No. 16237 of 2006](https://web.archive.org/web/20250704170424/http://legiliban.ul.edu.lb/LawArticles.aspx?LawTreeSectionID=215180&LawID=212941&language=ar)
|
|
32
|
+
* [Decree No. 3369 of 2010](https://web.archive.org/web/20250704170437/http://legiliban.ul.edu.lb/LawArticles.aspx?LawTreeSectionID=227216&LawID=224978&language=ar)
|
|
33
|
+
* <https://web.archive.org/web/20200925173058/https://www.abl.org.lb/english/abl-and-banking-sector-news/official-holidays>
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
country = "LB"
|
|
37
|
+
default_language = "ar"
|
|
38
|
+
# %s (estimated).
|
|
39
|
+
estimated_label = tr("%s (المقدرة)")
|
|
40
|
+
# %s (observed).
|
|
41
|
+
observed_label = tr("%s (يُحتفل به)")
|
|
42
|
+
# %s (observed, estimated).
|
|
43
|
+
observed_estimated_label = tr("%s (يُحتفل به، المقدرة)")
|
|
44
|
+
start_year = 1978
|
|
45
|
+
supported_categories = (BANK, GOVERNMENT, PUBLIC)
|
|
46
|
+
supported_languages = ("ar", "en_US")
|
|
47
|
+
|
|
48
|
+
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
49
|
+
"""
|
|
50
|
+
Args:
|
|
51
|
+
islamic_show_estimated:
|
|
52
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
53
|
+
if holiday date is estimated.
|
|
54
|
+
"""
|
|
55
|
+
ChristianHolidays.__init__(self)
|
|
56
|
+
InternationalHolidays.__init__(self)
|
|
57
|
+
IslamicHolidays.__init__(
|
|
58
|
+
self, cls=LebanonIslamicHolidays, show_estimated=islamic_show_estimated
|
|
59
|
+
)
|
|
60
|
+
super().__init__(*args, **kwargs)
|
|
61
|
+
|
|
62
|
+
def _populate_public_holidays(self):
|
|
63
|
+
# New Year's Day.
|
|
64
|
+
self._add_new_years_day(tr("رأس السنة الميلادية"))
|
|
65
|
+
|
|
66
|
+
if self._year >= 1995:
|
|
67
|
+
# Armenian Orthodox Christmas Day.
|
|
68
|
+
self._add_holiday_jan_6(tr("عيد الميلاد عند الطوائف الارمنية الارثوذكسية"))
|
|
69
|
+
|
|
70
|
+
# Saint Maron's Day.
|
|
71
|
+
self._add_holiday_feb_9(tr("عيد مار مارون"))
|
|
72
|
+
|
|
73
|
+
if 1995 <= self._year <= 2005 or self._year >= 2010:
|
|
74
|
+
# Feast of the Annunciation.
|
|
75
|
+
self._add_holiday_mar_25(tr("عيد بشارة السيدة مريم العذراء"))
|
|
76
|
+
|
|
77
|
+
# Catholic Good Friday.
|
|
78
|
+
catholic_good_friday = self._add_good_friday(tr("الجمعة العظيمة عند الطوائف الكاثوليكية"))
|
|
79
|
+
|
|
80
|
+
orthodox_good_friday = self._add_good_friday(
|
|
81
|
+
# Orthodox Good Friday.
|
|
82
|
+
tr("الجمعة العظيمة عند الطوائف الأرثوذكسية"),
|
|
83
|
+
calendar=JULIAN_CALENDAR,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
if orthodox_good_friday == catholic_good_friday:
|
|
87
|
+
# Orthodox Holy Saturday.
|
|
88
|
+
self._add_holy_saturday(tr("سبت النور للطائفة الأرثوذكسية"))
|
|
89
|
+
|
|
90
|
+
if 1986 <= self._year <= 1994:
|
|
91
|
+
catholic_easter_monday = self._add_easter_monday(
|
|
92
|
+
# Catholic Easter Monday.
|
|
93
|
+
tr("اثنين الفصح عند الطوائف الكاثوليكية")
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
orthodox_easter_monday = self._add_easter_monday(
|
|
97
|
+
# Orthodox Easter Monday.
|
|
98
|
+
tr("اثنين الفصح عند الطوائف الأرثوذكسية"),
|
|
99
|
+
calendar=JULIAN_CALENDAR,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
if catholic_easter_monday == orthodox_easter_monday:
|
|
103
|
+
# Orthodox Easter Tuesday.
|
|
104
|
+
self._add_easter_tuesday(tr("ثلاثاء الفصح للطوائف الأرثوذكسية"))
|
|
105
|
+
|
|
106
|
+
# Labor Day.
|
|
107
|
+
dt = self._add_labor_day(tr("عيد العمل"))
|
|
108
|
+
if self._year >= 1995:
|
|
109
|
+
self._add_observed(dt, rule=SUN_TO_NEXT_MON)
|
|
110
|
+
|
|
111
|
+
# Martyrs' Day.
|
|
112
|
+
name = tr("عيد الشهداء")
|
|
113
|
+
if self._year <= 1993:
|
|
114
|
+
self._add_holiday_1st_sun_from_may_6(name)
|
|
115
|
+
elif self._year >= 2006:
|
|
116
|
+
self._add_holiday_1st_sun_of_may(name)
|
|
117
|
+
|
|
118
|
+
if self._year >= 2006:
|
|
119
|
+
# Resistance and Liberation Day.
|
|
120
|
+
self._add_holiday_2nd_sun_of_may(tr("عيد المقاومة والتحرير"))
|
|
121
|
+
|
|
122
|
+
# Assumption Day.
|
|
123
|
+
self._add_assumption_of_mary_day(tr("عيد انتقال العذراء"))
|
|
124
|
+
|
|
125
|
+
if 1985 <= self._year <= 1993:
|
|
126
|
+
# All Saints' Day.
|
|
127
|
+
self._add_all_saints_day(tr("عيد جميع القديسين"))
|
|
128
|
+
|
|
129
|
+
# Independence Day.
|
|
130
|
+
self._add_holiday_nov_22(tr("ذكرى الاستقلال"))
|
|
131
|
+
|
|
132
|
+
# Christmas Day.
|
|
133
|
+
self._add_christmas_day(tr("عيد الميلاد"))
|
|
134
|
+
|
|
135
|
+
# Islamic New Year.
|
|
136
|
+
self._add_islamic_new_year_day(tr("عيد رأس السنة الهجرية"))
|
|
137
|
+
|
|
138
|
+
# Ashura.
|
|
139
|
+
self._add_ashura_day(tr("عاشوراء"))
|
|
140
|
+
|
|
141
|
+
# Prophet's Birthday.
|
|
142
|
+
self._add_mawlid_day(tr("ذكرى المولد النبوي الشريف"))
|
|
143
|
+
|
|
144
|
+
# Eid al-Fitr.
|
|
145
|
+
name = tr("عيد الفطر")
|
|
146
|
+
self._add_eid_al_fitr_day(name)
|
|
147
|
+
if self._year >= 1986:
|
|
148
|
+
self._add_eid_al_fitr_day_two(name)
|
|
149
|
+
if self._year <= 1994:
|
|
150
|
+
self._add_eid_al_fitr_day_three(name)
|
|
151
|
+
|
|
152
|
+
# Eid al-Adha.
|
|
153
|
+
name = tr("عيد الأضحى")
|
|
154
|
+
self._add_eid_al_adha_day(name)
|
|
155
|
+
self._add_eid_al_adha_day_two(name)
|
|
156
|
+
if 1986 <= self._year <= 1993:
|
|
157
|
+
self._add_eid_al_adha_day_three(name)
|
|
158
|
+
|
|
159
|
+
def _populate_bank_holidays(self):
|
|
160
|
+
if self._year >= 2020:
|
|
161
|
+
# Rafik Hariri Memorial Day.
|
|
162
|
+
self._add_holiday_feb_14(tr("يوم ذكرى رفيق الحريري"))
|
|
163
|
+
|
|
164
|
+
# Catholic Easter Monday.
|
|
165
|
+
self._add_easter_monday(tr("اثنين الفصح عند الطوائف الكاثوليكية"))
|
|
166
|
+
|
|
167
|
+
self._add_easter_monday(
|
|
168
|
+
# Orthodox Easter Monday.
|
|
169
|
+
tr("اثنين الفصح عند الطوائف الأرثوذكسية"),
|
|
170
|
+
calendar=JULIAN_CALENDAR,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
def _populate_government_holidays(self):
|
|
174
|
+
if self._year >= 2020:
|
|
175
|
+
# Rafik Hariri Memorial Day.
|
|
176
|
+
self._add_holiday_feb_14(tr("يوم ذكرى رفيق الحريري"))
|
|
177
|
+
|
|
178
|
+
if self._year >= 2021:
|
|
179
|
+
# Anniversary of the tragedy of Beirut port explosion.
|
|
180
|
+
self._add_holiday_aug_4(tr("ذكرى مأساة انفجار مرفأ بيروت"))
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class LB(Lebanon):
|
|
184
|
+
pass
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class LBN(Lebanon):
|
|
188
|
+
pass
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class LebanonIslamicHolidays(_CustomIslamicHolidays):
|
|
192
|
+
# https://web.archive.org/web/20250426220233/https://www.timeanddate.com/holidays/lebanon/first-day-ashura
|
|
193
|
+
ASHURA_DATES = {
|
|
194
|
+
1978: (DEC, 11),
|
|
195
|
+
1979: (NOV, 30),
|
|
196
|
+
1980: (NOV, 18),
|
|
197
|
+
1981: (NOV, 8),
|
|
198
|
+
1982: (OCT, 28),
|
|
199
|
+
1983: (OCT, 17),
|
|
200
|
+
1984: (OCT, 6),
|
|
201
|
+
1985: (SEP, 25),
|
|
202
|
+
1986: (SEP, 15),
|
|
203
|
+
1987: (SEP, 4),
|
|
204
|
+
1988: (AUG, 23),
|
|
205
|
+
1989: (AUG, 13),
|
|
206
|
+
1990: (AUG, 2),
|
|
207
|
+
1991: (JUL, 22),
|
|
208
|
+
1992: (JUL, 11),
|
|
209
|
+
1993: (JUN, 30),
|
|
210
|
+
1994: (JUN, 19),
|
|
211
|
+
1995: (JUN, 9),
|
|
212
|
+
1996: (MAY, 28),
|
|
213
|
+
1997: (MAY, 18),
|
|
214
|
+
1998: (MAY, 7),
|
|
215
|
+
1999: (APR, 26),
|
|
216
|
+
2000: (APR, 15),
|
|
217
|
+
2001: (APR, 4),
|
|
218
|
+
2002: (MAR, 24),
|
|
219
|
+
2003: (MAR, 14),
|
|
220
|
+
2004: (MAR, 2),
|
|
221
|
+
2005: (FEB, 19),
|
|
222
|
+
2006: (FEB, 9),
|
|
223
|
+
2007: (JAN, 29),
|
|
224
|
+
2008: (JAN, 19),
|
|
225
|
+
2009: ((JAN, 7), (DEC, 27)),
|
|
226
|
+
2010: (DEC, 17),
|
|
227
|
+
2011: (DEC, 6),
|
|
228
|
+
2012: (NOV, 24),
|
|
229
|
+
2013: (NOV, 14),
|
|
230
|
+
2014: (NOV, 3),
|
|
231
|
+
2015: (OCT, 24),
|
|
232
|
+
2016: (OCT, 12),
|
|
233
|
+
2017: (OCT, 1),
|
|
234
|
+
2018: (SEP, 21),
|
|
235
|
+
2019: (SEP, 10),
|
|
236
|
+
2020: (AUG, 30),
|
|
237
|
+
2021: (AUG, 19),
|
|
238
|
+
2022: (AUG, 9),
|
|
239
|
+
2023: (JUL, 28),
|
|
240
|
+
2024: (JUL, 16),
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
# https://web.archive.org/web/20250316072400/https://www.timeanddate.com/holidays/lebanon/eid-al-adha
|
|
244
|
+
EID_AL_ADHA_DATES = {
|
|
245
|
+
1978: (NOV, 11),
|
|
246
|
+
1979: (NOV, 1),
|
|
247
|
+
1980: (OCT, 20),
|
|
248
|
+
1981: (OCT, 9),
|
|
249
|
+
1982: (SEP, 29),
|
|
250
|
+
1983: (SEP, 18),
|
|
251
|
+
1984: (SEP, 6),
|
|
252
|
+
1985: (AUG, 27),
|
|
253
|
+
1986: (AUG, 16),
|
|
254
|
+
1987: (AUG, 6),
|
|
255
|
+
1988: (JUL, 25),
|
|
256
|
+
1989: (JUL, 14),
|
|
257
|
+
1990: (JUL, 4),
|
|
258
|
+
1991: (JUN, 23),
|
|
259
|
+
1992: (JUN, 11),
|
|
260
|
+
1993: (JUN, 1),
|
|
261
|
+
1994: (MAY, 21),
|
|
262
|
+
1995: (MAY, 10),
|
|
263
|
+
1996: (APR, 29),
|
|
264
|
+
1997: (APR, 18),
|
|
265
|
+
1998: (APR, 8),
|
|
266
|
+
1999: (MAR, 28),
|
|
267
|
+
2000: (MAR, 16),
|
|
268
|
+
2001: (MAR, 6),
|
|
269
|
+
2002: (FEB, 23),
|
|
270
|
+
2003: (FEB, 12),
|
|
271
|
+
2004: (FEB, 2),
|
|
272
|
+
2005: (JAN, 21),
|
|
273
|
+
2006: ((JAN, 10), (DEC, 31)),
|
|
274
|
+
2007: (DEC, 20),
|
|
275
|
+
2008: (DEC, 9),
|
|
276
|
+
2009: (NOV, 28),
|
|
277
|
+
2010: (NOV, 17),
|
|
278
|
+
2011: (NOV, 7),
|
|
279
|
+
2012: (OCT, 26),
|
|
280
|
+
2013: (OCT, 15),
|
|
281
|
+
2014: (OCT, 5),
|
|
282
|
+
2015: (SEP, 24),
|
|
283
|
+
2016: (SEP, 13),
|
|
284
|
+
2017: (SEP, 2),
|
|
285
|
+
2018: (AUG, 22),
|
|
286
|
+
2019: (AUG, 12),
|
|
287
|
+
2020: (JUL, 31),
|
|
288
|
+
2021: (JUL, 20),
|
|
289
|
+
2022: (JUL, 9),
|
|
290
|
+
2023: (JUN, 28),
|
|
291
|
+
2024: (JUN, 16),
|
|
292
|
+
2025: (JUN, 6),
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
# https://web.archive.org/web/20250216042303/https://www.timeanddate.com/holidays/lebanon/eid-al-fitr
|
|
296
|
+
EID_AL_FITR_DATES = {
|
|
297
|
+
1978: (SEP, 4),
|
|
298
|
+
1979: (AUG, 25),
|
|
299
|
+
1980: (AUG, 13),
|
|
300
|
+
1981: (AUG, 2),
|
|
301
|
+
1982: (JUL, 23),
|
|
302
|
+
1983: (JUL, 12),
|
|
303
|
+
1984: (JUN, 30),
|
|
304
|
+
1985: (JUN, 20),
|
|
305
|
+
1986: (JUN, 9),
|
|
306
|
+
1987: (MAY, 30),
|
|
307
|
+
1988: (MAY, 18),
|
|
308
|
+
1989: (MAY, 7),
|
|
309
|
+
1990: (APR, 27),
|
|
310
|
+
1991: (APR, 16),
|
|
311
|
+
1992: (APR, 4),
|
|
312
|
+
1993: (MAR, 25),
|
|
313
|
+
1994: (MAR, 14),
|
|
314
|
+
1995: (MAR, 3),
|
|
315
|
+
1996: (FEB, 21),
|
|
316
|
+
1997: (FEB, 9),
|
|
317
|
+
1998: (JAN, 30),
|
|
318
|
+
1999: (JAN, 19),
|
|
319
|
+
2000: ((JAN, 8), (DEC, 28)),
|
|
320
|
+
2001: (DEC, 17),
|
|
321
|
+
2002: (DEC, 6),
|
|
322
|
+
2003: (NOV, 26),
|
|
323
|
+
2004: (NOV, 14),
|
|
324
|
+
2005: (NOV, 4),
|
|
325
|
+
2006: (OCT, 24),
|
|
326
|
+
2007: (OCT, 13),
|
|
327
|
+
2008: (OCT, 2),
|
|
328
|
+
2009: (SEP, 21),
|
|
329
|
+
2010: (SEP, 10),
|
|
330
|
+
2011: (AUG, 31),
|
|
331
|
+
2012: (AUG, 19),
|
|
332
|
+
2013: (AUG, 8),
|
|
333
|
+
2014: (JUL, 29),
|
|
334
|
+
2015: (JUL, 17),
|
|
335
|
+
2016: (JUL, 7),
|
|
336
|
+
2017: (JUN, 26),
|
|
337
|
+
2018: (JUN, 15),
|
|
338
|
+
2019: (JUN, 4),
|
|
339
|
+
2020: (MAY, 24),
|
|
340
|
+
2021: (MAY, 13),
|
|
341
|
+
2022: (MAY, 2),
|
|
342
|
+
2023: (APR, 21),
|
|
343
|
+
2024: (APR, 10),
|
|
344
|
+
2025: (MAR, 30),
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
# https://web.archive.org/web/20250428034326/https://www.timeanddate.com/holidays/lebanon/muharram
|
|
348
|
+
HIJRI_NEW_YEAR_DATES = {
|
|
349
|
+
1978: (DEC, 2),
|
|
350
|
+
1979: (NOV, 21),
|
|
351
|
+
1980: (NOV, 9),
|
|
352
|
+
1981: (OCT, 30),
|
|
353
|
+
1982: (OCT, 19),
|
|
354
|
+
1983: (OCT, 8),
|
|
355
|
+
1984: (SEP, 27),
|
|
356
|
+
1985: (SEP, 16),
|
|
357
|
+
1986: (SEP, 6),
|
|
358
|
+
1987: (AUG, 26),
|
|
359
|
+
1988: (AUG, 14),
|
|
360
|
+
1989: (AUG, 4),
|
|
361
|
+
1990: (JUL, 24),
|
|
362
|
+
1991: (JUL, 13),
|
|
363
|
+
1992: (JUL, 2),
|
|
364
|
+
1993: (JUN, 21),
|
|
365
|
+
1994: (JUN, 10),
|
|
366
|
+
1995: (MAY, 31),
|
|
367
|
+
1996: (MAY, 19),
|
|
368
|
+
1997: (MAY, 9),
|
|
369
|
+
1998: (APR, 28),
|
|
370
|
+
1999: (APR, 17),
|
|
371
|
+
2000: (APR, 6),
|
|
372
|
+
2001: (MAR, 26),
|
|
373
|
+
2002: (MAR, 15),
|
|
374
|
+
2003: (MAR, 5),
|
|
375
|
+
2004: (FEB, 22),
|
|
376
|
+
2005: (FEB, 10),
|
|
377
|
+
2006: (JAN, 31),
|
|
378
|
+
2007: (JAN, 20),
|
|
379
|
+
2008: ((JAN, 10), (DEC, 29)),
|
|
380
|
+
2009: (DEC, 18),
|
|
381
|
+
2010: (DEC, 8),
|
|
382
|
+
2011: (NOV, 27),
|
|
383
|
+
2012: (NOV, 15),
|
|
384
|
+
2013: (NOV, 5),
|
|
385
|
+
2014: (OCT, 25),
|
|
386
|
+
2015: (OCT, 14),
|
|
387
|
+
2016: (OCT, 3),
|
|
388
|
+
2017: (SEP, 22),
|
|
389
|
+
2018: (SEP, 11),
|
|
390
|
+
2019: (AUG, 31),
|
|
391
|
+
2020: (AUG, 20),
|
|
392
|
+
2021: (AUG, 9),
|
|
393
|
+
2022: (JUL, 30),
|
|
394
|
+
2023: (JUL, 19),
|
|
395
|
+
2024: (JUL, 7),
|
|
396
|
+
2025: (JUN, 26),
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
# https://web.archive.org/web/20240908071444/https://www.timeanddate.com/holidays/lebanon/prophet-birthday
|
|
400
|
+
MAWLID_DATES = {
|
|
401
|
+
1978: (FEB, 20),
|
|
402
|
+
1979: (FEB, 10),
|
|
403
|
+
1980: (JAN, 30),
|
|
404
|
+
1981: (JAN, 18),
|
|
405
|
+
1982: ((JAN, 8), (DEC, 28)),
|
|
406
|
+
1983: (DEC, 17),
|
|
407
|
+
1984: (DEC, 6),
|
|
408
|
+
1985: (NOV, 25),
|
|
409
|
+
1986: (NOV, 15),
|
|
410
|
+
1987: (NOV, 4),
|
|
411
|
+
1988: (OCT, 23),
|
|
412
|
+
1989: (OCT, 13),
|
|
413
|
+
1990: (OCT, 2),
|
|
414
|
+
1991: (SEP, 21),
|
|
415
|
+
1992: (SEP, 10),
|
|
416
|
+
1993: (AUG, 30),
|
|
417
|
+
1994: (AUG, 19),
|
|
418
|
+
1995: (AUG, 9),
|
|
419
|
+
1996: (JUL, 28),
|
|
420
|
+
1997: (JUL, 18),
|
|
421
|
+
1998: (JUL, 7),
|
|
422
|
+
1999: (JUN, 26),
|
|
423
|
+
2000: (JUN, 15),
|
|
424
|
+
2001: (JUN, 4),
|
|
425
|
+
2002: (MAY, 24),
|
|
426
|
+
2003: (MAY, 14),
|
|
427
|
+
2004: (MAY, 2),
|
|
428
|
+
2005: (APR, 21),
|
|
429
|
+
2006: (APR, 11),
|
|
430
|
+
2007: (MAR, 31),
|
|
431
|
+
2008: (MAR, 20),
|
|
432
|
+
2009: (MAR, 9),
|
|
433
|
+
2010: (FEB, 26),
|
|
434
|
+
2011: (FEB, 16),
|
|
435
|
+
2012: (FEB, 5),
|
|
436
|
+
2013: (JAN, 24),
|
|
437
|
+
2014: (JAN, 14),
|
|
438
|
+
2015: ((JAN, 3), (DEC, 24)),
|
|
439
|
+
2016: (DEC, 12),
|
|
440
|
+
2017: (DEC, 1),
|
|
441
|
+
2018: (NOV, 20),
|
|
442
|
+
2019: (NOV, 9),
|
|
443
|
+
2020: (OCT, 29),
|
|
444
|
+
2021: (OCT, 18),
|
|
445
|
+
2022: (OCT, 8),
|
|
446
|
+
2023: (SEP, 27),
|
|
447
|
+
2024: (SEP, 15),
|
|
448
|
+
}
|
holidays/countries/luxembourg.py
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
|
+
from holidays.constants import BANK, PUBLIC
|
|
15
16
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
16
17
|
from holidays.holiday_base import HolidayBase
|
|
17
18
|
|
|
@@ -21,10 +22,12 @@ class Luxembourg(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
21
22
|
|
|
22
23
|
References:
|
|
23
24
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_Luxembourg>
|
|
25
|
+
* <https://web.archive.org/web/20250625132138/https://www.bcl.lu/en/About/Opening-days/index.html>
|
|
24
26
|
"""
|
|
25
27
|
|
|
26
28
|
country = "LU"
|
|
27
29
|
default_language = "lb"
|
|
30
|
+
supported_categories = (BANK, PUBLIC)
|
|
28
31
|
supported_languages = ("de", "en_US", "fr", "lb", "uk")
|
|
29
32
|
|
|
30
33
|
def __init__(self, *args, **kwargs):
|
|
@@ -67,6 +70,16 @@ class Luxembourg(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
67
70
|
# Saint Stephen's Day.
|
|
68
71
|
self._add_christmas_day_two(tr("Stiefesdag"))
|
|
69
72
|
|
|
73
|
+
def _populate_bank_holidays(self):
|
|
74
|
+
# Good Friday.
|
|
75
|
+
self._add_good_friday(tr("Karfreideg"))
|
|
76
|
+
|
|
77
|
+
# Christmas Eve (afternoon).
|
|
78
|
+
self._add_christmas_eve(tr("Hellegowend (nomëtteg)"))
|
|
79
|
+
|
|
80
|
+
# New Year's Eve.
|
|
81
|
+
self._add_new_years_eve(tr("Silvester"))
|
|
82
|
+
|
|
70
83
|
|
|
71
84
|
class LU(Luxembourg):
|
|
72
85
|
pass
|
|
@@ -0,0 +1,151 @@
|
|
|
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 JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
|
|
17
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
18
|
+
from holidays.holiday_base import HolidayBase
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Mali(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
22
|
+
"""Mali holidays.
|
|
23
|
+
|
|
24
|
+
References:
|
|
25
|
+
* [Ordinance no. 54 of 1960](https://web.archive.org/web/20250619193041/https://sgg-mali.ml/JO/1960/mali-jo-1960-71.pdf)
|
|
26
|
+
* [Law No. 28 of 1964](https://web.archive.org/web/20250619190638/https://sgg-mali.ml/JO/1964/mali-jo-1964-183.pdf)
|
|
27
|
+
* [Ordinance no. 16 of 1992](https://web.archive.org/web/20250611221453/https://sgg-mali.ml/JO/1992/mali-jo-1992-08.pdf)
|
|
28
|
+
* [Law No. 40 of 2005](https://web.archive.org/web/20250603120027/https://sgg-mali.ml/JO/2005/mali-jo-2005-25.pdf)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
country = "ML"
|
|
32
|
+
default_language = "fr"
|
|
33
|
+
# %s (estimated).
|
|
34
|
+
estimated_label = tr("%s (estimé)")
|
|
35
|
+
start_year = 1961
|
|
36
|
+
supported_languages = ("en_US", "fr")
|
|
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
|
+
IslamicHolidays.__init__(
|
|
47
|
+
self, cls=MaliIslamicHolidays, show_estimated=islamic_show_estimated
|
|
48
|
+
)
|
|
49
|
+
InternationalHolidays.__init__(self)
|
|
50
|
+
super().__init__(*args, **kwargs)
|
|
51
|
+
|
|
52
|
+
def _populate_public_holidays(self):
|
|
53
|
+
# New Year's Day.
|
|
54
|
+
self._add_new_years_day(tr("Jour de l'An"))
|
|
55
|
+
|
|
56
|
+
if self._year >= 1965:
|
|
57
|
+
# Armed Forces Day.
|
|
58
|
+
self._add_holiday_jan_20(tr("Journée de l'Armée"))
|
|
59
|
+
|
|
60
|
+
if self._year >= 1992:
|
|
61
|
+
# Martyrs' Day.
|
|
62
|
+
self._add_holiday_mar_26(tr("Journée du 26 mars"))
|
|
63
|
+
|
|
64
|
+
if self._year >= 2006:
|
|
65
|
+
# Easter Monday.
|
|
66
|
+
self._add_easter_monday(tr("Lundi de Pâques"))
|
|
67
|
+
|
|
68
|
+
# Labor Day.
|
|
69
|
+
self._add_labor_day(tr("Fête du Travail"))
|
|
70
|
+
|
|
71
|
+
if self._year >= 1965:
|
|
72
|
+
# Africa Day.
|
|
73
|
+
self._add_africa_day(tr("Journée de l'Afrique"))
|
|
74
|
+
|
|
75
|
+
# National Day of the Republic of Mali.
|
|
76
|
+
self._add_holiday_sep_22(tr("Fête Nationale de la République du Mali"))
|
|
77
|
+
|
|
78
|
+
# Christmas Day.
|
|
79
|
+
self._add_christmas_day(tr("Fête de Noël"))
|
|
80
|
+
|
|
81
|
+
self._add_mawlid_day(
|
|
82
|
+
# Prophet's Birthday.
|
|
83
|
+
tr("Journée du Maouloud (Naissance du Prophète)")
|
|
84
|
+
if self._year >= 2006
|
|
85
|
+
# Prophet's Birthday.
|
|
86
|
+
else tr("Journée du Mawloud")
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
if self._year >= 2006:
|
|
90
|
+
# Prophet's Baptism.
|
|
91
|
+
self._add_prophet_baptism_day(tr("Journée du Maouloud (Baptême du Prophète)"))
|
|
92
|
+
|
|
93
|
+
# Eid al-Fitr.
|
|
94
|
+
self._add_eid_al_fitr_day(tr("Journée de la Fête du Ramadan"))
|
|
95
|
+
|
|
96
|
+
# Eid al-Adha.
|
|
97
|
+
self._add_eid_al_adha_day(tr("Journée de la Tabaski"))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class ML(Mali):
|
|
101
|
+
pass
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class MLI(Mali):
|
|
105
|
+
pass
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class MaliIslamicHolidays(_CustomIslamicHolidays):
|
|
109
|
+
# https://web.archive.org/web/20250619042440/https://www.timeanddate.com/holidays/mali/eid-al-adha
|
|
110
|
+
EID_AL_ADHA_DATES = {
|
|
111
|
+
2015: (SEP, 24),
|
|
112
|
+
2016: (SEP, 13),
|
|
113
|
+
2017: (SEP, 2),
|
|
114
|
+
2018: (AUG, 22),
|
|
115
|
+
2019: (AUG, 11),
|
|
116
|
+
2020: (JUL, 31),
|
|
117
|
+
2021: (JUL, 21),
|
|
118
|
+
2022: (JUL, 9),
|
|
119
|
+
2023: (JUN, 28),
|
|
120
|
+
2024: (JUN, 17),
|
|
121
|
+
2025: (JUN, 7),
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# https://web.archive.org/web/20250318001443/https://www.timeanddate.com/holidays/mali/eid-al-fitr
|
|
125
|
+
EID_AL_FITR_DATES = {
|
|
126
|
+
2015: (JUL, 18),
|
|
127
|
+
2016: (JUL, 7),
|
|
128
|
+
2017: (JUN, 26),
|
|
129
|
+
2018: (JUN, 15),
|
|
130
|
+
2019: (JUN, 3),
|
|
131
|
+
2020: (MAY, 23),
|
|
132
|
+
2021: (MAY, 12),
|
|
133
|
+
2022: (MAY, 1),
|
|
134
|
+
2023: (APR, 21),
|
|
135
|
+
2024: (APR, 9),
|
|
136
|
+
2025: (MAR, 30),
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
# https://web.archive.org/web/20240424165412/https://www.timeanddate.com/holidays/mali/prophet-birthday
|
|
140
|
+
MAWLID_DATES = {
|
|
141
|
+
2015: ((JAN, 3), (DEC, 24)),
|
|
142
|
+
2016: (DEC, 12),
|
|
143
|
+
2017: (DEC, 1),
|
|
144
|
+
2018: (NOV, 21),
|
|
145
|
+
2019: (NOV, 10),
|
|
146
|
+
2020: (OCT, 29),
|
|
147
|
+
2021: (OCT, 19),
|
|
148
|
+
2022: (OCT, 9),
|
|
149
|
+
2023: (SEP, 28),
|
|
150
|
+
2024: (SEP, 16),
|
|
151
|
+
}
|