holidays 0.83__py3-none-any.whl → 0.85__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/__init__.py +0 -2
- holidays/calendars/__init__.py +0 -2
- holidays/calendars/balinese_saka.py +2 -3
- holidays/calendars/buddhist.py +3 -4
- holidays/calendars/burmese.py +9 -10
- holidays/calendars/chinese.py +8 -9
- holidays/calendars/hebrew.py +10 -11
- holidays/calendars/hindu.py +27 -28
- holidays/calendars/mandaean.py +2 -3
- holidays/calendars/mongolian.py +4 -5
- holidays/calendars/persian.py +2 -3
- holidays/calendars/sinhala.py +25 -14
- holidays/calendars/thai.py +13 -14
- holidays/calendars/tibetan.py +12 -13
- holidays/constants.py +0 -2
- holidays/countries/__init__.py +0 -2
- holidays/countries/aland_islands.py +4 -4
- holidays/countries/american_samoa.py +4 -4
- holidays/countries/angola.py +1 -2
- holidays/countries/austria.py +1 -1
- holidays/countries/azerbaijan.py +2 -0
- holidays/countries/china.py +10 -1
- holidays/countries/ecuador.py +12 -4
- holidays/countries/french_guiana.py +4 -4
- holidays/countries/french_polynesia.py +4 -4
- holidays/countries/french_southern_territories.py +4 -4
- holidays/countries/guadeloupe.py +4 -4
- holidays/countries/guam.py +4 -4
- holidays/countries/guernsey.py +1 -2
- holidays/countries/italy.py +2 -2
- holidays/countries/jersey.py +1 -2
- holidays/countries/malta.py +1 -1
- holidays/countries/marshall_islands.py +8 -6
- holidays/countries/martinique.py +4 -4
- holidays/countries/mauritania.py +2 -4
- holidays/countries/mayotte.py +4 -4
- holidays/countries/new_caledonia.py +4 -4
- holidays/countries/northern_mariana_islands.py +4 -4
- holidays/countries/portugal.py +6 -3
- holidays/countries/puerto_rico.py +4 -4
- holidays/countries/reunion.py +4 -4
- holidays/countries/saint_barthelemy.py +4 -4
- holidays/countries/saint_martin.py +4 -4
- holidays/countries/saint_pierre_and_miquelon.py +4 -4
- holidays/countries/samoa.py +1 -3
- holidays/countries/sint_maarten.py +1 -1
- holidays/countries/spain.py +418 -214
- holidays/countries/sri_lanka.py +37 -33
- holidays/countries/svalbard_and_jan_mayen.py +4 -4
- holidays/countries/taiwan.py +2 -2
- holidays/countries/thailand.py +4 -1
- holidays/countries/turkey.py +7 -4
- holidays/countries/united_kingdom.py +1 -2
- holidays/countries/united_states.py +5 -2
- holidays/countries/united_states_minor_outlying_islands.py +4 -4
- holidays/countries/united_states_virgin_islands.py +4 -4
- holidays/countries/wallis_and_futuna.py +4 -4
- holidays/financial/__init__.py +1 -3
- holidays/financial/ice_futures_europe.py +6 -2
- holidays/financial/national_stock_exchange_of_india.py +141 -38
- holidays/groups/__init__.py +0 -2
- holidays/groups/balinese_saka.py +2 -3
- holidays/groups/buddhist.py +4 -5
- holidays/groups/burmese.py +11 -12
- holidays/groups/chinese.py +18 -19
- holidays/groups/christian.py +20 -0
- holidays/groups/eastern.py +2 -3
- holidays/groups/hebrew.py +7 -10
- holidays/groups/hindu.py +36 -37
- holidays/groups/mandaean.py +13 -14
- holidays/groups/mongolian.py +7 -8
- holidays/groups/persian.py +14 -15
- holidays/groups/sinhala.py +13 -14
- holidays/groups/thai.py +12 -13
- holidays/groups/tibetan.py +16 -17
- holidays/holiday_base.py +34 -33
- holidays/ical.py +1 -2
- holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/EC.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/es/LC_MESSAGES/EC.mo +0 -0
- holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/si_LK/LC_MESSAGES/LK.mo +0 -0
- holidays/locale/ta_LK/LC_MESSAGES/LK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
- holidays/locale/th/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/US.mo +0 -0
- holidays/locale/tr/LC_MESSAGES/TR.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/EC.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/TR.mo +0 -0
- holidays/mixins/__init__.py +0 -2
- holidays/mixins/child_entity.py +1 -3
- holidays/observed_holiday_base.py +12 -13
- holidays/registry.py +4 -4
- holidays/utils.py +13 -14
- holidays/version.py +1 -1
- {holidays-0.83.dist-info → holidays-0.85.dist-info}/METADATA +4 -5
- {holidays-0.83.dist-info → holidays-0.85.dist-info}/RECORD +112 -111
- {holidays-0.83.dist-info → holidays-0.85.dist-info}/licenses/CONTRIBUTORS +2 -0
- {holidays-0.83.dist-info → holidays-0.85.dist-info}/WHEEL +0 -0
- {holidays-0.83.dist-info → holidays-0.85.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.83.dist-info → holidays-0.85.dist-info}/top_level.txt +0 -0
|
@@ -13,13 +13,18 @@
|
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
15
|
from holidays.calendars import _CustomHinduHolidays, _CustomIslamicHolidays
|
|
16
|
-
from holidays.calendars.gregorian import MAR, APR, MAY, JUN, JUL,
|
|
17
|
-
from holidays.groups import
|
|
16
|
+
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, SEP, OCT, NOV, DEC
|
|
17
|
+
from holidays.groups import (
|
|
18
|
+
ChristianHolidays,
|
|
19
|
+
HinduCalendarHolidays,
|
|
20
|
+
IslamicHolidays,
|
|
21
|
+
StaticHolidays,
|
|
22
|
+
)
|
|
18
23
|
from holidays.observed_holiday_base import ObservedHolidayBase, SAT_TO_NONE, SUN_TO_NONE
|
|
19
24
|
|
|
20
25
|
|
|
21
26
|
class NationalStockExchangeOfIndia(
|
|
22
|
-
ObservedHolidayBase, HinduCalendarHolidays, ChristianHolidays, IslamicHolidays
|
|
27
|
+
ObservedHolidayBase, HinduCalendarHolidays, ChristianHolidays, IslamicHolidays, StaticHolidays
|
|
23
28
|
):
|
|
24
29
|
"""National Stock Exchange of India (NSE) holidays.
|
|
25
30
|
|
|
@@ -27,6 +32,27 @@ class NationalStockExchangeOfIndia(
|
|
|
27
32
|
* <https://web.archive.org/web/20250821175252/https://www.nseindia.com/resources/exchange-communication-circulars>
|
|
28
33
|
|
|
29
34
|
Historical data:
|
|
35
|
+
* [2001](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr2189.wri)
|
|
36
|
+
* [2002](https://archive.org/details/cmtr3058)
|
|
37
|
+
* [2003](https://web.archive.org/web/20250904042405/https://nsearchives.nseindia.com/content/circulars/cmtr3809.htm)
|
|
38
|
+
* [2004](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr4645.htm)
|
|
39
|
+
* [2005](https://web.archive.org/web/20250904043234/https://nsearchives.nseindia.com/content/circulars/cmtr5633.htm)
|
|
40
|
+
* [2006](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr6946.htm)
|
|
41
|
+
* [2007](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr8182.pdf)
|
|
42
|
+
* [2008](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr9908.htm)
|
|
43
|
+
* [2009](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr11733.htm)
|
|
44
|
+
* [2010](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr13713.pdf)
|
|
45
|
+
* [2011](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr16348.pdf)
|
|
46
|
+
* [2012](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr19539.pdf)
|
|
47
|
+
* [2013](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr22317.pdf)
|
|
48
|
+
* [2014](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr25326.pdf)
|
|
49
|
+
* [2015](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr28337.pdf)
|
|
50
|
+
* [2016](https://web.archive.org/web/20250903152854/https://nsearchives.nseindia.com/content/circulars/CMTR31297.pdf)
|
|
51
|
+
* [2017](https://web.archive.org/web/20250903152829/https://nsearchives.nseindia.com/content/circulars/CMTR33746.pdf)
|
|
52
|
+
* [2018](https://web.archive.org/web/20250903152307/https://nsearchives.nseindia.com/content/circulars/CMTR36475.pdf)
|
|
53
|
+
* [2019](https://archive.org/details/nsearchives.nseindia.comcontentcircularscmtr39612.pdf)
|
|
54
|
+
* [2020](https://web.archive.org/web/20250903152140/https://nsearchives.nseindia.com/content/circulars/CMTR42877.pdf)
|
|
55
|
+
* [2021](https://web.archive.org/web/20250903152041/https://nsearchives.nseindia.com/content/circulars/CMTR46623.pdf)
|
|
30
56
|
* [2022](https://web.archive.org/web/20250821071611/https://nsearchives.nseindia.com/content/circulars/CMTR50560.pdf)
|
|
31
57
|
* [2023](https://web.archive.org/web/20250821071635/https://nsearchives.nseindia.com/content/circulars/CMTR54757.pdf)
|
|
32
58
|
* [2024](https://web.archive.org/web/20250821071650/https://nsearchives.nseindia.com/content/circulars/CMTR59722.pdf)
|
|
@@ -46,6 +72,9 @@ class NationalStockExchangeOfIndia(
|
|
|
46
72
|
islamic_show_estimated:
|
|
47
73
|
Whether to add "estimated" label to Islamic holidays name
|
|
48
74
|
if holiday date is estimated.
|
|
75
|
+
|
|
76
|
+
In India, the dates of the Islamic calendar usually fall a day later than
|
|
77
|
+
the corresponding dates in the Umm al-Qura calendar.
|
|
49
78
|
"""
|
|
50
79
|
ChristianHolidays.__init__(self)
|
|
51
80
|
HinduCalendarHolidays.__init__(self, cls=NationalStockExchangeOfIndiaHinduHolidays)
|
|
@@ -53,7 +82,9 @@ class NationalStockExchangeOfIndia(
|
|
|
53
82
|
self,
|
|
54
83
|
cls=NationalStockExchangeOfIndiaIslamicHolidays,
|
|
55
84
|
show_estimated=islamic_show_estimated,
|
|
85
|
+
calendar_delta_days=+1,
|
|
56
86
|
)
|
|
87
|
+
StaticHolidays.__init__(self, cls=NationalStockExchangeOfIndiaStaticHolidays)
|
|
57
88
|
kwargs.setdefault("observed_rule", SAT_TO_NONE + SUN_TO_NONE)
|
|
58
89
|
super().__init__(*args, **kwargs)
|
|
59
90
|
|
|
@@ -64,16 +95,23 @@ class NationalStockExchangeOfIndia(
|
|
|
64
95
|
# Good Friday.
|
|
65
96
|
self._add_good_friday(tr("Good Friday"))
|
|
66
97
|
|
|
67
|
-
# Dr.
|
|
98
|
+
# Dr. B. R. Ambedkar Jayanti.
|
|
68
99
|
self._move_holiday(self._add_holiday_apr_14(tr("Dr. Baba Saheb Ambedkar Jayanti")))
|
|
69
100
|
|
|
70
|
-
|
|
71
|
-
|
|
101
|
+
self._move_holiday(
|
|
102
|
+
self._add_holiday_may_1(
|
|
103
|
+
# May Day.
|
|
104
|
+
tr("May Day")
|
|
105
|
+
if 2010 <= self._year <= 2014
|
|
106
|
+
# Maharashtra Day.
|
|
107
|
+
else tr("Maharashtra Day")
|
|
108
|
+
)
|
|
109
|
+
)
|
|
72
110
|
|
|
73
111
|
# Independence Day.
|
|
74
112
|
self._move_holiday(self._add_holiday_aug_15(tr("Independence Day")))
|
|
75
113
|
|
|
76
|
-
#
|
|
114
|
+
# Gandhi Jayanti.
|
|
77
115
|
self._move_holiday(self._add_holiday_oct_2(tr("Mahatma Gandhi Jayanti")))
|
|
78
116
|
|
|
79
117
|
# Christmas Day.
|
|
@@ -81,17 +119,19 @@ class NationalStockExchangeOfIndia(
|
|
|
81
119
|
|
|
82
120
|
# Hindu Calendar Holidays.
|
|
83
121
|
|
|
84
|
-
|
|
85
|
-
|
|
122
|
+
if self._year >= 2007:
|
|
123
|
+
# Maha Shivaratri.
|
|
124
|
+
self._move_holiday(self._add_maha_shivaratri(tr("Maha Shivaratri")))
|
|
86
125
|
|
|
87
126
|
# Holi.
|
|
88
127
|
self._move_holiday(self._add_holi(tr("Holi")))
|
|
89
128
|
|
|
90
|
-
|
|
91
|
-
|
|
129
|
+
if self._year >= 2006:
|
|
130
|
+
# Ram Navami.
|
|
131
|
+
self._move_holiday(self._add_ram_navami(tr("Ram Navami")))
|
|
92
132
|
|
|
93
|
-
|
|
94
|
-
|
|
133
|
+
# Mahavir Jayanti.
|
|
134
|
+
self._move_holiday(self._add_mahavir_jayanti(tr("Mahavir Jayanti")))
|
|
95
135
|
|
|
96
136
|
# Ganesh Chaturthi.
|
|
97
137
|
self._move_holiday(self._add_ganesh_chaturthi(tr("Ganesh Chaturthi")))
|
|
@@ -99,28 +139,35 @@ class NationalStockExchangeOfIndia(
|
|
|
99
139
|
# Dussehra.
|
|
100
140
|
self._move_holiday(self._add_dussehra(tr("Dussehra")))
|
|
101
141
|
|
|
102
|
-
# Diwali
|
|
103
|
-
self._move_holiday(self.
|
|
142
|
+
# Diwali Lakshmi Puja.
|
|
143
|
+
self._move_holiday(self._add_diwali_india(tr("Diwali Laxmi Pujan")))
|
|
104
144
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# between Diwali Laxmi Pujan and Diwali Balipratipada.
|
|
109
|
-
self._move_holiday(
|
|
110
|
-
self._add_bhai_dooj(name)
|
|
111
|
-
if self._year in {2022, 2023}
|
|
112
|
-
else self._add_govardhan_puja(name)
|
|
113
|
-
)
|
|
145
|
+
if self._year <= 2002 or self._year >= 2011:
|
|
146
|
+
# Diwali Balipratipada.
|
|
147
|
+
self._move_holiday(self._add_govardhan_puja(tr("Diwali Balipratipada")))
|
|
114
148
|
|
|
115
149
|
# Guru Nanak Jayanti.
|
|
116
150
|
self._move_holiday(self._add_guru_nanak_jayanti(tr("Guru Nanak Jayanti")))
|
|
117
151
|
|
|
152
|
+
if 2003 <= self._year <= 2010:
|
|
153
|
+
# Bhai Dooj.
|
|
154
|
+
self._move_holiday(self._add_bhai_dooj(tr("Bhau Bhij")))
|
|
155
|
+
|
|
156
|
+
if 2006 <= self._year <= 2009:
|
|
157
|
+
# Buddha Purnima.
|
|
158
|
+
self._move_holiday(self._add_buddha_purnima(tr("Buddha Purnima")))
|
|
159
|
+
|
|
118
160
|
# Islamic Calendar Holidays.
|
|
119
161
|
|
|
120
162
|
# Ashura.
|
|
121
163
|
for dt in self._add_ashura_day(tr("Muharram")):
|
|
122
164
|
self._move_holiday(dt)
|
|
123
165
|
|
|
166
|
+
if 2006 <= self._year <= 2009:
|
|
167
|
+
# Prophet's Birthday.
|
|
168
|
+
for dt in self._add_mawlid_day(tr("Id-E-Milad-Un-Nabi")):
|
|
169
|
+
self._move_holiday(dt)
|
|
170
|
+
|
|
124
171
|
# Eid al-Fitr.
|
|
125
172
|
for dt in self._add_eid_al_fitr_day(tr("Id-Ul-Fitr (Ramadan Eid)")):
|
|
126
173
|
self._move_holiday(dt)
|
|
@@ -139,31 +186,87 @@ class NSE(NationalStockExchangeOfIndia):
|
|
|
139
186
|
|
|
140
187
|
|
|
141
188
|
class NationalStockExchangeOfIndiaHinduHolidays(_CustomHinduHolidays):
|
|
189
|
+
BUDDHA_PURNIMA_DATES = {
|
|
190
|
+
2008: (MAY, 19),
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
DIWALI_INDIA_DATES = {
|
|
194
|
+
2024: (NOV, 1),
|
|
195
|
+
2025: (OCT, 21),
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
DUSSEHRA_DATES = {
|
|
199
|
+
2003: (OCT, 4),
|
|
200
|
+
2018: (OCT, 18),
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
GOVARDHAN_PUJA_DATES = {
|
|
204
|
+
2001: (NOV, 16),
|
|
205
|
+
2002: (NOV, 6),
|
|
206
|
+
2003: (OCT, 25),
|
|
207
|
+
2006: (OCT, 23),
|
|
208
|
+
2020: (NOV, 16),
|
|
209
|
+
2022: (OCT, 26),
|
|
210
|
+
2023: (NOV, 14),
|
|
211
|
+
}
|
|
212
|
+
|
|
142
213
|
HOLI_DATES = {
|
|
143
214
|
2023: (MAR, 7),
|
|
144
215
|
}
|
|
145
216
|
|
|
217
|
+
MAHAVIR_JAYANTI_DATES = {
|
|
218
|
+
2010: (MAR, 28),
|
|
219
|
+
2016: (APR, 19),
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
RAM_NAVAMI_DATES = {
|
|
223
|
+
2007: (MAR, 27),
|
|
224
|
+
}
|
|
225
|
+
|
|
146
226
|
|
|
147
227
|
class NationalStockExchangeOfIndiaIslamicHolidays(_CustomIslamicHolidays):
|
|
148
|
-
ASHURA_DATES_CONFIRMED_YEARS = (
|
|
228
|
+
ASHURA_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
149
229
|
ASHURA_DATES = {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
230
|
+
2003: (MAR, 15),
|
|
231
|
+
2006: (FEB, 9),
|
|
232
|
+
2008: (JAN, 19),
|
|
233
|
+
2015: (OCT, 23),
|
|
234
|
+
2018: (SEP, 20),
|
|
154
235
|
}
|
|
155
236
|
|
|
156
|
-
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (
|
|
237
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
157
238
|
EID_AL_ADHA_DATES = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
239
|
+
2003: (FEB, 13),
|
|
240
|
+
2005: (JAN, 21),
|
|
241
|
+
2006: (JAN, 11),
|
|
242
|
+
2007: ((JAN, 1), (DEC, 21)),
|
|
243
|
+
2009: (NOV, 27),
|
|
244
|
+
2014: (OCT, 6),
|
|
245
|
+
2015: (SEP, 25),
|
|
246
|
+
2016: (SEP, 13),
|
|
247
|
+
2023: (JUN, 28),
|
|
161
248
|
}
|
|
162
249
|
|
|
163
|
-
EID_AL_FITR_DATES_CONFIRMED_YEARS = (
|
|
250
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2001, 2025)
|
|
164
251
|
EID_AL_FITR_DATES = {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
252
|
+
2002: (DEC, 7),
|
|
253
|
+
2005: (NOV, 5),
|
|
254
|
+
2006: (OCT, 25),
|
|
255
|
+
2010: (SEP, 10),
|
|
256
|
+
2016: (JUL, 6),
|
|
257
|
+
2021: (MAY, 13),
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
MAWLID_DATES_CONFIRMED_YEARS = (2006, 2009)
|
|
261
|
+
MAWLID_DATES = {
|
|
262
|
+
2008: (MAR, 20),
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
class NationalStockExchangeOfIndiaStaticHolidays:
|
|
267
|
+
"""National Stock Exchange of India (NSE) special holidays."""
|
|
268
|
+
|
|
269
|
+
special_public_holidays = {
|
|
270
|
+
# New Year's Day.
|
|
271
|
+
2010: (JAN, 1, tr("New Year")),
|
|
169
272
|
}
|
holidays/groups/__init__.py
CHANGED
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
# ruff: noqa: F401
|
|
14
|
-
|
|
15
13
|
from holidays.groups.balinese_saka import BalineseSakaCalendarHolidays
|
|
16
14
|
from holidays.groups.buddhist import BuddhistCalendarHolidays
|
|
17
15
|
from holidays.groups.burmese import BurmeseCalendarHolidays
|
holidays/groups/balinese_saka.py
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
13
|
from datetime import date
|
|
14
|
-
from typing import Optional
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.balinese_saka import _BalineseSakaLunar
|
|
17
16
|
|
|
@@ -24,7 +23,7 @@ class BalineseSakaCalendarHolidays:
|
|
|
24
23
|
def __init__(self) -> None:
|
|
25
24
|
self._balinese_saka_calendar = _BalineseSakaLunar()
|
|
26
25
|
|
|
27
|
-
def _add_balinese_saka_calendar_holiday(self, name: str, dt:
|
|
26
|
+
def _add_balinese_saka_calendar_holiday(self, name: str, dt: date | None) -> date | None:
|
|
28
27
|
"""
|
|
29
28
|
Add Balinese Saka calendar holiday.
|
|
30
29
|
"""
|
|
@@ -32,7 +31,7 @@ class BalineseSakaCalendarHolidays:
|
|
|
32
31
|
return None
|
|
33
32
|
return self._add_holiday(name, dt)
|
|
34
33
|
|
|
35
|
-
def _add_nyepi(self, name) ->
|
|
34
|
+
def _add_nyepi(self, name) -> date | None:
|
|
36
35
|
"""
|
|
37
36
|
Add Nyepi (Day following the 9th of Dark Moon (Tilem)).
|
|
38
37
|
|
holidays/groups/buddhist.py
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
13
|
from datetime import date
|
|
14
|
-
from typing import Optional
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.buddhist import _BuddhistLunisolar
|
|
17
16
|
from holidays.groups.eastern import EasternCalendarHolidays
|
|
@@ -27,8 +26,8 @@ class BuddhistCalendarHolidays(EasternCalendarHolidays):
|
|
|
27
26
|
self._buddhist_calendar_show_estimated = show_estimated
|
|
28
27
|
|
|
29
28
|
def _add_buddhist_calendar_holiday(
|
|
30
|
-
self, name: str, dt_estimated: tuple[
|
|
31
|
-
) ->
|
|
29
|
+
self, name: str, dt_estimated: tuple[date | None, bool]
|
|
30
|
+
) -> date | None:
|
|
32
31
|
"""
|
|
33
32
|
Add Buddhist calendar holiday.
|
|
34
33
|
|
|
@@ -39,7 +38,7 @@ class BuddhistCalendarHolidays(EasternCalendarHolidays):
|
|
|
39
38
|
name, dt_estimated, show_estimated=self._buddhist_calendar_show_estimated
|
|
40
39
|
)
|
|
41
40
|
|
|
42
|
-
def _add_vesak(self, name) ->
|
|
41
|
+
def _add_vesak(self, name) -> date | None:
|
|
43
42
|
"""
|
|
44
43
|
Add Vesak (15th day of the 4th lunar month).
|
|
45
44
|
|
|
@@ -50,7 +49,7 @@ class BuddhistCalendarHolidays(EasternCalendarHolidays):
|
|
|
50
49
|
name, self._buddhist_calendar.vesak_date(self._year)
|
|
51
50
|
)
|
|
52
51
|
|
|
53
|
-
def _add_vesak_may(self, name) ->
|
|
52
|
+
def _add_vesak_may(self, name) -> date | None:
|
|
54
53
|
"""
|
|
55
54
|
Add Vesak (on the day of the first full moon in May
|
|
56
55
|
in the Gregorian calendar).
|
holidays/groups/burmese.py
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
13
|
from datetime import date
|
|
14
|
-
from typing import Optional
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.burmese import _BurmeseLunisolar
|
|
17
16
|
from holidays.calendars.gregorian import _timedelta
|
|
@@ -24,8 +23,8 @@ class BurmeseCalendarHolidays:
|
|
|
24
23
|
self._burmese_calendar = _BurmeseLunisolar()
|
|
25
24
|
|
|
26
25
|
def _add_burmese_calendar_holiday(
|
|
27
|
-
self, name: str, dt:
|
|
28
|
-
) ->
|
|
26
|
+
self, name: str, dt: date | None = None, days_delta: int = 0
|
|
27
|
+
) -> date | None:
|
|
29
28
|
"""Add Burmese calendar holiday."""
|
|
30
29
|
|
|
31
30
|
if dt is None:
|
|
@@ -61,7 +60,7 @@ class BurmeseCalendarHolidays:
|
|
|
61
60
|
)
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
def _add_kason_full_moon_day(self, name: str) ->
|
|
63
|
+
def _add_kason_full_moon_day(self, name: str) -> date | None:
|
|
65
64
|
"""Add Full Moon Day of Kason holiday.
|
|
66
65
|
|
|
67
66
|
Vesak is known as the Full Moon Day of Kason, which is the second month
|
|
@@ -79,7 +78,7 @@ class BurmeseCalendarHolidays:
|
|
|
79
78
|
name, self._burmese_calendar.kason_full_moon_date(self._year)
|
|
80
79
|
)
|
|
81
80
|
|
|
82
|
-
def _add_myanmar_diwali(self, name: str) ->
|
|
81
|
+
def _add_myanmar_diwali(self, name: str) -> date | None:
|
|
83
82
|
"""Add Myanmar Diwali holiday.
|
|
84
83
|
|
|
85
84
|
Diwali (Deepavali, Festival of Lights) is one of the most important festivals
|
|
@@ -98,7 +97,7 @@ class BurmeseCalendarHolidays:
|
|
|
98
97
|
name, self._burmese_calendar.tazaungmon_waxing_moon_date(self._year)
|
|
99
98
|
)
|
|
100
99
|
|
|
101
|
-
def _add_myanmar_national_day(self, name: str) ->
|
|
100
|
+
def _add_myanmar_national_day(self, name: str) -> date | None:
|
|
102
101
|
"""Add Myanmar National Day holiday.
|
|
103
102
|
|
|
104
103
|
National Day is a public holiday in Myanmar, marking the anniversary of the first
|
|
@@ -163,7 +162,7 @@ class BurmeseCalendarHolidays:
|
|
|
163
162
|
if (dt := self._add_holiday(name, _timedelta(akya, delta)))
|
|
164
163
|
}
|
|
165
164
|
|
|
166
|
-
def _add_tabaung_full_moon_day(self, name: str) ->
|
|
165
|
+
def _add_tabaung_full_moon_day(self, name: str) -> date | None:
|
|
167
166
|
"""Add Full Moon Day of Tabaung holiday.
|
|
168
167
|
|
|
169
168
|
Māgha Pūjā (also written as Makha Bucha Day, Meak Bochea) is a Buddhist festival
|
|
@@ -181,7 +180,7 @@ class BurmeseCalendarHolidays:
|
|
|
181
180
|
name, self._burmese_calendar.tabaung_full_moon_date(self._year - 1)
|
|
182
181
|
)
|
|
183
182
|
|
|
184
|
-
def _add_tazaungmon_full_moon_day(self, name: str) ->
|
|
183
|
+
def _add_tazaungmon_full_moon_day(self, name: str) -> date | None:
|
|
185
184
|
"""Add Full Moon Day of Tazaungmon holiday.
|
|
186
185
|
|
|
187
186
|
The Tazaungdaing Festival, also known as the Festival of Lights, held on the full moon day
|
|
@@ -199,7 +198,7 @@ class BurmeseCalendarHolidays:
|
|
|
199
198
|
name, self._burmese_calendar.tazaungmon_full_moon_date(self._year)
|
|
200
199
|
)
|
|
201
200
|
|
|
202
|
-
def _add_thadingyut_full_moon_eve(self, name: str) ->
|
|
201
|
+
def _add_thadingyut_full_moon_eve(self, name: str) -> date | None:
|
|
203
202
|
"""Add Pre-Full Moon Day of Thadingyut holiday.
|
|
204
203
|
|
|
205
204
|
The Thadingyut Festival, also known as the Lighting Festival of Myanmar, is held
|
|
@@ -217,7 +216,7 @@ class BurmeseCalendarHolidays:
|
|
|
217
216
|
name, self._burmese_calendar.thadingyut_full_moon_date(self._year), days_delta=-1
|
|
218
217
|
)
|
|
219
218
|
|
|
220
|
-
def _add_thadingyut_full_moon_day(self, name: str) ->
|
|
219
|
+
def _add_thadingyut_full_moon_day(self, name: str) -> date | None:
|
|
221
220
|
"""Add Full Moon Day of Thadingyut holiday.
|
|
222
221
|
|
|
223
222
|
The Thadingyut Festival, also known as the Lighting Festival of Myanmar, is held
|
|
@@ -235,7 +234,7 @@ class BurmeseCalendarHolidays:
|
|
|
235
234
|
name, self._burmese_calendar.thadingyut_full_moon_date(self._year)
|
|
236
235
|
)
|
|
237
236
|
|
|
238
|
-
def _add_thadingyut_full_moon_day_two(self, name: str) ->
|
|
237
|
+
def _add_thadingyut_full_moon_day_two(self, name: str) -> date | None:
|
|
239
238
|
"""Add Post-Full Moon Day of Thadingyut holiday.
|
|
240
239
|
|
|
241
240
|
The Thadingyut Festival, also known as the Lighting Festival of Myanmar, is held
|
|
@@ -253,7 +252,7 @@ class BurmeseCalendarHolidays:
|
|
|
253
252
|
name, self._burmese_calendar.thadingyut_full_moon_date(self._year), days_delta=+1
|
|
254
253
|
)
|
|
255
254
|
|
|
256
|
-
def _add_waso_full_moon_day(self, name: str) ->
|
|
255
|
+
def _add_waso_full_moon_day(self, name: str) -> date | None:
|
|
257
256
|
"""Add Full Moon Day of Waso holiday.
|
|
258
257
|
|
|
259
258
|
Vassa is the three-month annual retreat observed by Theravada Buddhists.
|
holidays/groups/chinese.py
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
13
|
from datetime import date
|
|
14
|
-
from typing import Optional
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.chinese import _ChineseLunisolar, CHINESE_CALENDAR
|
|
17
16
|
from holidays.calendars.gregorian import APR
|
|
@@ -83,8 +82,8 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
83
82
|
return self._chinese_calendar.winter_solstice_date(self._year)[0]
|
|
84
83
|
|
|
85
84
|
def _add_chinese_calendar_holiday(
|
|
86
|
-
self, name: str, dt_estimated: tuple[
|
|
87
|
-
) ->
|
|
85
|
+
self, name: str, dt_estimated: tuple[date | None, bool], days_delta: int = 0
|
|
86
|
+
) -> date | None:
|
|
88
87
|
"""
|
|
89
88
|
Add Chinese calendar holiday.
|
|
90
89
|
|
|
@@ -98,7 +97,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
98
97
|
days_delta=days_delta,
|
|
99
98
|
)
|
|
100
99
|
|
|
101
|
-
def _add_chinese_birthday_of_buddha(self, name) ->
|
|
100
|
+
def _add_chinese_birthday_of_buddha(self, name) -> date | None:
|
|
102
101
|
"""
|
|
103
102
|
Add Birthday of the Buddha by Chinese lunar calendar (8th day of the
|
|
104
103
|
4th lunar month).
|
|
@@ -112,7 +111,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
112
111
|
name, self._chinese_calendar.buddha_birthday_date(self._year)
|
|
113
112
|
)
|
|
114
113
|
|
|
115
|
-
def _add_chinese_day_before_new_years_eve(self, name) ->
|
|
114
|
+
def _add_chinese_day_before_new_years_eve(self, name) -> date | None:
|
|
116
115
|
"""
|
|
117
116
|
Add day before Chinese New Year's Eve (second to last day of 12th lunar month).
|
|
118
117
|
|
|
@@ -123,7 +122,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
123
122
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=-2
|
|
124
123
|
)
|
|
125
124
|
|
|
126
|
-
def _add_chinese_new_years_eve(self, name) ->
|
|
125
|
+
def _add_chinese_new_years_eve(self, name) -> date | None:
|
|
127
126
|
"""
|
|
128
127
|
Add Chinese New Year's Eve (last day of 12th lunar month).
|
|
129
128
|
|
|
@@ -134,7 +133,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
134
133
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=-1
|
|
135
134
|
)
|
|
136
135
|
|
|
137
|
-
def _add_chinese_new_years_day(self, name) ->
|
|
136
|
+
def _add_chinese_new_years_day(self, name) -> date | None:
|
|
138
137
|
"""
|
|
139
138
|
Add Chinese New Year's Day (first day of the first lunar month).
|
|
140
139
|
|
|
@@ -146,7 +145,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
146
145
|
name, self._chinese_calendar.lunar_new_year_date(self._year)
|
|
147
146
|
)
|
|
148
147
|
|
|
149
|
-
def _add_chinese_new_years_day_two(self, name) ->
|
|
148
|
+
def _add_chinese_new_years_day_two(self, name) -> date | None:
|
|
150
149
|
"""
|
|
151
150
|
Add Chinese New Year's Day Two.
|
|
152
151
|
|
|
@@ -156,7 +155,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
156
155
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+1
|
|
157
156
|
)
|
|
158
157
|
|
|
159
|
-
def _add_chinese_new_years_day_three(self, name) ->
|
|
158
|
+
def _add_chinese_new_years_day_three(self, name) -> date | None:
|
|
160
159
|
"""
|
|
161
160
|
Add Chinese New Year's Day Three.
|
|
162
161
|
|
|
@@ -166,7 +165,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
166
165
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+2
|
|
167
166
|
)
|
|
168
167
|
|
|
169
|
-
def _add_chinese_new_years_day_four(self, name) ->
|
|
168
|
+
def _add_chinese_new_years_day_four(self, name) -> date | None:
|
|
170
169
|
"""
|
|
171
170
|
Add Chinese New Year's Day Four.
|
|
172
171
|
|
|
@@ -176,7 +175,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
176
175
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+3
|
|
177
176
|
)
|
|
178
177
|
|
|
179
|
-
def _add_chinese_new_years_day_five(self, name) ->
|
|
178
|
+
def _add_chinese_new_years_day_five(self, name) -> date | None:
|
|
180
179
|
"""
|
|
181
180
|
Add Chinese New Year's Day Five.
|
|
182
181
|
|
|
@@ -186,7 +185,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
186
185
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+4
|
|
187
186
|
)
|
|
188
187
|
|
|
189
|
-
def _add_daeboreum_day(self, name) ->
|
|
188
|
+
def _add_daeboreum_day(self, name) -> date | None:
|
|
190
189
|
"""
|
|
191
190
|
Add Daeboreum Day (15th day of 1st lunar month).
|
|
192
191
|
|
|
@@ -198,7 +197,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
198
197
|
name, self._chinese_calendar.lunar_new_year_date(self._year), days_delta=+14
|
|
199
198
|
)
|
|
200
199
|
|
|
201
|
-
def _add_dongzhi_festival(self, name) ->
|
|
200
|
+
def _add_dongzhi_festival(self, name) -> date | None:
|
|
202
201
|
"""
|
|
203
202
|
Add Dongzhi Festival (Chinese Winter Solstice).
|
|
204
203
|
|
|
@@ -209,7 +208,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
209
208
|
"""
|
|
210
209
|
return self._add_holiday(name, self._dongzhi_festival)
|
|
211
210
|
|
|
212
|
-
def _add_hanshi_festival(self, name) ->
|
|
211
|
+
def _add_hanshi_festival(self, name) -> date | None:
|
|
213
212
|
"""
|
|
214
213
|
Add Hanshi Festival (105 days after Winter Solstice).
|
|
215
214
|
|
|
@@ -232,7 +231,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
232
231
|
"""
|
|
233
232
|
return self._add_holiday(name, self._qingming_festival)
|
|
234
233
|
|
|
235
|
-
def _add_double_ninth_festival(self, name) ->
|
|
234
|
+
def _add_double_ninth_festival(self, name) -> date | None:
|
|
236
235
|
"""
|
|
237
236
|
Add Double Ninth Festival (9th day of 9th lunar month).
|
|
238
237
|
|
|
@@ -244,7 +243,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
244
243
|
name, self._chinese_calendar.double_ninth_date(self._year)
|
|
245
244
|
)
|
|
246
245
|
|
|
247
|
-
def _add_dragon_boat_festival(self, name) ->
|
|
246
|
+
def _add_dragon_boat_festival(self, name) -> date | None:
|
|
248
247
|
"""
|
|
249
248
|
Add Dragon Boat Festival (5th day of 5th lunar month).
|
|
250
249
|
|
|
@@ -256,7 +255,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
256
255
|
name, self._chinese_calendar.dragon_boat_date(self._year)
|
|
257
256
|
)
|
|
258
257
|
|
|
259
|
-
def _add_hung_kings_day(self, name) ->
|
|
258
|
+
def _add_hung_kings_day(self, name) -> date | None:
|
|
260
259
|
"""
|
|
261
260
|
Add Hùng Kings' Temple Festival (10th day of the 3rd lunar month).
|
|
262
261
|
|
|
@@ -268,7 +267,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
268
267
|
name, self._chinese_calendar.hung_kings_date(self._year)
|
|
269
268
|
)
|
|
270
269
|
|
|
271
|
-
def _add_mid_autumn_festival(self, name) ->
|
|
270
|
+
def _add_mid_autumn_festival(self, name) -> date | None:
|
|
272
271
|
"""
|
|
273
272
|
Add Mid Autumn Festival (15th day of the 8th lunar month).
|
|
274
273
|
|
|
@@ -280,7 +279,7 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
280
279
|
name, self._chinese_calendar.mid_autumn_date(self._year)
|
|
281
280
|
)
|
|
282
281
|
|
|
283
|
-
def _add_mid_autumn_festival_day_two(self, name) ->
|
|
282
|
+
def _add_mid_autumn_festival_day_two(self, name) -> date | None:
|
|
284
283
|
"""
|
|
285
284
|
Add Mid Autumn Festival Day Two (16th day of the 8th lunar month).
|
|
286
285
|
|
holidays/groups/christian.py
CHANGED
|
@@ -414,6 +414,16 @@ class ChristianHolidays:
|
|
|
414
414
|
"""
|
|
415
415
|
return self._add_holiday(name, _timedelta(self._easter_sunday, +9))
|
|
416
416
|
|
|
417
|
+
def _add_saint_anthonys_day(self, name) -> date:
|
|
418
|
+
"""
|
|
419
|
+
Add Saint Anthony of Padua's Day (June 13th).
|
|
420
|
+
|
|
421
|
+
Saint Anthony's Day is celebrated on 13 June, the traditionally
|
|
422
|
+
accepted date of the saint's death.
|
|
423
|
+
https://en.wikipedia.org/wiki/Anthony_of_Padua
|
|
424
|
+
"""
|
|
425
|
+
return self._add_holiday_jun_13(name)
|
|
426
|
+
|
|
417
427
|
def _add_saint_georges_day(self, name) -> date:
|
|
418
428
|
"""
|
|
419
429
|
Add Saint George's Day (April 23th).
|
|
@@ -455,6 +465,16 @@ class ChristianHolidays:
|
|
|
455
465
|
"""
|
|
456
466
|
return self._add_holiday_mar_19(name)
|
|
457
467
|
|
|
468
|
+
def _add_saint_martins_day(self, name) -> date:
|
|
469
|
+
"""
|
|
470
|
+
Add Saint Martin of Tours Day (November 11th).
|
|
471
|
+
|
|
472
|
+
Saint Martin of Tours is the patron saint of many communities and organizations
|
|
473
|
+
across Europe, including France's Third Republic.
|
|
474
|
+
https://en.wikipedia.org/wiki/Martin_of_Tours
|
|
475
|
+
"""
|
|
476
|
+
return self._add_holiday_nov_11(name)
|
|
477
|
+
|
|
458
478
|
def _add_saint_patricks_day(self, name) -> date:
|
|
459
479
|
"""
|
|
460
480
|
Add Saint Patrick's Day (March 17th).
|
holidays/groups/eastern.py
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
from collections.abc import Iterable
|
|
14
14
|
from datetime import date
|
|
15
|
-
from typing import Optional
|
|
16
15
|
|
|
17
16
|
from holidays.calendars.gregorian import _timedelta
|
|
18
17
|
|
|
@@ -25,11 +24,11 @@ class EasternCalendarHolidays:
|
|
|
25
24
|
def _add_eastern_calendar_holiday(
|
|
26
25
|
self,
|
|
27
26
|
name: str,
|
|
28
|
-
dt_estimated: tuple[
|
|
27
|
+
dt_estimated: tuple[date | None, bool],
|
|
29
28
|
*,
|
|
30
29
|
show_estimated: bool = True,
|
|
31
30
|
days_delta: int = 0,
|
|
32
|
-
) ->
|
|
31
|
+
) -> date | None:
|
|
33
32
|
"""
|
|
34
33
|
Add Eastern (Buddhist, Chinese, Hindu, Islamic, Mongolian) calendar holiday.
|
|
35
34
|
|