holidays 0.82__py3-none-any.whl → 0.83__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 +26 -6
- holidays/countries/__init__.py +1 -0
- holidays/countries/azerbaijan.py +1 -1
- holidays/countries/canada.py +27 -13
- holidays/countries/denmark.py +18 -6
- holidays/countries/fiji.py +2 -3
- holidays/countries/finland.py +3 -6
- holidays/countries/guyana.py +24 -32
- holidays/countries/india.py +21 -78
- holidays/countries/iran.py +133 -269
- holidays/countries/ireland.py +1 -1
- holidays/countries/israel.py +1 -1
- holidays/countries/macau.py +5 -8
- holidays/countries/mauritius.py +10 -9
- holidays/countries/montserrat.py +1 -1
- holidays/countries/myanmar.py +9 -10
- holidays/countries/nepal.py +11 -30
- holidays/countries/netherlands.py +28 -24
- holidays/countries/new_zealand.py +75 -31
- holidays/countries/nigeria.py +53 -75
- holidays/countries/norway.py +1 -1
- holidays/countries/rwanda.py +2 -2
- holidays/countries/slovakia.py +23 -4
- holidays/countries/sri_lanka.py +21 -58
- holidays/countries/suriname.py +1 -2
- holidays/countries/sweden.py +1 -1
- holidays/countries/switzerland.py +86 -3
- holidays/countries/taiwan.py +1 -1
- holidays/countries/tanzania.py +19 -29
- holidays/countries/thailand.py +8 -7
- holidays/countries/trinidad_and_tobago.py +1 -1
- holidays/countries/ukraine.py +1 -1
- holidays/countries/united_kingdom.py +1 -1
- holidays/countries/united_states.py +2 -2
- holidays/countries/western_sahara.py +92 -0
- holidays/groups/buddhist.py +2 -2
- holidays/groups/chinese.py +5 -2
- holidays/groups/christian.py +10 -0
- holidays/groups/eastern.py +3 -1
- holidays/groups/hindu.py +9 -3
- holidays/groups/international.py +1 -1
- holidays/groups/islamic.py +10 -3
- holidays/groups/mongolian.py +5 -2
- holidays/groups/sinhala.py +6 -3
- holidays/groups/tibetan.py +5 -2
- holidays/holiday_base.py +21 -22
- holidays/locale/ar/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/de/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/es/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/fy/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/it/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/nl/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/th/LC_MESSAGES/DK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/NL.mo +0 -0
- holidays/observed_holiday_base.py +16 -4
- holidays/registry.py +2 -0
- holidays/version.py +1 -1
- {holidays-0.82.dist-info → holidays-0.83.dist-info}/METADATA +18 -16
- {holidays-0.82.dist-info → holidays-0.83.dist-info}/RECORD +71 -63
- {holidays-0.82.dist-info → holidays-0.83.dist-info}/WHEEL +0 -0
- {holidays-0.82.dist-info → holidays-0.83.dist-info}/licenses/CONTRIBUTORS +0 -0
- {holidays-0.82.dist-info → holidays-0.83.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.82.dist-info → holidays-0.83.dist-info}/top_level.txt +0 -0
holidays/calendars/islamic.py
CHANGED
|
@@ -3970,24 +3970,44 @@ class _IslamicLunar:
|
|
|
3970
3970
|
2076: (DEC, 5),
|
|
3971
3971
|
}
|
|
3972
3972
|
|
|
3973
|
+
def __init__(self, calendar_delta_days: int = 0) -> None:
|
|
3974
|
+
"""
|
|
3975
|
+
Args:
|
|
3976
|
+
calendar_delta_days:
|
|
3977
|
+
Number of days to shift all calculated holiday dates.
|
|
3978
|
+
Positive values move holidays forward, negative values move them backward.
|
|
3979
|
+
Defaults to 0 (no shift).
|
|
3980
|
+
"""
|
|
3981
|
+
self.__calendar_delta_days = calendar_delta_days
|
|
3982
|
+
|
|
3973
3983
|
def _get_holiday(self, holiday: str, year: int) -> Iterable[tuple[date, bool]]:
|
|
3974
3984
|
confirmed_dates = getattr(
|
|
3975
3985
|
self, f"{holiday}_DATES_{_CustomCalendar.CUSTOM_ATTR_POSTFIX}", {}
|
|
3976
3986
|
)
|
|
3977
|
-
confirmed_years =
|
|
3978
|
-
|
|
3987
|
+
confirmed_years = _normalize_tuple(
|
|
3988
|
+
getattr(
|
|
3989
|
+
self, f"{holiday}_DATES_CONFIRMED_YEARS_{_CustomCalendar.CUSTOM_ATTR_POSTFIX}", ()
|
|
3990
|
+
)
|
|
3979
3991
|
)
|
|
3980
3992
|
estimated_dates = getattr(self, f"{holiday}_DATES", {})
|
|
3993
|
+
calendar_delta_days = self.__calendar_delta_days
|
|
3981
3994
|
|
|
3982
3995
|
for check_year in (year - 1, year):
|
|
3996
|
+
is_confirmed_year = check_year in confirmed_dates
|
|
3983
3997
|
for dt in _normalize_tuple(
|
|
3984
3998
|
confirmed_dates.get(check_year, estimated_dates.get(check_year, ()))
|
|
3985
3999
|
):
|
|
3986
|
-
is_confirmed =
|
|
3987
|
-
year_from <= check_year <= year_to
|
|
3988
|
-
|
|
4000
|
+
is_confirmed = is_confirmed_year or any(
|
|
4001
|
+
year_from <= check_year <= year_to for year_from, year_to in confirmed_years
|
|
4002
|
+
)
|
|
4003
|
+
|
|
4004
|
+
holiday_date = date(check_year, *dt)
|
|
4005
|
+
yield (
|
|
4006
|
+
_timedelta(holiday_date, calendar_delta_days)
|
|
4007
|
+
if calendar_delta_days and not is_confirmed_year
|
|
4008
|
+
else holiday_date,
|
|
4009
|
+
not is_confirmed,
|
|
3989
4010
|
)
|
|
3990
|
-
yield date(check_year, *dt), not is_confirmed
|
|
3991
4011
|
|
|
3992
4012
|
def _is_long_ramadan(self, eid_al_fitr: date) -> bool:
|
|
3993
4013
|
"""Check whether the Ramadan preceding the given Eid al-Fitr date lasted 30 days.
|
holidays/countries/__init__.py
CHANGED
|
@@ -293,6 +293,7 @@ from holidays.countries.vatican_city import VaticanCity, VA, VAT
|
|
|
293
293
|
from holidays.countries.venezuela import Venezuela, VE, VEN
|
|
294
294
|
from holidays.countries.vietnam import Vietnam, VN, VNM
|
|
295
295
|
from holidays.countries.wallis_and_futuna import WallisAndFutuna, WF, WLF, HolidaysWF
|
|
296
|
+
from holidays.countries.western_sahara import WesternSahara, EH, ESH
|
|
296
297
|
from holidays.countries.yemen import Yemen, YE, YEM
|
|
297
298
|
from holidays.countries.zambia import Zambia, ZM, ZMB
|
|
298
299
|
from holidays.countries.zimbabwe import Zimbabwe, ZW, ZWE
|
holidays/countries/azerbaijan.py
CHANGED
|
@@ -172,7 +172,7 @@ class Azerbaijan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, St
|
|
|
172
172
|
continue
|
|
173
173
|
for holiday_name in dt_holidays:
|
|
174
174
|
if any(bayrami_name in holiday_name for bayrami_name in bayrami_names):
|
|
175
|
-
self._add_observed(dt_observed, holiday_name, WORKDAY_TO_NEXT_WORKDAY)
|
|
175
|
+
self._add_observed(dt_observed, holiday_name, rule=WORKDAY_TO_NEXT_WORKDAY)
|
|
176
176
|
|
|
177
177
|
def _populate_workday_holidays(self):
|
|
178
178
|
if self._year >= 2021:
|
holidays/countries/canada.py
CHANGED
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
from datetime import date
|
|
14
14
|
from gettext import gettext as tr
|
|
15
|
-
from typing import Optional
|
|
16
15
|
|
|
17
|
-
from holidays.calendars.gregorian import
|
|
16
|
+
from holidays.calendars.gregorian import APR, SEP
|
|
18
17
|
from holidays.constants import GOVERNMENT, OPTIONAL, PUBLIC
|
|
19
18
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
20
19
|
from holidays.observed_holiday_base import (
|
|
@@ -101,9 +100,6 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
101
100
|
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
102
101
|
super().__init__(*args, **kwargs)
|
|
103
102
|
|
|
104
|
-
def _get_nearest_monday(self, *args) -> Optional[date]:
|
|
105
|
-
return self._get_observed_date(date(self._year, *args), rule=ALL_TO_NEAREST_MON)
|
|
106
|
-
|
|
107
103
|
def _add_statutory_holidays(self):
|
|
108
104
|
"""Nationwide statutory holidays."""
|
|
109
105
|
|
|
@@ -336,24 +332,42 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
336
332
|
|
|
337
333
|
def _populate_subdiv_nl_optional_holidays(self):
|
|
338
334
|
if self._year >= 1900:
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
self._move_holiday_forced(
|
|
336
|
+
# Saint Patrick's Day.
|
|
337
|
+
self._add_saint_patricks_day(tr("Saint Patrick's Day")),
|
|
338
|
+
rule=ALL_TO_NEAREST_MON,
|
|
339
|
+
)
|
|
341
340
|
|
|
342
341
|
if self._year >= 1990:
|
|
343
342
|
# Nearest Monday to April 23
|
|
344
343
|
# 4/26 is the Monday closer to 4/23 in 2010
|
|
345
344
|
# but the holiday was observed on 4/19? Crazy Newfies!
|
|
346
|
-
|
|
345
|
+
|
|
347
346
|
# Saint George's Day.
|
|
348
|
-
|
|
347
|
+
name = tr("Saint George's Day")
|
|
348
|
+
|
|
349
|
+
if self._year == 2010:
|
|
350
|
+
self._add_holiday_apr_19(name)
|
|
351
|
+
else:
|
|
352
|
+
# Prevents overlap with Good Friday.
|
|
353
|
+
self._add_holiday(
|
|
354
|
+
name,
|
|
355
|
+
self._get_observed_date(date(self._year, APR, 23), rule=ALL_TO_NEAREST_MON),
|
|
356
|
+
)
|
|
349
357
|
|
|
350
358
|
if self._year >= 1997:
|
|
351
|
-
|
|
352
|
-
|
|
359
|
+
self._move_holiday_forced(
|
|
360
|
+
# Discovery Day.
|
|
361
|
+
self._add_holiday_jun_24(tr("Discovery Day")),
|
|
362
|
+
rule=ALL_TO_NEAREST_MON,
|
|
363
|
+
)
|
|
353
364
|
|
|
354
365
|
if self._year >= 1900:
|
|
355
|
-
|
|
356
|
-
|
|
366
|
+
self._move_holiday_forced(
|
|
367
|
+
# Orangemen's Day.
|
|
368
|
+
self._add_holiday_jul_12(tr("Orangemen's Day")),
|
|
369
|
+
rule=ALL_TO_NEAREST_MON,
|
|
370
|
+
)
|
|
357
371
|
|
|
358
372
|
self._add_thanksgiving_day()
|
|
359
373
|
|
holidays/countries/denmark.py
CHANGED
|
@@ -22,14 +22,21 @@ class Denmark(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
22
22
|
|
|
23
23
|
References:
|
|
24
24
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_Denmark>
|
|
25
|
+
* <https://da.wikipedia.org/wiki/Danske_helligdage>
|
|
26
|
+
* <https://da.wikipedia.org/wiki/Helligdagsreformen_af_1770>
|
|
25
27
|
* <https://web.archive.org/web/20250422010005/https://www.norden.org/en/info-norden/public-holidays-denmark>
|
|
26
28
|
* <https://web.archive.org/web/20231219155820/http://www.ft.dk/samling/20222/lovforslag/l13/index.htm>
|
|
29
|
+
* <https://web.archive.org/web/20250119084025/https://www.retsinformation.dk/eli/lta/2023/214>
|
|
30
|
+
* <https://web.archive.org/web/20251016080453/https://cphpost.dk/2025-05-01/life-in-denmark/what-happens-on-the-1st-of-may/>
|
|
31
|
+
* <https://web.archive.org/web/20140202200655/https://bibliotek.kk.dk/biblioteker/blog/grundlovsdag-dens-traditioner>
|
|
27
32
|
"""
|
|
28
33
|
|
|
29
34
|
country = "DK"
|
|
30
35
|
default_language = "da"
|
|
36
|
+
# The Helligdagsreformen af 1770 was in effect from October 16th, 1770 onwards.
|
|
37
|
+
start_year = 1771
|
|
31
38
|
supported_categories = (OPTIONAL, PUBLIC)
|
|
32
|
-
supported_languages = ("da", "en_US", "uk")
|
|
39
|
+
supported_languages = ("da", "en_US", "th", "uk")
|
|
33
40
|
|
|
34
41
|
def __init__(self, *args, **kwargs):
|
|
35
42
|
ChristianHolidays.__init__(self)
|
|
@@ -52,6 +59,7 @@ class Denmark(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
52
59
|
# Easter Monday.
|
|
53
60
|
self._add_easter_monday(tr("Anden påskedag"))
|
|
54
61
|
|
|
62
|
+
# Removed via Act no. 214 of 06/03/2023, in effect January 1st, 2024.
|
|
55
63
|
if self._year <= 2023:
|
|
56
64
|
# Great Day of Prayers.
|
|
57
65
|
self._add_holiday_26_days_past_easter(tr("Store bededag"))
|
|
@@ -72,11 +80,15 @@ class Denmark(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
72
80
|
self._add_christmas_day_two(tr("Anden juledag"))
|
|
73
81
|
|
|
74
82
|
def _populate_optional_holidays(self):
|
|
75
|
-
#
|
|
76
|
-
self.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
# First observance in 1890.
|
|
84
|
+
if self._year >= 1890:
|
|
85
|
+
# Workers' Day.
|
|
86
|
+
self._add_labor_day(tr("Arbejdernes kampdag"))
|
|
87
|
+
|
|
88
|
+
# Gained its statutory day-off status in 1891.
|
|
89
|
+
if self._year >= 1891:
|
|
90
|
+
# Constitution Day.
|
|
91
|
+
self._add_holiday_jun_5(tr("Grundlovsdag"))
|
|
80
92
|
|
|
81
93
|
# Christmas Eve.
|
|
82
94
|
self._add_christmas_eve(tr("Juleaftensdag"))
|
holidays/countries/fiji.py
CHANGED
|
@@ -108,11 +108,10 @@ class Fiji(
|
|
|
108
108
|
self._add_observed(self._add_holiday_sep_7("Constitution Day"))
|
|
109
109
|
|
|
110
110
|
if self._year >= 2023:
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
self._move_holiday_forced(
|
|
112
|
+
# Girmit Day.
|
|
113
113
|
self._add_holiday_may_14("Girmit Day"),
|
|
114
114
|
rule=ALL_TO_NEAREST_MON,
|
|
115
|
-
show_observed_label=False,
|
|
116
115
|
)
|
|
117
116
|
|
|
118
117
|
# Ratu Sir Lala Sukuna Day.
|
holidays/countries/finland.py
CHANGED
|
@@ -215,14 +215,13 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
215
215
|
# Become a Flag Day in 1952.
|
|
216
216
|
# Also considered the "Day of Finnish Heritage" from 1978 onward.
|
|
217
217
|
if self._year >= 1952:
|
|
218
|
-
|
|
218
|
+
self._add_holiday_may_12(
|
|
219
219
|
# J. V. Snellman Day, Day of Finnish Heritage.
|
|
220
220
|
tr("J.V. Snellmanin päivä, suomalaisuuden päivä")
|
|
221
221
|
if self._year >= 1978
|
|
222
222
|
# J. V. Snellman Day.
|
|
223
223
|
else tr("J.V. Snellmanin päivä")
|
|
224
224
|
)
|
|
225
|
-
self._add_holiday_may_12(name)
|
|
226
225
|
|
|
227
226
|
# Become a Flag Day in 1977.
|
|
228
227
|
if self._year >= 1977:
|
|
@@ -248,14 +247,13 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
248
247
|
# Become a Flag Day in 1950.
|
|
249
248
|
# Also considered the "Day of Finnish Literature" from 1978 onward.
|
|
250
249
|
if self._year >= 1950:
|
|
251
|
-
|
|
250
|
+
self._add_holiday_oct_10(
|
|
252
251
|
# Aleksis Kivi Day, Day of Finnish Literature.
|
|
253
252
|
tr("Aleksis Kiven päivä, suomalaisen kirjallisuuden päivä")
|
|
254
253
|
if self._year >= 1978
|
|
255
254
|
# Aleksis Kivi Day.
|
|
256
255
|
else tr("Aleksis Kiven päivä")
|
|
257
256
|
)
|
|
258
|
-
self._add_holiday_oct_10(name)
|
|
259
257
|
|
|
260
258
|
# Become a Flag Day in 1987.
|
|
261
259
|
if self._year >= 1987:
|
|
@@ -310,14 +308,13 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
310
308
|
# Become a Flag Day in 1942.
|
|
311
309
|
# Got its current name in 1950.
|
|
312
310
|
if self._year >= 1942:
|
|
313
|
-
|
|
311
|
+
self._add_holiday_jun_6(
|
|
314
312
|
# Flag Day of the Finnish Defense Forces.
|
|
315
313
|
tr("Puolustusvoimain lippujuhlan päivä")
|
|
316
314
|
if self._year >= 1950
|
|
317
315
|
# Birthday of the Marshal of Finland.
|
|
318
316
|
else tr("Suomen marsalkan syntymäpäivä")
|
|
319
317
|
)
|
|
320
|
-
self._add_holiday_jun_6(name)
|
|
321
318
|
|
|
322
319
|
# Day of the Finnish Flag was first created in 1934.
|
|
323
320
|
# This coincides with Midsummer Day.
|
holidays/countries/guyana.py
CHANGED
|
@@ -82,12 +82,18 @@ class Guyana(
|
|
|
82
82
|
islamic_show_estimated:
|
|
83
83
|
Whether to add "estimated" label to Islamic holidays name
|
|
84
84
|
if holiday date is estimated.
|
|
85
|
+
|
|
86
|
+
In Guyana, the dates of the Islamic calendar usually fall a day later than
|
|
87
|
+
the corresponding dates in the Umm al-Qura calendar.
|
|
85
88
|
"""
|
|
86
89
|
ChristianHolidays.__init__(self)
|
|
87
90
|
HinduCalendarHolidays.__init__(self, cls=GuyanaHinduHolidays)
|
|
88
91
|
InternationalHolidays.__init__(self)
|
|
89
92
|
IslamicHolidays.__init__(
|
|
90
|
-
self,
|
|
93
|
+
self,
|
|
94
|
+
cls=GuyanaIslamicHolidays,
|
|
95
|
+
show_estimated=islamic_show_estimated,
|
|
96
|
+
calendar_delta_days=+1,
|
|
91
97
|
)
|
|
92
98
|
StaticHolidays.__init__(self, cls=GuyanaStaticHolidays)
|
|
93
99
|
kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
|
|
@@ -210,44 +216,30 @@ class GuyanaIslamicHolidays(_CustomIslamicHolidays):
|
|
|
210
216
|
# https://web.archive.org/web/20250424074512/https://www.timeanddate.com/holidays/guyana/eid-al-adha
|
|
211
217
|
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
212
218
|
EID_AL_ADHA_DATES = {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
2009: (NOV, 28),
|
|
219
|
-
2010: (NOV, 17),
|
|
220
|
-
2011: (NOV, 7),
|
|
221
|
-
2014: (OCT, 5),
|
|
222
|
-
2015: (SEP, 24),
|
|
219
|
+
2005: (JAN, 21),
|
|
220
|
+
2006: ((JAN, 10), (DEC, 31)),
|
|
221
|
+
2007: (DEC, 20),
|
|
222
|
+
2012: (OCT, 26),
|
|
223
|
+
2013: (OCT, 15),
|
|
223
224
|
2016: (SEP, 13),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
2023: (JUN, 29),
|
|
228
|
-
2024: (JUN, 17),
|
|
229
|
-
2025: (JUN, 7),
|
|
225
|
+
2019: (AUG, 11),
|
|
226
|
+
2020: (JUL, 31),
|
|
227
|
+
2022: (JUL, 9),
|
|
230
228
|
}
|
|
231
229
|
|
|
232
230
|
# https://web.archive.org/web/20241006104125/https://www.timeanddate.com/holidays/guyana/prophet-birthday
|
|
233
231
|
MAWLID_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
234
232
|
MAWLID_DATES = {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
233
|
+
2001: (JUN, 4),
|
|
234
|
+
2002: (MAY, 24),
|
|
235
|
+
2005: (APR, 21),
|
|
236
|
+
2007: (MAR, 31),
|
|
237
|
+
2008: (MAR, 20),
|
|
238
|
+
2009: (MAR, 9),
|
|
239
|
+
2010: (FEB, 26),
|
|
240
|
+
2013: (JAN, 24),
|
|
241
241
|
2015: ((JAN, 3), (DEC, 24)),
|
|
242
|
-
|
|
243
|
-
2017: (DEC, 1),
|
|
244
|
-
2018: (NOV, 21),
|
|
245
|
-
2019: (NOV, 10),
|
|
246
|
-
2021: (OCT, 19),
|
|
247
|
-
2022: (OCT, 9),
|
|
248
|
-
2023: (SEP, 28),
|
|
249
|
-
2024: (SEP, 16),
|
|
250
|
-
2025: (SEP, 5),
|
|
242
|
+
2020: (OCT, 29),
|
|
251
243
|
}
|
|
252
244
|
|
|
253
245
|
|
holidays/countries/india.py
CHANGED
|
@@ -14,7 +14,7 @@ import warnings
|
|
|
14
14
|
from gettext import gettext as tr
|
|
15
15
|
|
|
16
16
|
from holidays.calendars import _CustomIslamicHolidays
|
|
17
|
-
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY,
|
|
17
|
+
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, AUG, SEP, OCT, NOV, DEC
|
|
18
18
|
from holidays.constants import OPTIONAL, PUBLIC
|
|
19
19
|
from holidays.groups import (
|
|
20
20
|
ChristianHolidays,
|
|
@@ -156,11 +156,17 @@ class India(
|
|
|
156
156
|
islamic_show_estimated:
|
|
157
157
|
Whether to add "estimated" label to Islamic holidays name
|
|
158
158
|
if holiday date is estimated.
|
|
159
|
+
|
|
160
|
+
In India, the dates of the Islamic calendar usually fall a day later than
|
|
161
|
+
the corresponding dates in the Umm al-Qura calendar.
|
|
159
162
|
"""
|
|
160
163
|
ChristianHolidays.__init__(self)
|
|
161
164
|
HinduCalendarHolidays.__init__(self)
|
|
162
165
|
IslamicHolidays.__init__(
|
|
163
|
-
self,
|
|
166
|
+
self,
|
|
167
|
+
cls=IndiaIslamicHolidays,
|
|
168
|
+
show_estimated=islamic_show_estimated,
|
|
169
|
+
calendar_delta_days=+1,
|
|
164
170
|
)
|
|
165
171
|
InternationalHolidays.__init__(self)
|
|
166
172
|
super().__init__(*args, **kwargs)
|
|
@@ -518,103 +524,40 @@ class IND(India):
|
|
|
518
524
|
class IndiaIslamicHolidays(_CustomIslamicHolidays):
|
|
519
525
|
ASHURA_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
520
526
|
ASHURA_DATES = {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
527
|
+
2001: (APR, 4),
|
|
528
|
+
2002: (MAR, 24),
|
|
529
|
+
2005: (FEB, 19),
|
|
530
|
+
2006: (FEB, 9),
|
|
531
|
+
2008: (JAN, 19),
|
|
524
532
|
2009: ((JAN, 7), (DEC, 28)),
|
|
525
|
-
2010: (DEC, 17),
|
|
526
|
-
2011: (DEC, 6),
|
|
527
|
-
2012: (NOV, 25),
|
|
528
|
-
2013: (NOV, 14),
|
|
529
|
-
2014: (NOV, 4),
|
|
530
|
-
2015: (OCT, 24),
|
|
531
|
-
2016: (OCT, 12),
|
|
532
|
-
2017: (OCT, 1),
|
|
533
|
-
2018: (SEP, 21),
|
|
534
|
-
2019: (SEP, 10),
|
|
535
|
-
2020: (AUG, 30),
|
|
536
533
|
2021: (AUG, 20),
|
|
537
|
-
2022: (AUG, 9),
|
|
538
|
-
2023: (JUL, 29),
|
|
539
|
-
2024: (JUL, 17),
|
|
540
|
-
2025: (JUL, 6),
|
|
541
534
|
}
|
|
542
535
|
|
|
543
536
|
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
544
537
|
EID_AL_ADHA_DATES = {
|
|
545
|
-
|
|
546
|
-
2002: (FEB, 23),
|
|
547
|
-
2003: (FEB, 12),
|
|
548
|
-
2004: (FEB, 2),
|
|
538
|
+
2005: (JAN, 21),
|
|
549
539
|
2006: ((JAN, 11), (DEC, 31)),
|
|
550
|
-
|
|
551
|
-
2009: (NOV, 28),
|
|
552
|
-
2010: (NOV, 17),
|
|
553
|
-
2011: (NOV, 7),
|
|
554
|
-
2012: (OCT, 27),
|
|
555
|
-
2013: (OCT, 16),
|
|
540
|
+
2007: (DEC, 20),
|
|
556
541
|
2014: (OCT, 6),
|
|
557
542
|
2015: (SEP, 25),
|
|
558
543
|
2016: (SEP, 13),
|
|
559
|
-
2017: (SEP, 2),
|
|
560
|
-
2018: (AUG, 22),
|
|
561
|
-
2019: (AUG, 12),
|
|
562
|
-
2020: (AUG, 1),
|
|
563
|
-
2021: (JUL, 21),
|
|
564
|
-
2022: (JUL, 10),
|
|
565
|
-
2023: (JUN, 29),
|
|
566
|
-
2024: (JUN, 17),
|
|
567
|
-
2025: (JUN, 7),
|
|
568
544
|
}
|
|
569
545
|
|
|
570
546
|
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
571
547
|
EID_AL_FITR_DATES = {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
2009: (SEP, 21),
|
|
578
|
-
2011: (AUG, 31),
|
|
579
|
-
2012: (AUG, 20),
|
|
580
|
-
2014: (JUL, 29),
|
|
581
|
-
2015: (JUL, 18),
|
|
582
|
-
2016: (JUL, 7),
|
|
583
|
-
2017: (JUN, 26),
|
|
584
|
-
2018: (JUN, 16),
|
|
585
|
-
2019: (JUN, 5),
|
|
586
|
-
2020: (MAY, 25),
|
|
587
|
-
2021: (MAY, 14),
|
|
588
|
-
2022: (MAY, 3),
|
|
589
|
-
2023: (APR, 22),
|
|
590
|
-
2024: (APR, 11),
|
|
591
|
-
2025: (MAR, 31),
|
|
548
|
+
2004: (NOV, 14),
|
|
549
|
+
2005: (NOV, 3),
|
|
550
|
+
2007: (OCT, 13),
|
|
551
|
+
2010: (SEP, 10),
|
|
552
|
+
2013: (AUG, 8),
|
|
592
553
|
}
|
|
593
554
|
|
|
594
555
|
MAWLID_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
595
556
|
MAWLID_DATES = {
|
|
596
|
-
2001: (JUN, 5),
|
|
597
|
-
2002: (MAY, 25),
|
|
598
557
|
2003: (MAY, 15),
|
|
599
558
|
2004: (MAY, 3),
|
|
600
|
-
|
|
601
|
-
2006: (APR, 11),
|
|
602
|
-
2007: (APR, 1),
|
|
603
|
-
2008: (MAR, 21),
|
|
604
|
-
2010: (FEB, 27),
|
|
605
|
-
2011: (FEB, 16),
|
|
606
|
-
2012: (FEB, 5),
|
|
607
|
-
2013: (JAN, 25),
|
|
608
|
-
2014: (JAN, 14),
|
|
559
|
+
2009: (MAR, 9),
|
|
609
560
|
2015: ((JAN, 4), (DEC, 25)),
|
|
610
561
|
2016: (DEC, 13),
|
|
611
562
|
2017: (DEC, 2),
|
|
612
|
-
2018: (NOV, 21),
|
|
613
|
-
2019: (NOV, 10),
|
|
614
|
-
2020: (OCT, 30),
|
|
615
|
-
2021: (OCT, 19),
|
|
616
|
-
2022: (OCT, 9),
|
|
617
|
-
2023: (SEP, 28),
|
|
618
|
-
2024: (SEP, 16),
|
|
619
|
-
2025: (SEP, 5),
|
|
620
563
|
}
|