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.
- holidays/calendars/__init__.py +1 -0
- holidays/calendars/chinese.py +14 -4
- holidays/calendars/ethiopian.py +31 -0
- holidays/calendars/islamic.py +48 -5
- holidays/calendars/julian.py +14 -0
- holidays/calendars/mandaean.py +59 -0
- holidays/calendars/tibetan.py +1466 -0
- holidays/constants.py +2 -0
- holidays/countries/__init__.py +14 -0
- holidays/countries/afghanistan.py +6 -39
- holidays/countries/albania.py +3 -22
- holidays/countries/argentina.py +3 -18
- holidays/countries/azerbaijan.py +6 -39
- holidays/countries/bahrain.py +29 -38
- holidays/countries/bhutan.py +194 -0
- holidays/countries/bosnia_and_herzegovina.py +2 -27
- holidays/countries/brunei.py +7 -117
- holidays/countries/burkina_faso.py +4 -15
- holidays/countries/cameroon.py +3 -34
- holidays/countries/canada.py +2 -1
- holidays/countries/central_african_republic.py +3 -16
- holidays/countries/chad.py +4 -17
- holidays/countries/chile.py +20 -4
- holidays/countries/christmas_island.py +4 -15
- holidays/countries/cocos_islands.py +5 -24
- holidays/countries/egypt.py +175 -51
- holidays/countries/ethiopia.py +18 -47
- holidays/countries/fiji.py +1 -2
- holidays/countries/gabon.py +3 -23
- holidays/countries/gambia.py +168 -0
- holidays/countries/germany.py +41 -0
- holidays/countries/guinea.py +5 -27
- holidays/countries/guinea_bissau.py +100 -0
- holidays/countries/guyana.py +2 -17
- holidays/countries/india.py +12 -25
- holidays/countries/indonesia.py +11 -160
- holidays/countries/iran.py +16 -126
- holidays/countries/iraq.py +276 -0
- holidays/countries/kazakhstan.py +2 -18
- holidays/countries/kenya.py +2 -8
- holidays/countries/kiribati.py +124 -0
- holidays/countries/lebanon.py +5 -87
- holidays/countries/liberia.py +80 -0
- holidays/countries/libya.py +5 -37
- holidays/countries/luxembourg.py +13 -0
- holidays/countries/malaysia.py +9 -130
- holidays/countries/mali.py +4 -9
- holidays/countries/mauritius.py +1 -2
- holidays/countries/montenegro.py +3 -18
- holidays/countries/nepal.py +42 -44
- holidays/countries/niger.py +14 -74
- holidays/countries/north_macedonia.py +3 -39
- holidays/countries/oman.py +6 -28
- holidays/countries/pakistan.py +12 -35
- holidays/countries/palestine.py +2 -5
- holidays/countries/philippines.py +3 -33
- holidays/countries/pitcairn_islands.py +85 -0
- holidays/countries/qatar.py +3 -45
- holidays/countries/saudi_arabia.py +46 -35
- holidays/countries/senegal.py +6 -16
- holidays/countries/sierra_leone.py +4 -20
- holidays/countries/singapore.py +3 -59
- holidays/countries/south_georgia_and_the_south_sandwich_islands.py +160 -0
- holidays/countries/spain.py +3 -10
- holidays/countries/sri_lanka.py +3 -14
- holidays/countries/suriname.py +11 -19
- holidays/countries/syrian_arab_republic.py +134 -0
- holidays/countries/tanzania.py +3 -9
- holidays/countries/timor_leste.py +2 -17
- holidays/countries/togo.py +4 -29
- holidays/countries/trinidad_and_tobago.py +2 -9
- holidays/countries/turkey.py +2 -116
- holidays/countries/turkmenistan.py +158 -0
- holidays/countries/united_arab_emirates.py +5 -29
- holidays/countries/uzbekistan.py +3 -31
- holidays/countries/yemen.py +8 -52
- holidays/groups/__init__.py +2 -0
- holidays/groups/christian.py +48 -12
- holidays/groups/international.py +17 -1
- holidays/groups/islamic.py +1 -11
- holidays/groups/mandaean.py +107 -0
- holidays/groups/tibetan.py +153 -0
- holidays/holiday_base.py +86 -91
- holidays/locale/ar/LC_MESSAGES/BH.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/IQ.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/SY.mo +0 -0
- holidays/locale/{ar → ar_EG}/LC_MESSAGES/EG.mo +0 -0
- holidays/locale/de/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/de/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/en_GM/LC_MESSAGES/GM.mo +0 -0
- holidays/locale/en_GS/LC_MESSAGES/GS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CL.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/GM.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/IQ.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TM.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/EG.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/lb/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/pt_GW/LC_MESSAGES/GW.mo +0 -0
- holidays/locale/ru/LC_MESSAGES/TM.mo +0 -0
- holidays/locale/th/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/tk/LC_MESSAGES/TM.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CL.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/LU.mo +0 -0
- holidays/registry.py +14 -0
- holidays/utils.py +18 -18
- holidays/version.py +1 -1
- {holidays-0.77.dist-info → holidays-0.79.dist-info}/METADATA +79 -9
- {holidays-0.77.dist-info → holidays-0.79.dist-info}/RECORD +121 -92
- {holidays-0.77.dist-info → holidays-0.79.dist-info}/licenses/CONTRIBUTORS +3 -0
- {holidays-0.77.dist-info → holidays-0.79.dist-info}/WHEEL +0 -0
- {holidays-0.77.dist-info → holidays-0.79.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.77.dist-info → holidays-0.79.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# holidays
|
|
2
|
+
# --------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see 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 GREGORIAN_CALENDAR, MAR, OCT, FRI, SAT
|
|
17
|
+
from holidays.calendars.julian import JULIAN_CALENDAR
|
|
18
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
19
|
+
from holidays.holiday_base import HolidayBase
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class SyrianArabRepublic(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
23
|
+
"""Syrian Arab Republic holidays.
|
|
24
|
+
|
|
25
|
+
References:
|
|
26
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Syria>
|
|
27
|
+
* [Central Bank of Syria - Public Holidays 2024](https://web.archive.org/web/20250813035705/https://cb.gov.sy/index.php?lang=1&dir=html&ex=1&page=holidays&act=598-)
|
|
28
|
+
* [Christmas and Boxing Day](https://web.archive.org/web/20250414224148/https://en.royanews.tv/news/56308)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
country = "SY"
|
|
32
|
+
default_language = "ar"
|
|
33
|
+
# %s (estimated).
|
|
34
|
+
estimated_label = tr("%s (المقدرة)")
|
|
35
|
+
# Earliest reliable record dates back to 2004.
|
|
36
|
+
start_year = 2004
|
|
37
|
+
supported_languages = ("ar", "en_US")
|
|
38
|
+
weekend = {FRI, SAT}
|
|
39
|
+
|
|
40
|
+
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
41
|
+
"""
|
|
42
|
+
Args:
|
|
43
|
+
islamic_show_estimated:
|
|
44
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
45
|
+
if holiday date is estimated.
|
|
46
|
+
"""
|
|
47
|
+
ChristianHolidays.__init__(self, calendar=JULIAN_CALENDAR)
|
|
48
|
+
InternationalHolidays.__init__(self)
|
|
49
|
+
IslamicHolidays.__init__(
|
|
50
|
+
self, cls=SyriaIslamicHolidays, show_estimated=islamic_show_estimated
|
|
51
|
+
)
|
|
52
|
+
super().__init__(*args, **kwargs)
|
|
53
|
+
|
|
54
|
+
def _populate_public_holidays(self):
|
|
55
|
+
# New Year's Day.
|
|
56
|
+
self._add_new_years_day(tr("عيد رأس السنة الميلادية"))
|
|
57
|
+
|
|
58
|
+
# Revolution Day.
|
|
59
|
+
self._add_holiday_mar_8(tr("الثورة السورية"))
|
|
60
|
+
|
|
61
|
+
# Mother's Day.
|
|
62
|
+
self._add_holiday_mar_21(tr("عيد الأم"))
|
|
63
|
+
|
|
64
|
+
# Gregorian Easter Sunday.
|
|
65
|
+
self._add_easter_sunday(tr("عيد الفصح حسب التقويم الغربي"), calendar=GREGORIAN_CALENDAR)
|
|
66
|
+
|
|
67
|
+
# Julian Easter Sunday.
|
|
68
|
+
self._add_easter_sunday(tr("عيد الفصح حسب التقويم الشرقي"))
|
|
69
|
+
|
|
70
|
+
# Independence Day.
|
|
71
|
+
self._add_holiday_apr_17(tr("عيد الاستقلال"))
|
|
72
|
+
|
|
73
|
+
# Labor Day.
|
|
74
|
+
self._add_labor_day(tr("عيد العمال"))
|
|
75
|
+
|
|
76
|
+
# Martyrs' Day.
|
|
77
|
+
self._add_holiday_may_6(tr("عيد الشهداء"))
|
|
78
|
+
|
|
79
|
+
# Tishreen Liberation War Day.
|
|
80
|
+
self._add_holiday_oct_6(tr("ذكرى حرب تشرين التحريرية"))
|
|
81
|
+
|
|
82
|
+
if self._year >= 2024:
|
|
83
|
+
# Christmas Day.
|
|
84
|
+
self._add_christmas_day(tr("عيد الميلاد"), calendar=GREGORIAN_CALENDAR)
|
|
85
|
+
|
|
86
|
+
# Boxing Day.
|
|
87
|
+
self._add_christmas_day_two(tr("يوم الصناديق"), calendar=GREGORIAN_CALENDAR)
|
|
88
|
+
|
|
89
|
+
# Islamic New Year.
|
|
90
|
+
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
|
|
91
|
+
|
|
92
|
+
# Prophet's Birthday.
|
|
93
|
+
self._add_mawlid_day(tr("عيد المولد النبوي الشريف"))
|
|
94
|
+
|
|
95
|
+
# Eid al-Fitr.
|
|
96
|
+
name = tr("عيد الفطر")
|
|
97
|
+
self._add_eid_al_fitr_day(name)
|
|
98
|
+
self._add_eid_al_fitr_day_two(name)
|
|
99
|
+
self._add_eid_al_fitr_day_three(name)
|
|
100
|
+
|
|
101
|
+
# Eid al-Adha.
|
|
102
|
+
name = tr("عيد الأضحى")
|
|
103
|
+
self._add_arafah_day(name)
|
|
104
|
+
self._add_eid_al_adha_day(name)
|
|
105
|
+
self._add_eid_al_adha_day_two(name)
|
|
106
|
+
self._add_eid_al_adha_day_three(name)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class SY(SyrianArabRepublic):
|
|
110
|
+
pass
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class SYR(SyrianArabRepublic):
|
|
114
|
+
pass
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class SyriaIslamicHolidays(_CustomIslamicHolidays):
|
|
118
|
+
# https://web.archive.org/web/20250120140034/https://www.timeanddate.com/holidays/syria/muharram-new-year
|
|
119
|
+
HIJRI_NEW_YEAR_DATES_CONFIRMED_YEARS = (2020, 2025)
|
|
120
|
+
|
|
121
|
+
# https://web.archive.org/web/20240808150300/https://www.timeanddate.com/holidays/syria/prophet-birthday
|
|
122
|
+
MAWLID_DATES_CONFIRMED_YEARS = (2020, 2024)
|
|
123
|
+
MAWLID_DATES = {
|
|
124
|
+
2021: (OCT, 19),
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
# https://web.archive.org/web/20250404011133/https://www.timeanddate.com/holidays/syria/eid-al-fitr
|
|
128
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2020, 2025)
|
|
129
|
+
EID_AL_FITR_DATES = {
|
|
130
|
+
2025: (MAR, 31),
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
# https://web.archive.org/web/20250126132002/https://www.timeanddate.com/holidays/syria/eid-al-adha
|
|
134
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
|
holidays/countries/tanzania.py
CHANGED
|
@@ -239,44 +239,38 @@ class TZA(Tanzania):
|
|
|
239
239
|
|
|
240
240
|
|
|
241
241
|
class TanzaniaIslamicHolidays(_CustomIslamicHolidays):
|
|
242
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2013, 2023)
|
|
242
243
|
EID_AL_ADHA_DATES = {
|
|
243
|
-
2013: (OCT, 15),
|
|
244
244
|
2014: (OCT, 5),
|
|
245
|
-
2015: (SEP, 23),
|
|
246
245
|
2016: (SEP, 16),
|
|
247
246
|
2017: (SEP, 2),
|
|
248
247
|
2018: (AUG, 22),
|
|
249
248
|
2019: (AUG, 13),
|
|
250
|
-
2020: (JUL, 31),
|
|
251
249
|
2021: (JUL, 21),
|
|
252
250
|
2022: (JUL, 10),
|
|
253
251
|
2023: (JUN, 29),
|
|
254
252
|
}
|
|
255
253
|
|
|
254
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2013, 2024)
|
|
256
255
|
EID_AL_FITR_DATES = {
|
|
257
|
-
2013: (AUG, 8),
|
|
258
256
|
2014: (JUL, 29),
|
|
259
257
|
2015: (JUL, 18),
|
|
260
258
|
2016: (JUL, 7),
|
|
261
259
|
2017: (JUN, 26),
|
|
262
|
-
2018: (JUN, 15),
|
|
263
260
|
2019: (JUN, 5),
|
|
264
|
-
2020: (MAY, 24),
|
|
265
261
|
2021: (MAY, 14),
|
|
266
262
|
2022: (MAY, 3),
|
|
267
263
|
2023: (APR, 22),
|
|
268
|
-
2024: (APR, 10),
|
|
269
264
|
}
|
|
270
265
|
|
|
266
|
+
MAWLID_DATES_CONFIRMED_YEARS = (2013, 2023)
|
|
271
267
|
MAWLID_DATES = {
|
|
272
|
-
2013: (JAN, 24),
|
|
273
268
|
2014: (JAN, 14),
|
|
274
269
|
2015: ((JAN, 3), (DEC, 24)),
|
|
275
270
|
2016: (DEC, 12),
|
|
276
271
|
2017: (DEC, 1),
|
|
277
272
|
2018: (NOV, 21),
|
|
278
273
|
2019: (NOV, 10),
|
|
279
|
-
2020: (OCT, 29),
|
|
280
274
|
2021: (OCT, 19),
|
|
281
275
|
2022: (OCT, 9),
|
|
282
276
|
2023: (SEP, 28),
|
|
@@ -193,39 +193,24 @@ class TLS(TimorLeste):
|
|
|
193
193
|
|
|
194
194
|
|
|
195
195
|
class TimorLesteIslamicHolidays(_CustomIslamicHolidays):
|
|
196
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2011, 2025)
|
|
196
197
|
EID_AL_ADHA_DATES = {
|
|
197
198
|
2011: (NOV, 7),
|
|
198
|
-
2012: (OCT, 26),
|
|
199
|
-
2013: (OCT, 15),
|
|
200
|
-
2014: (OCT, 4),
|
|
201
199
|
2015: (SEP, 24),
|
|
202
200
|
2016: (SEP, 18),
|
|
203
|
-
2017: (SEP, 1),
|
|
204
|
-
2018: (AUG, 21),
|
|
205
|
-
2019: (AUG, 11),
|
|
206
|
-
2020: (JUL, 31),
|
|
207
201
|
2021: (JUL, 19),
|
|
208
|
-
2022: (JUL, 9),
|
|
209
202
|
2023: (JUN, 29),
|
|
210
203
|
2024: (JUN, 17),
|
|
211
|
-
2025: (JUN, 6),
|
|
212
204
|
}
|
|
213
205
|
|
|
206
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2011, 2025)
|
|
214
207
|
EID_AL_FITR_DATES = {
|
|
215
208
|
2011: (AUG, 31),
|
|
216
209
|
2012: (AUG, 20),
|
|
217
|
-
2013: (AUG, 8),
|
|
218
|
-
2014: (JUL, 28),
|
|
219
|
-
2015: (JUL, 17),
|
|
220
210
|
2016: (JUL, 7),
|
|
221
211
|
2017: (JUN, 26),
|
|
222
|
-
2018: (JUN, 15),
|
|
223
212
|
2019: (JUN, 6),
|
|
224
|
-
2020: (MAY, 24),
|
|
225
|
-
2021: (MAY, 13),
|
|
226
|
-
2022: (MAY, 2),
|
|
227
213
|
2023: (APR, 22),
|
|
228
|
-
2024: (APR, 10),
|
|
229
214
|
2025: (MAR, 31),
|
|
230
215
|
}
|
|
231
216
|
|
holidays/countries/togo.py
CHANGED
|
@@ -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
|
|
16
|
+
from holidays.calendars.gregorian import MAY, JUN, JUL, AUG, SEP, OCT, NOV
|
|
17
17
|
from holidays.constants import PUBLIC, WORKDAY
|
|
18
18
|
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
19
19
|
from holidays.holiday_base import HolidayBase
|
|
@@ -129,54 +129,29 @@ class TGO(Togo):
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
class TogoIslamicHolidays(_CustomIslamicHolidays):
|
|
132
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2010, 2025)
|
|
132
133
|
EID_AL_ADHA_DATES = {
|
|
133
134
|
2010: (NOV, 17),
|
|
134
135
|
2011: (NOV, 7),
|
|
135
|
-
2012: (OCT, 26),
|
|
136
|
-
2013: (OCT, 15),
|
|
137
136
|
2014: (OCT, 5),
|
|
138
137
|
2015: (SEP, 24),
|
|
139
138
|
2016: (SEP, 13),
|
|
140
139
|
2017: (SEP, 2),
|
|
141
140
|
2018: (AUG, 22),
|
|
142
|
-
2019: (AUG, 11),
|
|
143
|
-
2020: (JUL, 31),
|
|
144
|
-
2021: (JUL, 20),
|
|
145
|
-
2022: (JUL, 9),
|
|
146
|
-
2023: (JUN, 28),
|
|
147
|
-
2024: (JUN, 16),
|
|
148
141
|
2025: (JUN, 7),
|
|
149
142
|
}
|
|
150
143
|
|
|
144
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2010, 2025)
|
|
151
145
|
EID_AL_FITR_DATES = {
|
|
152
|
-
2010: (SEP, 10),
|
|
153
146
|
2011: (AUG, 31),
|
|
154
|
-
2012: (AUG, 19),
|
|
155
|
-
2013: (AUG, 8),
|
|
156
147
|
2014: (JUL, 29),
|
|
157
148
|
2015: (JUL, 18),
|
|
158
149
|
2016: (JUL, 7),
|
|
159
150
|
2017: (JUN, 26),
|
|
160
|
-
2018: (JUN, 15),
|
|
161
151
|
2019: (JUN, 5),
|
|
162
|
-
2020: (MAY, 24),
|
|
163
|
-
2021: (MAY, 13),
|
|
164
|
-
2022: (MAY, 2),
|
|
165
|
-
2023: (APR, 21),
|
|
166
|
-
2024: (APR, 10),
|
|
167
|
-
2025: (MAR, 30),
|
|
168
152
|
}
|
|
169
153
|
|
|
154
|
+
RAMADAN_BEGINNING_DATES_CONFIRMED_YEARS = (2015, 2025)
|
|
170
155
|
RAMADAN_BEGINNING_DATES = {
|
|
171
|
-
2015: (JUN, 18),
|
|
172
|
-
2016: (JUN, 6),
|
|
173
|
-
2017: (MAY, 27),
|
|
174
156
|
2018: (MAY, 17),
|
|
175
|
-
2019: (MAY, 6),
|
|
176
|
-
2020: (APR, 24),
|
|
177
|
-
2021: (APR, 13),
|
|
178
|
-
2022: (APR, 2),
|
|
179
|
-
2023: (MAR, 23),
|
|
180
|
-
2024: (MAR, 11),
|
|
181
|
-
2025: (MAR, 1),
|
|
182
157
|
}
|
|
@@ -14,7 +14,7 @@ from datetime import date
|
|
|
14
14
|
from gettext import gettext as tr
|
|
15
15
|
|
|
16
16
|
from holidays.calendars import _CustomHinduHolidays, _CustomIslamicHolidays
|
|
17
|
-
from holidays.calendars.gregorian import MAR, APR,
|
|
17
|
+
from holidays.calendars.gregorian import MAR, APR, JUN, JUL, OCT, NOV
|
|
18
18
|
from holidays.constants import OPTIONAL, PUBLIC
|
|
19
19
|
from holidays.groups import (
|
|
20
20
|
ChristianHolidays,
|
|
@@ -179,19 +179,12 @@ class TrinidadAndTobagoHinduHolidays(_CustomHinduHolidays):
|
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
class TrinidadAndTobagoIslamicHolidays(_CustomIslamicHolidays):
|
|
182
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2012, 2025)
|
|
182
183
|
EID_AL_FITR_DATES = {
|
|
183
|
-
2012: (AUG, 19),
|
|
184
|
-
2013: (AUG, 8),
|
|
185
184
|
2014: (JUL, 29),
|
|
186
185
|
2015: (JUL, 18),
|
|
187
|
-
2016: (JUL, 6),
|
|
188
186
|
2017: (JUN, 26),
|
|
189
|
-
2018: (JUN, 15),
|
|
190
187
|
2019: (JUN, 5),
|
|
191
|
-
2020: (MAY, 24),
|
|
192
|
-
2021: (MAY, 13),
|
|
193
|
-
2022: (MAY, 2),
|
|
194
188
|
2023: (APR, 22),
|
|
195
|
-
2024: (APR, 10),
|
|
196
189
|
2025: (MAR, 31),
|
|
197
190
|
}
|
holidays/countries/turkey.py
CHANGED
|
@@ -129,204 +129,90 @@ class TUR(Turkey):
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
class TurkeyIslamicHolidays(_CustomIslamicHolidays):
|
|
132
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (1936, 2032)
|
|
132
133
|
EID_AL_ADHA_DATES = {
|
|
133
|
-
1936: (MAR, 4),
|
|
134
134
|
1937: (FEB, 22),
|
|
135
135
|
1938: (FEB, 11),
|
|
136
136
|
1939: (JAN, 31),
|
|
137
|
-
1940: (JAN, 20),
|
|
138
137
|
1941: ((JAN, 8), (DEC, 29)),
|
|
139
|
-
1942: (DEC, 18),
|
|
140
138
|
1943: (DEC, 8),
|
|
141
139
|
1944: (NOV, 26),
|
|
142
|
-
1945: (NOV, 15),
|
|
143
|
-
1946: (NOV, 4),
|
|
144
|
-
1947: (OCT, 25),
|
|
145
|
-
1948: (OCT, 13),
|
|
146
140
|
1949: (OCT, 3),
|
|
147
|
-
1950: (SEP, 23),
|
|
148
|
-
1951: (SEP, 12),
|
|
149
|
-
1952: (AUG, 31),
|
|
150
|
-
1953: (AUG, 20),
|
|
151
|
-
1954: (AUG, 9),
|
|
152
|
-
1955: (JUL, 30),
|
|
153
|
-
1956: (JUL, 19),
|
|
154
|
-
1957: (JUL, 8),
|
|
155
141
|
1958: (JUN, 28),
|
|
156
|
-
1959: (JUN, 17),
|
|
157
142
|
1960: (JUN, 5),
|
|
158
|
-
1961: (MAY, 25),
|
|
159
|
-
1962: (MAY, 14),
|
|
160
143
|
1963: (MAY, 4),
|
|
161
144
|
1964: (APR, 23),
|
|
162
145
|
1965: (APR, 12),
|
|
163
|
-
1966: (APR, 1),
|
|
164
|
-
1967: (MAR, 21),
|
|
165
146
|
1968: (MAR, 10),
|
|
166
|
-
1969: (FEB, 27),
|
|
167
147
|
1970: (FEB, 17),
|
|
168
|
-
1971: (FEB, 6),
|
|
169
148
|
1972: (JAN, 27),
|
|
170
149
|
1973: (JAN, 15),
|
|
171
150
|
1974: ((JAN, 4), (DEC, 24)),
|
|
172
|
-
1975: (DEC, 13),
|
|
173
151
|
1976: (DEC, 2),
|
|
174
152
|
1977: (NOV, 22),
|
|
175
153
|
1978: (NOV, 11),
|
|
176
|
-
1979: (OCT, 31),
|
|
177
|
-
1980: (OCT, 19),
|
|
178
|
-
1981: (OCT, 8),
|
|
179
|
-
1982: (SEP, 27),
|
|
180
|
-
1983: (SEP, 17),
|
|
181
154
|
1984: (SEP, 6),
|
|
182
|
-
1985: (AUG, 26),
|
|
183
155
|
1986: (AUG, 16),
|
|
184
156
|
1987: (AUG, 5),
|
|
185
157
|
1988: (JUL, 24),
|
|
186
|
-
1989: (JUL, 13),
|
|
187
158
|
1990: (JUL, 3),
|
|
188
159
|
1991: (JUN, 23),
|
|
189
|
-
1992: (JUN, 11),
|
|
190
160
|
1993: (JUN, 1),
|
|
191
161
|
1994: (MAY, 21),
|
|
192
162
|
1995: (MAY, 10),
|
|
193
163
|
1996: (APR, 28),
|
|
194
164
|
1997: (APR, 18),
|
|
195
|
-
1998: (APR, 7),
|
|
196
165
|
1999: (MAR, 28),
|
|
197
|
-
2000: (MAR, 16),
|
|
198
|
-
2001: (MAR, 5),
|
|
199
|
-
2002: (FEB, 22),
|
|
200
|
-
2003: (FEB, 11),
|
|
201
|
-
2004: (FEB, 1),
|
|
202
166
|
2005: (JAN, 20),
|
|
203
|
-
2006: ((JAN, 10), (DEC, 31)),
|
|
204
|
-
2007: (DEC, 20),
|
|
205
|
-
2008: (DEC, 8),
|
|
206
|
-
2009: (NOV, 27),
|
|
207
|
-
2010: (NOV, 16),
|
|
208
|
-
2011: (NOV, 6),
|
|
209
167
|
2012: (OCT, 25),
|
|
210
|
-
2013: (OCT, 15),
|
|
211
|
-
2014: (OCT, 4),
|
|
212
168
|
2015: (SEP, 24),
|
|
213
169
|
2016: (SEP, 12),
|
|
214
|
-
2017: (SEP, 1),
|
|
215
|
-
2018: (AUG, 21),
|
|
216
|
-
2019: (AUG, 11),
|
|
217
|
-
2020: (JUL, 31),
|
|
218
|
-
2021: (JUL, 20),
|
|
219
|
-
2022: (JUL, 9),
|
|
220
|
-
2023: (JUN, 28),
|
|
221
|
-
2024: (JUN, 16),
|
|
222
|
-
2025: (JUN, 6),
|
|
223
|
-
2026: (MAY, 27),
|
|
224
|
-
2027: (MAY, 16),
|
|
225
|
-
2028: (MAY, 5),
|
|
226
|
-
2029: (APR, 24),
|
|
227
|
-
2030: (APR, 13),
|
|
228
|
-
2031: (APR, 2),
|
|
229
|
-
2032: (MAR, 22),
|
|
230
170
|
}
|
|
231
171
|
|
|
172
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (1936, 2032)
|
|
232
173
|
EID_AL_FITR_DATES = {
|
|
233
|
-
1936: (DEC, 15),
|
|
234
|
-
1937: (DEC, 4),
|
|
235
|
-
1938: (NOV, 23),
|
|
236
174
|
1939: (NOV, 13),
|
|
237
|
-
1940: (NOV, 1),
|
|
238
175
|
1941: (OCT, 22),
|
|
239
176
|
1942: (OCT, 12),
|
|
240
177
|
1943: (OCT, 1),
|
|
241
178
|
1944: (SEP, 19),
|
|
242
179
|
1945: (SEP, 8),
|
|
243
180
|
1946: (AUG, 29),
|
|
244
|
-
1947: (AUG, 18),
|
|
245
|
-
1948: (AUG, 6),
|
|
246
181
|
1949: (JUL, 27),
|
|
247
|
-
1950: (JUL, 16),
|
|
248
|
-
1951: (JUL, 6),
|
|
249
182
|
1952: (JUN, 24),
|
|
250
|
-
1953: (JUN, 13),
|
|
251
|
-
1954: (JUN, 2),
|
|
252
|
-
1955: (MAY, 23),
|
|
253
183
|
1956: (MAY, 12),
|
|
254
|
-
1957: (MAY, 1),
|
|
255
|
-
1958: (APR, 20),
|
|
256
184
|
1959: (APR, 9),
|
|
257
185
|
1960: (MAR, 29),
|
|
258
|
-
1961: (MAR, 18),
|
|
259
186
|
1962: (MAR, 8),
|
|
260
187
|
1963: (FEB, 25),
|
|
261
188
|
1964: (FEB, 15),
|
|
262
189
|
1965: (FEB, 3),
|
|
263
190
|
1966: (JAN, 23),
|
|
264
|
-
1967: (JAN, 12),
|
|
265
|
-
1968: ((JAN, 1), (DEC, 21)),
|
|
266
191
|
1969: (DEC, 11),
|
|
267
192
|
1970: (DEC, 1),
|
|
268
193
|
1971: (NOV, 20),
|
|
269
194
|
1972: (NOV, 8),
|
|
270
195
|
1973: (OCT, 28),
|
|
271
196
|
1974: (OCT, 17),
|
|
272
|
-
1975: (OCT, 6),
|
|
273
197
|
1976: (SEP, 25),
|
|
274
198
|
1977: (SEP, 15),
|
|
275
199
|
1978: (SEP, 4),
|
|
276
200
|
1979: (AUG, 24),
|
|
277
|
-
1980: (AUG, 12),
|
|
278
|
-
1981: (AUG, 1),
|
|
279
201
|
1982: (JUL, 22),
|
|
280
202
|
1983: (JUL, 12),
|
|
281
|
-
1984: (JUN, 30),
|
|
282
203
|
1985: (JUN, 20),
|
|
283
204
|
1986: (JUN, 9),
|
|
284
205
|
1987: (MAY, 29),
|
|
285
206
|
1988: (MAY, 17),
|
|
286
|
-
1989: (MAY, 6),
|
|
287
|
-
1990: (APR, 26),
|
|
288
207
|
1991: (APR, 16),
|
|
289
|
-
1992: (APR, 4),
|
|
290
|
-
1993: (MAR, 24),
|
|
291
|
-
1994: (MAR, 13),
|
|
292
208
|
1995: (MAR, 3),
|
|
293
209
|
1996: (FEB, 20),
|
|
294
210
|
1997: (FEB, 9),
|
|
295
|
-
1998: (JAN, 29),
|
|
296
211
|
1999: (JAN, 19),
|
|
297
|
-
2000: ((JAN, 8), (DEC, 27)),
|
|
298
|
-
2001: (DEC, 16),
|
|
299
|
-
2002: (DEC, 5),
|
|
300
|
-
2003: (NOV, 25),
|
|
301
|
-
2004: (NOV, 14),
|
|
302
|
-
2005: (NOV, 3),
|
|
303
|
-
2006: (OCT, 23),
|
|
304
212
|
2007: (OCT, 12),
|
|
305
213
|
2008: (SEP, 30),
|
|
306
|
-
2009: (SEP, 20),
|
|
307
214
|
2010: (SEP, 9),
|
|
308
|
-
2011: (AUG, 30),
|
|
309
|
-
2012: (AUG, 19),
|
|
310
|
-
2013: (AUG, 8),
|
|
311
|
-
2014: (JUL, 28),
|
|
312
|
-
2015: (JUL, 17),
|
|
313
215
|
2016: (JUL, 5),
|
|
314
|
-
2017: (JUN, 25),
|
|
315
|
-
2018: (JUN, 15),
|
|
316
|
-
2019: (JUN, 4),
|
|
317
|
-
2020: (MAY, 24),
|
|
318
|
-
2021: (MAY, 13),
|
|
319
|
-
2022: (MAY, 2),
|
|
320
|
-
2023: (APR, 21),
|
|
321
|
-
2024: (APR, 10),
|
|
322
|
-
2025: (MAR, 30),
|
|
323
|
-
2026: (MAR, 20),
|
|
324
|
-
2027: (MAR, 9),
|
|
325
|
-
2028: (FEB, 26),
|
|
326
|
-
2029: (FEB, 14),
|
|
327
|
-
2030: (FEB, 4),
|
|
328
|
-
2031: (JAN, 24),
|
|
329
|
-
2032: (JAN, 14),
|
|
330
216
|
}
|
|
331
217
|
|
|
332
218
|
|
|
@@ -0,0 +1,158 @@
|
|
|
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 JUN, JUL, AUG, SEP, OCT, NOV
|
|
17
|
+
from holidays.groups import InternationalHolidays, IslamicHolidays
|
|
18
|
+
from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_WORKDAY
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Turkmenistan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays):
|
|
22
|
+
"""Turkmenistan holidays.
|
|
23
|
+
|
|
24
|
+
References:
|
|
25
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Turkmenistan>
|
|
26
|
+
* [Labor Code](https://web.archive.org/web/20250419204037/https://www.tds.gov.tm/en/20-labor-code-of-turkmenistan)
|
|
27
|
+
* [State Flag and Constitution Day](https://en.wikipedia.org/wiki/State_Flag_and_Constitution_Day_(Turkmenistan))
|
|
28
|
+
* [Independence Day](https://en.wikipedia.org/wiki/Independence_Day_(Turkmenistan))
|
|
29
|
+
* [Detailed Research](https://archive.org/details/holiday-research-in-central-asia)
|
|
30
|
+
* [Law of 2008-08-15 on Amendments to Labor Code](https://web.archive.org/web/20250710021455/https://www.parahat.info/law/2008-08-16-zakon-turkmenistana-o-vnesenii-izmeneniya-v-kodeks-zakonov-o-trude-turkmenistana)
|
|
31
|
+
* [Law of 2014-10-05 on Amendments to Labor Code](https://web.archive.org/web/20250615083107/https://www.parahat.info/law/2014-10-06-zakon-turkmenistana-o-vnesenii-izmeneniya-v-trudovoy-kodeks-turkmenistana)
|
|
32
|
+
* [Law of 2017-10-11 on Amendments to Labor Code](https://web.archive.org/web/20250623221410/https://www.parahat.info/law/parahat-info-law-02ai)
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
country = "TM"
|
|
36
|
+
default_language = "tk"
|
|
37
|
+
# %s (estimated).
|
|
38
|
+
estimated_label = tr("%s (çak edilýär)")
|
|
39
|
+
# %s (observed).
|
|
40
|
+
observed_label = tr("%s (dynç güni)")
|
|
41
|
+
# %s (observed, estimated)
|
|
42
|
+
observed_estimated_label = tr("%s (dynç güni, çak edilýär)")
|
|
43
|
+
start_year = 1992
|
|
44
|
+
supported_languages = ("en_US", "ru", "tk")
|
|
45
|
+
|
|
46
|
+
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
47
|
+
InternationalHolidays.__init__(self)
|
|
48
|
+
IslamicHolidays.__init__(
|
|
49
|
+
self, cls=TurkmenistanIslamicHolidays, show_estimated=islamic_show_estimated
|
|
50
|
+
)
|
|
51
|
+
kwargs.setdefault("observed_rule", SUN_TO_NEXT_WORKDAY)
|
|
52
|
+
kwargs.setdefault("observed_since", 2010)
|
|
53
|
+
super().__init__(*args, **kwargs)
|
|
54
|
+
|
|
55
|
+
def _populate_public_holidays(self):
|
|
56
|
+
dts_observed = set()
|
|
57
|
+
|
|
58
|
+
# New Year's Day.
|
|
59
|
+
dts_observed.add(self._add_new_years_day(tr("Täze ýyl")))
|
|
60
|
+
|
|
61
|
+
if 1995 <= self._year <= 2017:
|
|
62
|
+
# State Flag Day.
|
|
63
|
+
dts_observed.add(self._add_holiday_feb_19(tr("Türkmenistanyň Döwlet baýdagynyň güni")))
|
|
64
|
+
|
|
65
|
+
# Spring Festival.
|
|
66
|
+
name = tr("Milli bahar baýramy")
|
|
67
|
+
if 2001 <= self._year <= 2007:
|
|
68
|
+
dts_observed.add(self._add_holiday_mar_20(name))
|
|
69
|
+
else:
|
|
70
|
+
# International Women's Day.
|
|
71
|
+
dts_observed.add(self._add_womens_day(tr("Halkara zenanlar güni")))
|
|
72
|
+
|
|
73
|
+
dts_observed.add(self._add_holiday_mar_21(name))
|
|
74
|
+
dts_observed.add(self._add_holiday_mar_22(name))
|
|
75
|
+
|
|
76
|
+
if self._year <= 2017:
|
|
77
|
+
dts_observed.add(
|
|
78
|
+
self._add_holiday_may_9(
|
|
79
|
+
# Victory Day.
|
|
80
|
+
tr("1941-1945-nji ýyllaryň Beýik Watançylyk urşunda ýeňiş güni")
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
if self._year >= 2009:
|
|
85
|
+
if self._year >= 2018:
|
|
86
|
+
# Constitution and State Flag Day.
|
|
87
|
+
name = tr("Türkmenistanyň Konstitusiýasynyň we Döwlet baýdagynyň güni")
|
|
88
|
+
elif self._year >= 2015:
|
|
89
|
+
# Day of the Constitution of Turkmenistan and Poetry of Magtymguly Pyragy.
|
|
90
|
+
name = tr(
|
|
91
|
+
"Türkmenistanyň Konstitusiýasynyň we Makhtumkuli Pyragynyň şygryýet güni"
|
|
92
|
+
)
|
|
93
|
+
else:
|
|
94
|
+
# Day of Revival, Unity and Poetry of Magtymguly Pyragy.
|
|
95
|
+
name = tr("Galkynyş, Agzybirlik we Magtymguly Pyragynyň şygryýet güni")
|
|
96
|
+
dts_observed.add(self._add_holiday_may_18(name))
|
|
97
|
+
|
|
98
|
+
# Independence Day.
|
|
99
|
+
name = tr("Türkmenistanyň Garaşsyzlyk güni")
|
|
100
|
+
if self._year <= 2017:
|
|
101
|
+
dts_observed.add(self._add_holiday_oct_27(name))
|
|
102
|
+
if self._year >= 2008:
|
|
103
|
+
dts_observed.add(self._add_holiday_oct_28(name))
|
|
104
|
+
else:
|
|
105
|
+
dts_observed.add(self._add_holiday_sep_27(name))
|
|
106
|
+
|
|
107
|
+
if self._year >= 1995:
|
|
108
|
+
# Memorial Day.
|
|
109
|
+
name = tr("Hatyra güni")
|
|
110
|
+
if 2009 <= self._year <= 2014:
|
|
111
|
+
dts_observed.add(self._add_holiday_jan_12(name))
|
|
112
|
+
# National Memorial Day.
|
|
113
|
+
dts_observed.add(self._add_holiday_oct_6(tr("Milli ýatlama güni")))
|
|
114
|
+
else:
|
|
115
|
+
dts_observed.add(self._add_holiday_oct_6(name))
|
|
116
|
+
|
|
117
|
+
# International Neutrality Day.
|
|
118
|
+
dts_observed.add(self._add_holiday_dec_12(tr("Halkara Bitaraplyk güni")))
|
|
119
|
+
|
|
120
|
+
# Eid al-Fitr.
|
|
121
|
+
dts_observed.update(self._add_eid_al_fitr_day(tr("Oraza baýramy")))
|
|
122
|
+
|
|
123
|
+
# Eid al-Adha.
|
|
124
|
+
dts_observed.update(self._add_eid_al_adha_day(tr("Gurban baýramy")))
|
|
125
|
+
|
|
126
|
+
self._populate_observed(dts_observed)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class TM(Turkmenistan):
|
|
130
|
+
pass
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class TKM(Turkmenistan):
|
|
134
|
+
pass
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class TurkmenistanIslamicHolidays(_CustomIslamicHolidays):
|
|
138
|
+
# https://web.archive.org/web/20240908061230/https://www.timeanddate.com/holidays/turkmenistan/eid-al-fitr
|
|
139
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2010, 2025)
|
|
140
|
+
EID_AL_FITR_DATES = {
|
|
141
|
+
2011: (AUG, 31),
|
|
142
|
+
2014: (JUL, 29),
|
|
143
|
+
2015: (JUL, 18),
|
|
144
|
+
2016: (JUL, 7),
|
|
145
|
+
2017: (JUN, 26),
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# https://web.archive.org/web/20240912191844/https://www.timeanddate.com/holidays/turkmenistan/eid-al-adha
|
|
149
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2010, 2025)
|
|
150
|
+
EID_AL_ADHA_DATES = {
|
|
151
|
+
2010: (NOV, 17),
|
|
152
|
+
2011: (NOV, 7),
|
|
153
|
+
2014: (OCT, 5),
|
|
154
|
+
2015: (SEP, 24),
|
|
155
|
+
2016: (SEP, 13),
|
|
156
|
+
2017: (SEP, 2),
|
|
157
|
+
2018: (AUG, 22),
|
|
158
|
+
}
|