holidays 0.26__py3-none-any.whl → 0.27__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 +1 -1
- holidays/calendars/__init__.py +5 -7
- holidays/calendars/buddhist.py +1 -3
- holidays/calendars/chinese.py +1 -3
- holidays/calendars/custom.py +1 -3
- holidays/calendars/hindu.py +1 -3
- holidays/calendars/islamic.py +1341 -1345
- holidays/calendars/thai.py +217 -26
- holidays/countries/__init__.py +4 -0
- holidays/countries/albania.py +6 -17
- holidays/countries/andorra.py +2 -6
- holidays/countries/angola.py +53 -39
- holidays/countries/argentina.py +13 -24
- holidays/countries/aruba.py +109 -48
- holidays/countries/australia.py +31 -69
- holidays/countries/azerbaijan.py +30 -38
- holidays/countries/bahrain.py +5 -5
- holidays/countries/bangladesh.py +1 -3
- holidays/countries/belarus.py +1 -3
- holidays/countries/belize.py +4 -16
- holidays/countries/bolivia.py +2 -6
- holidays/countries/bosnia_and_herzegovina.py +5 -17
- holidays/countries/botswana.py +9 -18
- holidays/countries/brazil.py +2 -5
- holidays/countries/brunei.py +427 -0
- holidays/countries/bulgaria.py +2 -6
- holidays/countries/burkina_faso.py +141 -0
- holidays/countries/burundi.py +2 -5
- holidays/countries/cambodia.py +323 -0
- holidays/countries/cameroon.py +71 -77
- holidays/countries/canada.py +19 -28
- holidays/countries/chad.py +133 -0
- holidays/countries/chile.py +4 -11
- holidays/countries/china.py +1 -2
- holidays/countries/colombia.py +17 -15
- holidays/countries/costa_rica.py +2 -6
- holidays/countries/curacao.py +100 -46
- holidays/countries/cyprus.py +2 -6
- holidays/countries/czechia.py +4 -12
- holidays/countries/denmark.py +1 -3
- holidays/countries/dominican_republic.py +1 -3
- holidays/countries/ecuador.py +54 -54
- holidays/countries/egypt.py +2 -5
- holidays/countries/eswatini.py +34 -44
- holidays/countries/ethiopia.py +5 -14
- holidays/countries/finland.py +1 -3
- holidays/countries/gabon.py +49 -53
- holidays/countries/greece.py +1 -2
- holidays/countries/honduras.py +16 -13
- holidays/countries/hongkong.py +7 -8
- holidays/countries/hungary.py +93 -92
- holidays/countries/india.py +4 -11
- holidays/countries/indonesia.py +120 -114
- holidays/countries/ireland.py +5 -15
- holidays/countries/isle_of_man.py +9 -4
- holidays/countries/israel.py +6 -18
- holidays/countries/italy.py +1 -2
- holidays/countries/jamaica.py +10 -18
- holidays/countries/japan.py +10 -16
- holidays/countries/kazakhstan.py +7 -22
- holidays/countries/kenya.py +1 -3
- holidays/countries/kyrgyzstan.py +2 -5
- holidays/countries/latvia.py +2 -6
- holidays/countries/lesotho.py +52 -32
- holidays/countries/lithuania.py +4 -12
- holidays/countries/madagascar.py +3 -9
- holidays/countries/malawi.py +34 -26
- holidays/countries/malaysia.py +223 -248
- holidays/countries/marshall_islands.py +4 -9
- holidays/countries/mexico.py +1 -3
- holidays/countries/moldova.py +3 -6
- holidays/countries/monaco.py +16 -26
- holidays/countries/montenegro.py +23 -19
- holidays/countries/morocco.py +2 -5
- holidays/countries/mozambique.py +35 -31
- holidays/countries/namibia.py +54 -35
- holidays/countries/new_zealand.py +11 -21
- holidays/countries/nicaragua.py +26 -22
- holidays/countries/nigeria.py +6 -17
- holidays/countries/north_macedonia.py +3 -8
- holidays/countries/norway.py +1 -3
- holidays/countries/pakistan.py +71 -72
- holidays/countries/panama.py +25 -24
- holidays/countries/paraguay.py +54 -47
- holidays/countries/philippines.py +6 -2
- holidays/countries/poland.py +3 -9
- holidays/countries/portugal.py +3 -11
- holidays/countries/romania.py +3 -5
- holidays/countries/saudi_arabia.py +8 -22
- holidays/countries/serbia.py +19 -29
- holidays/countries/singapore.py +70 -74
- holidays/countries/slovakia.py +1 -4
- holidays/countries/south_africa.py +60 -62
- holidays/countries/south_korea.py +14 -23
- holidays/countries/spain.py +2 -5
- holidays/countries/sweden.py +1 -3
- holidays/countries/taiwan.py +2 -5
- holidays/countries/thailand.py +34 -81
- holidays/countries/turkey.py +1 -3
- holidays/countries/ukraine.py +6 -18
- holidays/countries/united_arab_emirates.py +21 -29
- holidays/countries/united_kingdom.py +47 -67
- holidays/countries/united_states.py +42 -72
- holidays/countries/vatican_city.py +1 -3
- holidays/countries/venezuela.py +8 -6
- holidays/countries/vietnam.py +6 -18
- holidays/countries/zambia.py +63 -33
- holidays/countries/zimbabwe.py +56 -37
- holidays/financial/european_central_bank.py +1 -3
- holidays/financial/ny_stock_exchange.py +31 -48
- holidays/groups/__init__.py +18 -0
- holidays/groups/buddhist.py +71 -0
- holidays/groups/chinese.py +235 -0
- holidays/groups/christian.py +483 -0
- holidays/groups/hindu.py +71 -0
- holidays/groups/international.py +157 -0
- holidays/groups/islamic.py +288 -0
- holidays/groups/thai.py +157 -0
- holidays/helpers.py +20 -0
- holidays/holiday_base.py +49 -75
- holidays/holiday_groups.py +11 -1190
- holidays/locale/am/LC_MESSAGES/ET.po +18 -15
- holidays/locale/ar/LC_MESSAGES/CA.po +43 -43
- holidays/locale/ar/LC_MESSAGES/ET.po +18 -15
- holidays/locale/ar/LC_MESSAGES/UA.po +16 -14
- holidays/locale/be/LC_MESSAGES/BY.po +9 -8
- holidays/locale/bg/LC_MESSAGES/BG.po +14 -12
- holidays/locale/da/LC_MESSAGES/DK.po +7 -6
- holidays/locale/el/LC_MESSAGES/CY.po +5 -3
- holidays/locale/el/LC_MESSAGES/GR.po +13 -13
- holidays/locale/en/LC_MESSAGES/CA.po +43 -43
- holidays/locale/en_US/LC_MESSAGES/AR.po +26 -25
- holidays/locale/en_US/LC_MESSAGES/AW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AW.po +87 -0
- holidays/locale/en_US/LC_MESSAGES/BG.po +14 -12
- holidays/locale/en_US/LC_MESSAGES/BN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BN.po +96 -0
- holidays/locale/en_US/LC_MESSAGES/BY.po +9 -8
- holidays/locale/en_US/LC_MESSAGES/CA.po +43 -43
- holidays/locale/en_US/LC_MESSAGES/CL.po +18 -18
- holidays/locale/en_US/LC_MESSAGES/CO.po +19 -19
- holidays/locale/en_US/LC_MESSAGES/CR.po +6 -5
- holidays/locale/en_US/LC_MESSAGES/CW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CW.po +82 -0
- holidays/locale/en_US/LC_MESSAGES/CY.po +5 -3
- holidays/locale/en_US/LC_MESSAGES/DK.po +7 -6
- holidays/locale/en_US/LC_MESSAGES/DO.po +12 -12
- holidays/locale/en_US/LC_MESSAGES/EC.po +11 -12
- holidays/locale/en_US/LC_MESSAGES/ET.po +18 -15
- holidays/locale/en_US/LC_MESSAGES/FI.po +13 -13
- holidays/locale/en_US/LC_MESSAGES/GR.po +13 -13
- holidays/locale/en_US/LC_MESSAGES/HN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/HN.po +13 -13
- holidays/locale/en_US/LC_MESSAGES/HU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/HU.po +109 -0
- holidays/locale/en_US/LC_MESSAGES/JP.po +19 -17
- holidays/locale/en_US/LC_MESSAGES/KH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KH.po +139 -0
- holidays/locale/en_US/LC_MESSAGES/MC.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MC.po +16 -15
- holidays/locale/en_US/LC_MESSAGES/MD.po +5 -5
- holidays/locale/en_US/LC_MESSAGES/MX.po +3 -2
- holidays/locale/en_US/LC_MESSAGES/NI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NI.po +13 -13
- holidays/locale/en_US/LC_MESSAGES/NO.po +1 -1
- holidays/locale/en_US/LC_MESSAGES/PL.po +23 -21
- holidays/locale/en_US/LC_MESSAGES/PT.po +31 -31
- holidays/locale/en_US/LC_MESSAGES/PY.po +13 -11
- holidays/locale/en_US/LC_MESSAGES/RO.po +4 -3
- holidays/locale/en_US/LC_MESSAGES/RS.po +10 -10
- holidays/locale/en_US/LC_MESSAGES/SE.po +1 -1
- holidays/locale/en_US/LC_MESSAGES/SK.po +14 -14
- holidays/locale/en_US/LC_MESSAGES/TH.po +41 -41
- holidays/locale/en_US/LC_MESSAGES/UA.po +16 -14
- holidays/locale/en_US/LC_MESSAGES/VE.po +6 -6
- holidays/locale/es/LC_MESSAGES/AR.po +26 -25
- holidays/locale/es/LC_MESSAGES/CL.po +18 -18
- holidays/locale/es/LC_MESSAGES/CO.po +19 -19
- holidays/locale/es/LC_MESSAGES/CR.po +6 -5
- holidays/locale/es/LC_MESSAGES/DO.po +12 -12
- holidays/locale/es/LC_MESSAGES/EC.po +11 -12
- holidays/locale/es/LC_MESSAGES/HN.po +12 -12
- holidays/locale/es/LC_MESSAGES/MX.po +3 -2
- holidays/locale/es/LC_MESSAGES/NI.po +10 -10
- holidays/locale/es/LC_MESSAGES/PY.po +13 -11
- holidays/locale/es/LC_MESSAGES/VE.po +6 -6
- holidays/locale/fi/LC_MESSAGES/FI.po +13 -13
- holidays/locale/fr/LC_MESSAGES/CA.po +43 -43
- holidays/locale/fr/LC_MESSAGES/MC.po +15 -14
- holidays/locale/hu/LC_MESSAGES/HU.mo +0 -0
- holidays/locale/hu/LC_MESSAGES/HU.po +109 -0
- holidays/locale/ja/LC_MESSAGES/JP.po +19 -17
- holidays/locale/km/LC_MESSAGES/KH.mo +0 -0
- holidays/locale/km/LC_MESSAGES/KH.po +139 -0
- holidays/locale/ms/LC_MESSAGES/BN.mo +0 -0
- holidays/locale/ms/LC_MESSAGES/BN.po +96 -0
- holidays/locale/nl/LC_MESSAGES/AW.mo +0 -0
- holidays/locale/nl/LC_MESSAGES/AW.po +87 -0
- holidays/locale/nl/LC_MESSAGES/CW.mo +0 -0
- holidays/locale/nl/LC_MESSAGES/CW.po +82 -0
- holidays/locale/no/LC_MESSAGES/NO.po +1 -1
- holidays/locale/pap/LC_MESSAGES/AW.mo +0 -0
- holidays/locale/pap/LC_MESSAGES/AW.po +87 -0
- holidays/locale/pap/LC_MESSAGES/CW.mo +0 -0
- holidays/locale/pap/LC_MESSAGES/CW.po +82 -0
- holidays/locale/pl/LC_MESSAGES/PL.po +23 -21
- holidays/locale/pt_PT/LC_MESSAGES/PT.po +31 -31
- holidays/locale/ro/LC_MESSAGES/MD.po +5 -5
- holidays/locale/ro/LC_MESSAGES/RO.po +4 -3
- holidays/locale/sk/LC_MESSAGES/SK.po +14 -14
- holidays/locale/sr/LC_MESSAGES/RS.po +10 -10
- holidays/locale/sv/LC_MESSAGES/FI.po +13 -13
- holidays/locale/sv/LC_MESSAGES/SE.po +1 -1
- holidays/locale/th/LC_MESSAGES/BN.mo +0 -0
- holidays/locale/th/LC_MESSAGES/BN.po +96 -0
- holidays/locale/th/LC_MESSAGES/CA.po +43 -43
- holidays/locale/th/LC_MESSAGES/KH.mo +0 -0
- holidays/locale/th/LC_MESSAGES/KH.po +145 -0
- holidays/locale/th/LC_MESSAGES/TH.po +41 -41
- holidays/locale/uk/LC_MESSAGES/AR.po +26 -25
- holidays/locale/uk/LC_MESSAGES/AW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AW.po +87 -0
- holidays/locale/uk/LC_MESSAGES/CL.po +18 -18
- holidays/locale/uk/LC_MESSAGES/CO.po +19 -19
- holidays/locale/uk/LC_MESSAGES/CR.po +6 -5
- holidays/locale/uk/LC_MESSAGES/CW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CW.po +82 -0
- holidays/locale/uk/LC_MESSAGES/DK.po +7 -6
- holidays/locale/uk/LC_MESSAGES/DO.po +12 -12
- holidays/locale/uk/LC_MESSAGES/EC.po +11 -12
- holidays/locale/uk/LC_MESSAGES/FI.po +13 -13
- holidays/locale/uk/LC_MESSAGES/HN.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/HN.po +13 -13
- holidays/locale/uk/LC_MESSAGES/HU.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/HU.po +109 -0
- holidays/locale/uk/LC_MESSAGES/MC.po +15 -14
- holidays/locale/uk/LC_MESSAGES/MD.po +5 -5
- holidays/locale/uk/LC_MESSAGES/MX.po +3 -2
- holidays/locale/uk/LC_MESSAGES/NI.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/NI.po +13 -13
- holidays/locale/uk/LC_MESSAGES/NO.po +1 -1
- holidays/locale/uk/LC_MESSAGES/PL.po +23 -21
- holidays/locale/uk/LC_MESSAGES/PY.po +13 -11
- holidays/locale/uk/LC_MESSAGES/RO.po +4 -3
- holidays/locale/uk/LC_MESSAGES/SE.po +1 -1
- holidays/locale/uk/LC_MESSAGES/SK.po +14 -14
- holidays/locale/uk/LC_MESSAGES/UA.po +16 -14
- holidays/locale/uk/LC_MESSAGES/VE.po +6 -6
- holidays/registry.py +7 -11
- holidays/utils.py +5 -15
- {holidays-0.26.dist-info → holidays-0.27.dist-info}/METADATA +25 -7
- holidays-0.27.dist-info/RECORD +449 -0
- holidays-0.26.dist-info/RECORD +0 -402
- {holidays-0.26.dist-info → holidays-0.27.dist-info}/LICENSE +0 -0
- {holidays-0.26.dist-info → holidays-0.27.dist-info}/WHEEL +0 -0
- {holidays-0.26.dist-info → holidays-0.27.dist-info}/top_level.txt +0 -0
holidays/countries/thailand.py
CHANGED
|
@@ -13,19 +13,16 @@ from datetime import date
|
|
|
13
13
|
from datetime import timedelta as td
|
|
14
14
|
from gettext import gettext as tr
|
|
15
15
|
|
|
16
|
-
from holidays.
|
|
17
|
-
from holidays.constants import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP
|
|
18
|
-
from holidays.constants import OCT, NOV, DEC
|
|
16
|
+
from holidays.constants import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
|
|
19
17
|
from holidays.holiday_base import HolidayBase
|
|
20
|
-
from holidays.holiday_groups import InternationalHolidays
|
|
18
|
+
from holidays.holiday_groups import InternationalHolidays, ThaiCalendarHolidays
|
|
21
19
|
|
|
22
20
|
|
|
23
|
-
class Thailand(HolidayBase, InternationalHolidays):
|
|
21
|
+
class Thailand(HolidayBase, InternationalHolidays, ThaiCalendarHolidays):
|
|
24
22
|
"""
|
|
25
23
|
A subclass of :py:class:`HolidayBase` representing public holidays
|
|
26
24
|
in Thailand. (Based on South Korean and Singaporean Implementation)
|
|
27
25
|
|
|
28
|
-
|
|
29
26
|
References:
|
|
30
27
|
|
|
31
28
|
- Based on: https://en.wikipedia.org/wiki/Public_holidays_in_Thailand
|
|
@@ -125,20 +122,13 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
125
122
|
# Special Cases.
|
|
126
123
|
|
|
127
124
|
rama_ix_golden_jubilee = tr("พระราชพิธีกาญจนาภิเษก พ.ศ. 2539")
|
|
128
|
-
rama_ix_sixty_accession = tr(
|
|
129
|
-
"พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549"
|
|
130
|
-
)
|
|
125
|
+
rama_ix_sixty_accession = tr("พระราชพิธีฉลองสิริราชสมบัติครบ 60 ปี พ.ศ. 2549")
|
|
131
126
|
thai_military_emergency_lockdown = tr("วันหยุดพิเศษ (คมช.)")
|
|
132
127
|
thai_political_emergency_lockdown = tr("วันหยุดพิเศษ (การเมือง)")
|
|
133
|
-
thai_flood_2011_emergency_lockdown = tr(
|
|
134
|
-
|
|
135
|
-
)
|
|
136
|
-
rama_ix_mourning = tr(
|
|
137
|
-
"วันหยุดพิเศษ (ร่วมถวายอาลัย ส่งดวงพระวิญญาณพระบรมศพ)"
|
|
138
|
-
)
|
|
128
|
+
thai_flood_2011_emergency_lockdown = tr("วันหยุดพิเศษ (มหาอุทกภัย พ.ศ. 2554)")
|
|
129
|
+
rama_ix_mourning = tr("วันหยุดพิเศษ (ร่วมถวายอาลัย ส่งดวงพระวิญญาณพระบรมศพ)")
|
|
139
130
|
rama_ix_cremation = tr(
|
|
140
|
-
"
|
|
141
|
-
"พระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช"
|
|
131
|
+
"วันพระราชพิธีถวายพระเพลิงพระบรมศพพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช"
|
|
142
132
|
)
|
|
143
133
|
rama_x_coronation_celebrations = tr(
|
|
144
134
|
"พระราชพิธีบรมราชาภิเษก พระบาทสมเด็จพระวชิรเกล้าเจ้าอยู่หัว"
|
|
@@ -165,7 +155,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
165
155
|
(DEC, 12, thai_special_in_lieu_holidays),
|
|
166
156
|
),
|
|
167
157
|
# 1995-1997 (Bank of Thailand Data).
|
|
168
|
-
1996: (
|
|
158
|
+
1996: (JUN, 10, rama_ix_golden_jubilee),
|
|
169
159
|
# 1998-2000 (include In Lieus, Checked with Bank of Thailand Data).
|
|
170
160
|
1998: (
|
|
171
161
|
(MAY, 11, thai_special_in_lieu_holidays),
|
|
@@ -192,7 +182,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
192
182
|
(JUN, 13, rama_ix_sixty_accession),
|
|
193
183
|
(SEP, 20, thai_military_emergency_lockdown),
|
|
194
184
|
),
|
|
195
|
-
2007: (
|
|
185
|
+
2007: (DEC, 24, thai_election_in_lieu),
|
|
196
186
|
2009: (
|
|
197
187
|
(JAN, 2, thai_bridge_public_holiday),
|
|
198
188
|
(APR, 10, thai_political_emergency_lockdown),
|
|
@@ -213,9 +203,9 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
213
203
|
(OCT, 30, thai_flood_2011_emergency_lockdown),
|
|
214
204
|
(OCT, 31, thai_flood_2011_emergency_lockdown),
|
|
215
205
|
),
|
|
216
|
-
2012: (
|
|
217
|
-
2013: (
|
|
218
|
-
2014: (
|
|
206
|
+
2012: (APR, 9, thai_bridge_public_holiday),
|
|
207
|
+
2013: (DEC, 30, thai_bridge_public_holiday),
|
|
208
|
+
2014: (AUG, 11, thai_bridge_public_holiday),
|
|
219
209
|
2015: (
|
|
220
210
|
(JAN, 2, thai_bridge_public_holiday),
|
|
221
211
|
(MAY, 4, thai_bridge_public_holiday),
|
|
@@ -225,8 +215,8 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
225
215
|
(JUL, 18, thai_bridge_public_holiday),
|
|
226
216
|
(OCT, 14, rama_ix_mourning),
|
|
227
217
|
),
|
|
228
|
-
2017: (
|
|
229
|
-
2019: (
|
|
218
|
+
2017: (OCT, 26, rama_ix_cremation),
|
|
219
|
+
2019: (MAY, 6, rama_x_coronation_celebrations),
|
|
230
220
|
2020: (
|
|
231
221
|
(JUL, 27, songkran_festival_in_lieu_covid),
|
|
232
222
|
(SEP, 4, songkran_festival_in_lieu_covid),
|
|
@@ -246,13 +236,13 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
246
236
|
(OCT, 14, thai_bridge_public_holiday),
|
|
247
237
|
(DEC, 30, thai_bridge_public_holiday),
|
|
248
238
|
),
|
|
249
|
-
2023: (
|
|
239
|
+
2023: (MAY, 5, thai_bridge_public_holiday),
|
|
250
240
|
}
|
|
251
241
|
supported_languages = ("en_US", "th")
|
|
252
242
|
|
|
253
243
|
def __init__(self, **kwargs) -> None:
|
|
254
244
|
InternationalHolidays.__init__(self)
|
|
255
|
-
|
|
245
|
+
ThaiCalendarHolidays.__init__(self)
|
|
256
246
|
super().__init__(**kwargs)
|
|
257
247
|
|
|
258
248
|
def _populate(self, year):
|
|
@@ -282,11 +272,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
282
272
|
if (
|
|
283
273
|
self.observed
|
|
284
274
|
and self._is_weekend(dt)
|
|
285
|
-
and (
|
|
286
|
-
1961 <= year <= 1973
|
|
287
|
-
or 1995 <= year <= 1997
|
|
288
|
-
or year >= 2001
|
|
289
|
-
)
|
|
275
|
+
and (1961 <= year <= 1973 or 1995 <= year <= 1997 or year >= 2001)
|
|
290
276
|
):
|
|
291
277
|
in_lieu = dt + td(days=+2 if self._is_saturday(dt) else +1)
|
|
292
278
|
for name in self.get_list(dt):
|
|
@@ -347,9 +333,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
347
333
|
if year >= 1948:
|
|
348
334
|
songkran_festival = tr("วันสงกรานต์")
|
|
349
335
|
if year <= 1953 or (1957 <= year != 2020):
|
|
350
|
-
dt = self._add_holiday(
|
|
351
|
-
songkran_festival, APR, 12 if 1989 <= year <= 1997 else 13
|
|
352
|
-
)
|
|
336
|
+
dt = self._add_holiday(songkran_festival, APR, 12 if 1989 <= year <= 1997 else 13)
|
|
353
337
|
if 1957 <= year <= 1988:
|
|
354
338
|
_add_observed(dt)
|
|
355
339
|
else:
|
|
@@ -368,17 +352,11 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
368
352
|
|
|
369
353
|
songkran_festival_in_lieu = self.tr("ชดเชย%s") % songkran_festival
|
|
370
354
|
|
|
371
|
-
if self.observed and (
|
|
372
|
-
1995 <= year <= 1997 or 2001 <= year != 2020
|
|
373
|
-
):
|
|
355
|
+
if self.observed and (1995 <= year <= 1997 or 2001 <= year != 2020):
|
|
374
356
|
if self._is_thursday(dt):
|
|
375
|
-
self._add_holiday(
|
|
376
|
-
songkran_festival_in_lieu, dt + td(days=+4)
|
|
377
|
-
)
|
|
357
|
+
self._add_holiday(songkran_festival_in_lieu, dt + td(days=+4))
|
|
378
358
|
elif self._is_friday(dt) or self._is_saturday(dt):
|
|
379
|
-
self._add_holiday(
|
|
380
|
-
songkran_festival_in_lieu, dt + td(days=+3)
|
|
381
|
-
)
|
|
359
|
+
self._add_holiday(songkran_festival_in_lieu, dt + td(days=+3))
|
|
382
360
|
|
|
383
361
|
# National Labour day.
|
|
384
362
|
# วันแรงงานแห่งชาติ
|
|
@@ -398,11 +376,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
398
376
|
# Replaced by Rama IX's birthday in 1960 (B.E. 2503) by Sarit Thanarat.
|
|
399
377
|
# TODO: Add check for 1939 if we support earlier dates.
|
|
400
378
|
|
|
401
|
-
_add_observed(
|
|
402
|
-
self._add_holiday(
|
|
403
|
-
tr("วันชาติ"), *((JUN, 24) if year <= 1959 else (DEC, 5))
|
|
404
|
-
)
|
|
405
|
-
)
|
|
379
|
+
_add_observed(self._add_holiday(tr("วันชาติ"), *((JUN, 24) if year <= 1959 else (DEC, 5))))
|
|
406
380
|
|
|
407
381
|
# Coronation Day.
|
|
408
382
|
# วันฉัตรมงคล
|
|
@@ -464,10 +438,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
464
438
|
name = (
|
|
465
439
|
tr("วันเฉลิมพระชนมพรรษาสมเด็จพระบรมราชชนนีพันปีหลวง")
|
|
466
440
|
if year >= 2017
|
|
467
|
-
else tr(
|
|
468
|
-
"วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ "
|
|
469
|
-
"พระบรมราชินีนาถ"
|
|
470
|
-
)
|
|
441
|
+
else tr("วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถ")
|
|
471
442
|
)
|
|
472
443
|
_add_observed(self._add_holiday(name, AUG, 12))
|
|
473
444
|
|
|
@@ -499,10 +470,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
499
470
|
"มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร"
|
|
500
471
|
)
|
|
501
472
|
if year >= 2019
|
|
502
|
-
else tr(
|
|
503
|
-
"วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพล"
|
|
504
|
-
"อดุลยเดช บรมนาถบพิตร"
|
|
505
|
-
)
|
|
473
|
+
else tr("วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร")
|
|
506
474
|
)
|
|
507
475
|
_add_observed(self._add_holiday(name, OCT, 13))
|
|
508
476
|
|
|
@@ -536,8 +504,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
536
504
|
)
|
|
537
505
|
if year >= 2016
|
|
538
506
|
else tr(
|
|
539
|
-
"
|
|
540
|
-
"พระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร"
|
|
507
|
+
"วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร"
|
|
541
508
|
)
|
|
542
509
|
)
|
|
543
510
|
)
|
|
@@ -573,50 +540,38 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
573
540
|
self._add_new_years_eve(tr("วันสิ้นปี"))
|
|
574
541
|
|
|
575
542
|
# Thai Lunar Calendar Holidays
|
|
543
|
+
# See `_ThaiLunisolar` in holidays/utils.py for more details.
|
|
544
|
+
# Thai Lunar Calendar Holidays only work from 1941 to 2057.
|
|
576
545
|
|
|
577
|
-
"""
|
|
578
|
-
See `_ThaiLunisolar` in holidays/utils.py for more details.
|
|
579
|
-
|
|
580
|
-
Thai Lunar Calendar Holidays only work from 1941 (B.E. 2484) onwards
|
|
581
|
-
until 2057 (B.E. 2600).
|
|
582
|
-
"""
|
|
583
546
|
# Makha Bucha.
|
|
584
547
|
# วันมาฆบูชา
|
|
585
548
|
# Status: In-Use.
|
|
586
549
|
|
|
587
|
-
makha_bucha_date = self.
|
|
550
|
+
makha_bucha_date = self._add_makha_bucha(tr("วันมาฆบูชา"))
|
|
588
551
|
if makha_bucha_date:
|
|
589
|
-
_add_observed(
|
|
590
|
-
self._add_holiday(tr("วันมาฆบูชา"), makha_bucha_date)
|
|
591
|
-
)
|
|
552
|
+
_add_observed(makha_bucha_date)
|
|
592
553
|
|
|
593
554
|
# Visakha Bucha.
|
|
594
555
|
# วันวิสาขบูชา
|
|
595
556
|
# Status: In-Use.
|
|
596
557
|
|
|
597
|
-
visakha_bucha_date = self.
|
|
558
|
+
visakha_bucha_date = self._add_visakha_bucha(tr("วันวิสาขบูชา"))
|
|
598
559
|
if visakha_bucha_date:
|
|
599
|
-
_add_observed(
|
|
600
|
-
self._add_holiday(tr("วันวิสาขบูชา"), visakha_bucha_date)
|
|
601
|
-
)
|
|
560
|
+
_add_observed(visakha_bucha_date)
|
|
602
561
|
|
|
603
562
|
# Asarnha Bucha.
|
|
604
563
|
# วันอาสาฬหบูชา
|
|
605
564
|
# Status: In-Use.
|
|
606
565
|
# This has its own in-lieu trigger.
|
|
607
566
|
|
|
608
|
-
asarnha_bucha_date = self.
|
|
609
|
-
if asarnha_bucha_date:
|
|
610
|
-
self._add_holiday(tr("วันอาสาฬหบูชา"), asarnha_bucha_date)
|
|
567
|
+
asarnha_bucha_date = self._add_asarnha_bucha(tr("วันอาสาฬหบูชา"))
|
|
611
568
|
|
|
612
569
|
# Buddhist Lent Day.
|
|
613
570
|
# วันเข้าพรรษา
|
|
614
571
|
# Status: In-Use.
|
|
615
572
|
# This has its own in-lieu trigger.
|
|
616
573
|
|
|
617
|
-
|
|
618
|
-
if khao_phansa_date:
|
|
619
|
-
self._add_holiday(tr("วันเข้าพรรษา"), khao_phansa_date)
|
|
574
|
+
self._add_khao_phansa(tr("วันเข้าพรรษา"))
|
|
620
575
|
|
|
621
576
|
# Asarnha Bucha/Buddhist Lent Day (in lieu).
|
|
622
577
|
# วันหยุดชดเชยวันอาสาฬหบูชา
|
|
@@ -688,9 +643,7 @@ class Thailand(HolidayBase, InternationalHolidays):
|
|
|
688
643
|
}
|
|
689
644
|
# For years with exact date data.
|
|
690
645
|
if year in raeknakhwan_dates:
|
|
691
|
-
_add_observed(
|
|
692
|
-
self._add_holiday(raeknakhwan, *raeknakhwan_dates[year])
|
|
693
|
-
)
|
|
646
|
+
_add_observed(self._add_holiday(raeknakhwan, *raeknakhwan_dates[year]))
|
|
694
647
|
# Approx. otherwise for 1957-2013.
|
|
695
648
|
elif 1957 <= year <= 1996:
|
|
696
649
|
_add_observed(self._add_holiday(raeknakhwan, MAY, 13))
|
holidays/countries/turkey.py
CHANGED
|
@@ -39,9 +39,7 @@ class Turkey(HolidayBase, IslamicHolidays, InternationalHolidays):
|
|
|
39
39
|
self._add_labor_day("Labour Day")
|
|
40
40
|
|
|
41
41
|
# 19th of May.
|
|
42
|
-
self._add_holiday(
|
|
43
|
-
"Commemoration of Ataturk, Youth and Sports Day", MAY, 19
|
|
44
|
-
)
|
|
42
|
+
self._add_holiday("Commemoration of Ataturk, Youth and Sports Day", MAY, 19)
|
|
45
43
|
|
|
46
44
|
# 15th of Jul.
|
|
47
45
|
# Became a national holiday after 15 Jul 2016 coup d'etat attempt.
|
holidays/countries/ukraine.py
CHANGED
|
@@ -59,17 +59,13 @@ class Ukraine(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
# International Women's Day.
|
|
62
|
-
observed_dates.add(
|
|
63
|
-
self._add_womens_day(tr("Міжнародний жіночий день"))
|
|
64
|
-
)
|
|
62
|
+
observed_dates.add(self._add_womens_day(tr("Міжнародний жіночий день")))
|
|
65
63
|
|
|
66
64
|
# There is no holidays from March 15, 2022
|
|
67
65
|
# https://zakon.rada.gov.ua/laws/show/2136-20#n26
|
|
68
66
|
if year <= 2021:
|
|
69
67
|
# Easter Sunday (Pascha).
|
|
70
|
-
observed_dates.add(
|
|
71
|
-
self._add_easter_sunday(tr("Великдень (Пасха)"))
|
|
72
|
-
)
|
|
68
|
+
observed_dates.add(self._add_easter_sunday(tr("Великдень (Пасха)")))
|
|
73
69
|
|
|
74
70
|
# Holy Trinity Day.
|
|
75
71
|
observed_dates.add(self._add_whit_sunday(tr("Трійця")))
|
|
@@ -84,16 +80,11 @@ class Ukraine(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
84
80
|
may_1 = self._add_labor_day(name)
|
|
85
81
|
observed_dates.add(may_1)
|
|
86
82
|
if year <= 2017:
|
|
87
|
-
observed_dates.add(
|
|
88
|
-
self._add_holiday(name, may_1 + td(days=+1))
|
|
89
|
-
)
|
|
83
|
+
observed_dates.add(self._add_holiday(name, may_1 + td(days=+1)))
|
|
90
84
|
|
|
91
85
|
name = (
|
|
92
86
|
# Day of Victory over Nazism in World War II (Victory Day).
|
|
93
|
-
tr(
|
|
94
|
-
"День перемоги над нацизмом у Другій світовій війні "
|
|
95
|
-
"(День перемоги)"
|
|
96
|
-
)
|
|
87
|
+
tr("День перемоги над нацизмом у Другій світовій війні (День перемоги)")
|
|
97
88
|
if year >= 2016
|
|
98
89
|
# Victory Day.
|
|
99
90
|
else tr("День перемоги")
|
|
@@ -147,12 +138,9 @@ class Ukraine(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
147
138
|
if self.observed:
|
|
148
139
|
for dt in sorted(observed_dates):
|
|
149
140
|
if self._is_weekend(dt) and (
|
|
150
|
-
date(1995, JAN, 27) <= dt <= date(1998, JAN, 9)
|
|
151
|
-
or dt >= date(1999, APR, 23)
|
|
141
|
+
date(1995, JAN, 27) <= dt <= date(1998, JAN, 9) or dt >= date(1999, APR, 23)
|
|
152
142
|
):
|
|
153
|
-
obs_date = dt + td(
|
|
154
|
-
days=+2 if self._is_saturday(dt) else +1
|
|
155
|
-
)
|
|
143
|
+
obs_date = dt + td(days=+2 if self._is_saturday(dt) else +1)
|
|
156
144
|
while obs_date in self:
|
|
157
145
|
obs_date += td(days=+1)
|
|
158
146
|
hol_name = self.tr("%s (вихідний)") % self[dt]
|
|
@@ -43,9 +43,7 @@ class UnitedArabEmirates(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
43
43
|
|
|
44
44
|
def __init__(self, *args, **kwargs):
|
|
45
45
|
InternationalHolidays.__init__(self)
|
|
46
|
-
IslamicHolidays.__init__(
|
|
47
|
-
self, calendar=UnitedArabEmiratesIslamicCalendar()
|
|
48
|
-
)
|
|
46
|
+
IslamicHolidays.__init__(self, calendar=UnitedArabEmiratesIslamicCalendar())
|
|
49
47
|
super().__init__(*args, **kwargs)
|
|
50
48
|
|
|
51
49
|
def _populate(self, year):
|
|
@@ -56,9 +54,7 @@ class UnitedArabEmirates(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
56
54
|
|
|
57
55
|
# Commemoration Day.
|
|
58
56
|
if year >= 2015:
|
|
59
|
-
self._add_holiday(
|
|
60
|
-
"Commemoration Day", *((DEC, 1) if year >= 2019 else (NOV, 30))
|
|
61
|
-
)
|
|
57
|
+
self._add_holiday("Commemoration Day", *((DEC, 1) if year >= 2019 else (NOV, 30)))
|
|
62
58
|
|
|
63
59
|
# National Day.
|
|
64
60
|
self._add_holiday("National Day", DEC, 2)
|
|
@@ -83,15 +79,11 @@ class UnitedArabEmirates(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
83
79
|
|
|
84
80
|
# Leilat al-Miraj.
|
|
85
81
|
if year <= 2018: # The UAE government removed this starting 2019.
|
|
86
|
-
self._add_isra_and_miraj_day(
|
|
87
|
-
"Leilat al-Miraj - The Prophet's ascension"
|
|
88
|
-
)
|
|
82
|
+
self._add_isra_and_miraj_day("Leilat al-Miraj - The Prophet's ascension")
|
|
89
83
|
|
|
90
84
|
# Prophet Muhammad's Birthday.
|
|
91
85
|
if year <= 2019: # The UAE government removed this starting 2020.
|
|
92
|
-
self._add_mawlid_day(
|
|
93
|
-
"Mawlud al-Nabi - Prophet Mohammad's Birthday"
|
|
94
|
-
)
|
|
86
|
+
self._add_mawlid_day("Mawlud al-Nabi - Prophet Mohammad's Birthday")
|
|
95
87
|
|
|
96
88
|
|
|
97
89
|
class AE(UnitedArabEmirates):
|
|
@@ -104,33 +96,33 @@ class ARE(UnitedArabEmirates):
|
|
|
104
96
|
|
|
105
97
|
class UnitedArabEmiratesIslamicCalendar(_CustomIslamicCalendar):
|
|
106
98
|
EID_AL_ADHA_DATES = {
|
|
107
|
-
2017: (
|
|
108
|
-
2018: (
|
|
109
|
-
2019: (
|
|
110
|
-
2020: (
|
|
99
|
+
2017: (SEP, 1),
|
|
100
|
+
2018: (AUG, 21),
|
|
101
|
+
2019: (AUG, 11),
|
|
102
|
+
2020: (JUL, 31),
|
|
111
103
|
}
|
|
112
104
|
|
|
113
105
|
EID_AL_FITR_DATES = {
|
|
114
|
-
2017: (
|
|
115
|
-
2018: (
|
|
116
|
-
2019: (
|
|
117
|
-
2020: (
|
|
106
|
+
2017: (JUN, 25),
|
|
107
|
+
2018: (JUN, 14),
|
|
108
|
+
2019: (JUN, 3),
|
|
109
|
+
2020: (MAY, 24),
|
|
118
110
|
}
|
|
119
111
|
|
|
120
112
|
HIJRI_NEW_YEAR_DATES = {
|
|
121
|
-
2017: (
|
|
122
|
-
2018: (
|
|
123
|
-
2019: (
|
|
124
|
-
2020: (
|
|
113
|
+
2017: (SEP, 22),
|
|
114
|
+
2018: (SEP, 11),
|
|
115
|
+
2019: (AUG, 31),
|
|
116
|
+
2020: (AUG, 23),
|
|
125
117
|
}
|
|
126
118
|
|
|
127
119
|
ISRA_AND_MIRAJ_DATES = {
|
|
128
|
-
2017: (
|
|
129
|
-
2018: (
|
|
120
|
+
2017: (APR, 23),
|
|
121
|
+
2018: (APR, 13),
|
|
130
122
|
}
|
|
131
123
|
|
|
132
124
|
MAWLID_DATES = {
|
|
133
|
-
2017: (
|
|
134
|
-
2018: (
|
|
135
|
-
2019: (
|
|
125
|
+
2017: (NOV, 30),
|
|
126
|
+
2018: (NOV, 19),
|
|
127
|
+
2019: (NOV, 9),
|
|
136
128
|
}
|
|
@@ -13,7 +13,7 @@ from datetime import date
|
|
|
13
13
|
from datetime import timedelta as td
|
|
14
14
|
from typing import Tuple, Union
|
|
15
15
|
|
|
16
|
-
from holidays.calendars import
|
|
16
|
+
from holidays.calendars import _get_nth_weekday_of_month
|
|
17
17
|
from holidays.constants import MAR, APR, MAY, JUN, JUL, AUG, SEP, NOV, DEC, MON
|
|
18
18
|
from holidays.holiday_base import HolidayBase
|
|
19
19
|
from holidays.holiday_groups import ChristianHolidays, InternationalHolidays
|
|
@@ -26,19 +26,25 @@ class UnitedKingdom(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
26
26
|
|
|
27
27
|
country = "GB"
|
|
28
28
|
special_holidays = {
|
|
29
|
-
1977: (
|
|
30
|
-
1981: (
|
|
31
|
-
1999: (
|
|
32
|
-
2002: (
|
|
33
|
-
2011: (
|
|
34
|
-
2012: (
|
|
29
|
+
1977: (JUN, 7, "Silver Jubilee of Elizabeth II"),
|
|
30
|
+
1981: (JUL, 29, "Wedding of Charles and Diana"),
|
|
31
|
+
1999: (DEC, 31, "Millennium Celebrations"),
|
|
32
|
+
2002: (JUN, 3, "Golden Jubilee of Elizabeth II"),
|
|
33
|
+
2011: (APR, 29, "Wedding of William and Catherine"),
|
|
34
|
+
2012: (JUN, 5, "Diamond Jubilee of Elizabeth II"),
|
|
35
35
|
2022: (
|
|
36
36
|
(JUN, 3, "Platinum Jubilee of Elizabeth II"),
|
|
37
37
|
(SEP, 19, "State Funeral of Queen Elizabeth II"),
|
|
38
38
|
),
|
|
39
|
-
2023: (
|
|
39
|
+
2023: (MAY, 8, "Coronation of Charles III"),
|
|
40
40
|
}
|
|
41
41
|
subdivisions: Union[Tuple[()], Tuple[str, ...]] = (
|
|
42
|
+
"ENG", # England
|
|
43
|
+
"NIR", # Northern Ireland
|
|
44
|
+
"SCT", # Scotland
|
|
45
|
+
"WLS", # Wales
|
|
46
|
+
)
|
|
47
|
+
_deprecated_subdivisions: Tuple[str, ...] = (
|
|
42
48
|
"England",
|
|
43
49
|
"Northern Ireland",
|
|
44
50
|
"Scotland",
|
|
@@ -49,17 +55,14 @@ class UnitedKingdom(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
49
55
|
def __init__(self, *args, **kwargs):
|
|
50
56
|
ChristianHolidays.__init__(self)
|
|
51
57
|
InternationalHolidays.__init__(self)
|
|
52
|
-
# default subdiv to UK; state for backwards compatibility
|
|
53
|
-
if not kwargs.get("subdiv", kwargs.get("state")):
|
|
54
|
-
kwargs["subdiv"] = "UK"
|
|
55
58
|
super().__init__(*args, **kwargs)
|
|
56
59
|
|
|
57
|
-
def _add_observed(self, dt: date) -> None:
|
|
60
|
+
def _add_observed(self, dt: date, days: int = +1) -> None:
|
|
58
61
|
if self.observed and self._is_weekend(dt):
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
self._add_holiday(
|
|
63
|
+
"%s (Observed)" % self[dt],
|
|
64
|
+
dt + td(days=+2 if self._is_saturday(dt) else days),
|
|
65
|
+
)
|
|
63
66
|
|
|
64
67
|
def _populate(self, year: int) -> None:
|
|
65
68
|
super()._populate(year)
|
|
@@ -84,28 +87,33 @@ class UnitedKingdom(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
84
87
|
2012: date(year, JUN, 4),
|
|
85
88
|
2022: date(year, JUN, 2),
|
|
86
89
|
}
|
|
87
|
-
dt = spring_bank_dates.get(
|
|
88
|
-
year, _get_nth_weekday_of_month(-1, MON, MAY, year)
|
|
89
|
-
)
|
|
90
|
+
dt = spring_bank_dates.get(year, _get_nth_weekday_of_month(-1, MON, MAY, year))
|
|
90
91
|
self._add_holiday("Spring Bank Holiday", dt)
|
|
91
92
|
|
|
92
93
|
# Christmas Day
|
|
93
|
-
|
|
94
|
+
self._add_observed(self._add_christmas_day("Christmas Day"), days=+2)
|
|
94
95
|
|
|
95
96
|
# Boxing Day
|
|
96
|
-
|
|
97
|
+
self._add_observed(self._add_christmas_day_two("Boxing Day"), days=+2)
|
|
97
98
|
|
|
98
|
-
self.
|
|
99
|
-
|
|
99
|
+
if self.subdiv == "England":
|
|
100
|
+
self._add_subdiv_eng_holidays()
|
|
101
|
+
elif self.subdiv == "Northern Ireland":
|
|
102
|
+
self._add_subdiv_nir_holidays()
|
|
103
|
+
elif self.subdiv == "Scotland":
|
|
104
|
+
self._add_subdiv_sct_holidays()
|
|
105
|
+
elif self.subdiv == "Wales":
|
|
106
|
+
self._add_subdiv_wls_holidays()
|
|
100
107
|
|
|
101
108
|
def _add_subdiv_holidays(self):
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
self.
|
|
109
|
+
if self.subdiv not in {"SCT", "Scotland"}:
|
|
110
|
+
# New Year's Day
|
|
111
|
+
if self._year >= 1974:
|
|
112
|
+
self._add_observed(self._add_new_years_day("New Year's Day"))
|
|
105
113
|
|
|
106
114
|
super()._add_subdiv_holidays()
|
|
107
115
|
|
|
108
|
-
def
|
|
116
|
+
def _add_subdiv_eng_holidays(self):
|
|
109
117
|
# Easter Monday
|
|
110
118
|
self._add_easter_monday("Easter Monday")
|
|
111
119
|
|
|
@@ -116,7 +124,7 @@ class UnitedKingdom(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
116
124
|
_get_nth_weekday_of_month(-1, MON, AUG, self._year),
|
|
117
125
|
)
|
|
118
126
|
|
|
119
|
-
def
|
|
127
|
+
def _add_subdiv_nir_holidays(self):
|
|
120
128
|
# St. Patrick's Day
|
|
121
129
|
self._add_observed(self._add_holiday("St. Patrick's Day", MAR, 17))
|
|
122
130
|
|
|
@@ -133,7 +141,16 @@ class UnitedKingdom(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
133
141
|
_get_nth_weekday_of_month(-1, MON, AUG, self._year),
|
|
134
142
|
)
|
|
135
143
|
|
|
136
|
-
def
|
|
144
|
+
def _add_subdiv_sct_holidays(self):
|
|
145
|
+
# New Year's Day
|
|
146
|
+
name = "New Year's Day"
|
|
147
|
+
jan_1 = self._add_new_years_day(name)
|
|
148
|
+
if self.observed and self._is_weekend(jan_1):
|
|
149
|
+
self._add_holiday(
|
|
150
|
+
"%s (Observed)" % name,
|
|
151
|
+
jan_1 + td(days=+3 if self._is_saturday(jan_1) else +1),
|
|
152
|
+
)
|
|
153
|
+
|
|
137
154
|
# New Year Holiday
|
|
138
155
|
name = "New Year Holiday"
|
|
139
156
|
jan_2 = self._add_new_years_day_two(name)
|
|
@@ -150,44 +167,7 @@ class UnitedKingdom(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
150
167
|
# St. Andrew's Day
|
|
151
168
|
self._add_holiday("St. Andrew's Day", NOV, 30)
|
|
152
169
|
|
|
153
|
-
def
|
|
154
|
-
# New Year Holiday
|
|
155
|
-
name = "New Year Holiday [Scotland]"
|
|
156
|
-
jan_2 = self._add_new_years_day_two(name)
|
|
157
|
-
self._add_observed(jan_2)
|
|
158
|
-
if self.observed and self._is_monday(jan_2):
|
|
159
|
-
self._add_new_years_day_three("%s (Observed)" % name)
|
|
160
|
-
|
|
161
|
-
# St. Patrick's Day
|
|
162
|
-
self._add_observed(
|
|
163
|
-
self._add_holiday("St. Patrick's Day [Northern Ireland]", MAR, 17)
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
# Easter Monday
|
|
167
|
-
self._add_easter_monday(
|
|
168
|
-
"Easter Monday [England/Wales/Northern Ireland]"
|
|
169
|
-
)
|
|
170
|
-
|
|
171
|
-
# Battle of the Boyne
|
|
172
|
-
self._add_holiday("Battle of the Boyne [Northern Ireland]", JUL, 12)
|
|
173
|
-
|
|
174
|
-
# Summer bank holiday (first Monday in August)
|
|
175
|
-
self._add_holiday(
|
|
176
|
-
"Summer Bank Holiday [Scotland]",
|
|
177
|
-
_get_nth_weekday_of_month(1, MON, AUG, self._year),
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
# Late Summer bank holiday (last Monday in August)
|
|
181
|
-
if self._year >= 1971:
|
|
182
|
-
self._add_holiday(
|
|
183
|
-
"Late Summer Bank Holiday [England/Wales/Northern Ireland]",
|
|
184
|
-
_get_nth_weekday_of_month(-1, MON, AUG, self._year),
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
# St. Andrew's Day
|
|
188
|
-
self._add_holiday("St. Andrew's Day [Scotland]", NOV, 30)
|
|
189
|
-
|
|
190
|
-
def _add_subdiv_wales_holidays(self):
|
|
170
|
+
def _add_subdiv_wls_holidays(self):
|
|
191
171
|
# Easter Monday
|
|
192
172
|
self._add_easter_monday("Easter Monday")
|
|
193
173
|
|