holidays 0.25__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 +9 -7
- holidays/calendars/buddhist.py +445 -0
- holidays/calendars/chinese.py +1238 -431
- holidays/calendars/custom.py +1 -3
- holidays/calendars/hebrew.py +2 -2
- holidays/calendars/hindu.py +445 -0
- holidays/calendars/islamic.py +1347 -1347
- holidays/calendars/thai.py +229 -38
- holidays/countries/__init__.py +8 -0
- holidays/countries/albania.py +6 -17
- holidays/countries/andorra.py +2 -6
- holidays/countries/angola.py +53 -39
- holidays/countries/argentina.py +25 -35
- holidays/countries/armenia.py +1 -0
- holidays/countries/aruba.py +109 -48
- holidays/countries/australia.py +31 -69
- holidays/countries/austria.py +1 -0
- holidays/countries/azerbaijan.py +44 -71
- holidays/countries/bahrain.py +7 -7
- holidays/countries/bangladesh.py +1 -3
- holidays/countries/belarus.py +2 -3
- holidays/countries/belize.py +128 -0
- holidays/countries/bolivia.py +2 -6
- holidays/countries/bosnia_and_herzegovina.py +5 -17
- holidays/countries/botswana.py +37 -44
- holidays/countries/brazil.py +4 -7
- holidays/countries/brunei.py +427 -0
- holidays/countries/bulgaria.py +3 -6
- holidays/countries/burkina_faso.py +141 -0
- holidays/countries/burundi.py +2 -5
- holidays/countries/cambodia.py +323 -0
- holidays/countries/cameroon.py +183 -0
- holidays/countries/canada.py +20 -28
- holidays/countries/chad.py +133 -0
- holidays/countries/chile.py +6 -13
- holidays/countries/china.py +21 -25
- holidays/countries/colombia.py +18 -15
- holidays/countries/costa_rica.py +25 -27
- holidays/countries/cuba.py +28 -15
- holidays/countries/curacao.py +100 -46
- holidays/countries/cyprus.py +3 -6
- holidays/countries/czechia.py +4 -12
- holidays/countries/denmark.py +2 -3
- holidays/countries/dominican_republic.py +2 -3
- holidays/countries/ecuador.py +55 -54
- holidays/countries/egypt.py +2 -5
- holidays/countries/el_salvador.py +101 -0
- holidays/countries/eswatini.py +34 -44
- holidays/countries/ethiopia.py +7 -14
- holidays/countries/finland.py +2 -3
- holidays/countries/france.py +1 -0
- holidays/countries/gabon.py +139 -0
- holidays/countries/georgia.py +1 -0
- holidays/countries/germany.py +1 -0
- holidays/countries/greece.py +7 -6
- holidays/countries/honduras.py +17 -13
- holidays/countries/hongkong.py +117 -126
- holidays/countries/hungary.py +93 -92
- holidays/countries/iceland.py +1 -0
- holidays/countries/india.py +4 -11
- holidays/countries/indonesia.py +178 -142
- holidays/countries/ireland.py +5 -15
- holidays/countries/isle_of_man.py +23 -5
- holidays/countries/israel.py +12 -24
- holidays/countries/italy.py +6 -7
- holidays/countries/jamaica.py +10 -18
- holidays/countries/japan.py +11 -16
- holidays/countries/kazakhstan.py +7 -22
- holidays/countries/kenya.py +44 -26
- holidays/countries/kyrgyzstan.py +2 -5
- holidays/countries/latvia.py +2 -6
- holidays/countries/lesotho.py +52 -32
- holidays/countries/liechtenstein.py +1 -0
- holidays/countries/lithuania.py +4 -12
- holidays/countries/madagascar.py +3 -9
- holidays/countries/malawi.py +34 -26
- holidays/countries/malaysia.py +335 -343
- holidays/countries/marshall_islands.py +4 -9
- holidays/countries/mexico.py +2 -3
- holidays/countries/moldova.py +4 -6
- holidays/countries/monaco.py +17 -26
- holidays/countries/montenegro.py +34 -24
- holidays/countries/morocco.py +8 -5
- holidays/countries/mozambique.py +35 -31
- holidays/countries/namibia.py +54 -35
- holidays/countries/netherlands.py +1 -0
- holidays/countries/new_zealand.py +166 -134
- holidays/countries/nicaragua.py +27 -22
- holidays/countries/nigeria.py +6 -17
- holidays/countries/north_macedonia.py +3 -8
- holidays/countries/norway.py +2 -3
- holidays/countries/pakistan.py +73 -75
- holidays/countries/panama.py +25 -24
- holidays/countries/paraguay.py +55 -47
- holidays/countries/peru.py +1 -0
- holidays/countries/philippines.py +6 -2
- holidays/countries/poland.py +4 -9
- holidays/countries/portugal.py +4 -11
- holidays/countries/romania.py +4 -5
- holidays/countries/russia.py +1 -0
- holidays/countries/san_marino.py +26 -27
- holidays/countries/saudi_arabia.py +8 -22
- holidays/countries/serbia.py +22 -31
- holidays/countries/singapore.py +181 -189
- holidays/countries/slovakia.py +2 -4
- holidays/countries/south_africa.py +60 -62
- holidays/countries/south_korea.py +59 -26
- holidays/countries/spain.py +7 -10
- holidays/countries/sweden.py +2 -3
- holidays/countries/switzerland.py +1 -0
- holidays/countries/taiwan.py +20 -20
- holidays/countries/thailand.py +36 -82
- holidays/countries/turkey.py +1 -3
- holidays/countries/ukraine.py +7 -18
- holidays/countries/united_arab_emirates.py +23 -31
- holidays/countries/united_kingdom.py +124 -116
- holidays/countries/united_states.py +42 -72
- holidays/countries/uruguay.py +1 -0
- holidays/countries/vatican_city.py +64 -32
- holidays/countries/venezuela.py +9 -6
- holidays/countries/vietnam.py +6 -20
- holidays/countries/zambia.py +63 -33
- holidays/countries/zimbabwe.py +56 -37
- holidays/financial/european_central_bank.py +15 -16
- holidays/financial/ny_stock_exchange.py +80 -86
- 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 +54 -76
- holidays/holiday_groups.py +11 -1053
- holidays/locale/am/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/am/LC_MESSAGES/ET.po +20 -15
- holidays/locale/ar/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/CA.po +184 -0
- holidays/locale/ar/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/ET.po +92 -0
- holidays/locale/ar/LC_MESSAGES/UA.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/UA.po +97 -0
- holidays/locale/be/LC_MESSAGES/BY.po +11 -13
- holidays/locale/bg/LC_MESSAGES/BG.po +13 -15
- holidays/locale/da/LC_MESSAGES/DK.po +13 -12
- holidays/locale/de/LC_MESSAGES/AT.po +14 -14
- holidays/locale/de/LC_MESSAGES/CH.po +91 -56
- holidays/locale/de/LC_MESSAGES/DE.po +32 -32
- holidays/locale/de/LC_MESSAGES/LI.po +23 -23
- holidays/locale/el/LC_MESSAGES/CY.po +16 -16
- holidays/locale/el/LC_MESSAGES/GR.mo +0 -0
- holidays/locale/el/LC_MESSAGES/GR.po +21 -17
- holidays/locale/en/LC_MESSAGES/CA.po +43 -43
- holidays/locale/en_US/LC_MESSAGES/AM.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AM.po +20 -20
- holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AR.po +34 -33
- holidays/locale/en_US/LC_MESSAGES/AT.po +13 -13
- 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 +13 -15
- 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 +11 -13
- holidays/locale/en_US/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CA.po +70 -37
- holidays/locale/en_US/LC_MESSAGES/CH.po +91 -56
- holidays/locale/en_US/LC_MESSAGES/CL.po +39 -38
- holidays/locale/en_US/LC_MESSAGES/CO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CO.po +27 -27
- holidays/locale/en_US/LC_MESSAGES/CR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CR.po +19 -19
- holidays/locale/en_US/LC_MESSAGES/CU.po +10 -10
- 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 +16 -16
- holidays/locale/en_US/LC_MESSAGES/DE.po +30 -30
- holidays/locale/en_US/LC_MESSAGES/DK.po +12 -11
- 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.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ET.po +20 -15
- holidays/locale/en_US/LC_MESSAGES/FI.po +15 -15
- holidays/locale/en_US/LC_MESSAGES/FR.po +27 -24
- holidays/locale/en_US/LC_MESSAGES/GE.po +23 -27
- holidays/locale/en_US/LC_MESSAGES/GR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GR.po +21 -17
- holidays/locale/en_US/LC_MESSAGES/HN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/HN.po +17 -12
- 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/IS.po +17 -17
- holidays/locale/en_US/LC_MESSAGES/JP.po +25 -25
- 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/LI.po +22 -22
- holidays/locale/en_US/LC_MESSAGES/MC.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MC.po +27 -27
- holidays/locale/en_US/LC_MESSAGES/MD.po +13 -13
- holidays/locale/en_US/LC_MESSAGES/MX.po +9 -12
- holidays/locale/en_US/LC_MESSAGES/NI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NI.po +15 -15
- holidays/locale/en_US/LC_MESSAGES/NL.po +12 -12
- holidays/locale/en_US/LC_MESSAGES/NO.po +13 -13
- holidays/locale/en_US/LC_MESSAGES/PE.po +30 -30
- holidays/locale/en_US/LC_MESSAGES/PL.po +38 -21
- holidays/locale/en_US/LC_MESSAGES/PT.po +39 -36
- holidays/locale/en_US/LC_MESSAGES/PY.po +16 -16
- holidays/locale/en_US/LC_MESSAGES/RO.po +12 -12
- holidays/locale/en_US/LC_MESSAGES/RS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/RS.po +17 -19
- holidays/locale/en_US/LC_MESSAGES/RU.po +11 -10
- holidays/locale/en_US/LC_MESSAGES/SE.po +19 -19
- holidays/locale/en_US/LC_MESSAGES/SK.po +17 -18
- holidays/locale/en_US/LC_MESSAGES/TH.po +41 -41
- holidays/locale/en_US/LC_MESSAGES/UA.po +18 -19
- holidays/locale/en_US/LC_MESSAGES/UY.po +15 -15
- holidays/locale/en_US/LC_MESSAGES/VE.po +16 -16
- holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/es/LC_MESSAGES/AR.po +34 -33
- holidays/locale/es/LC_MESSAGES/CL.po +39 -38
- holidays/locale/es/LC_MESSAGES/CO.mo +0 -0
- holidays/locale/es/LC_MESSAGES/CO.po +24 -24
- holidays/locale/es/LC_MESSAGES/CR.mo +0 -0
- holidays/locale/es/LC_MESSAGES/CR.po +19 -19
- holidays/locale/es/LC_MESSAGES/CU.po +10 -10
- holidays/locale/es/LC_MESSAGES/DO.po +12 -12
- holidays/locale/es/LC_MESSAGES/EC.po +11 -12
- holidays/locale/es/LC_MESSAGES/HN.mo +0 -0
- holidays/locale/es/LC_MESSAGES/HN.po +17 -12
- holidays/locale/es/LC_MESSAGES/MX.po +9 -12
- holidays/locale/es/LC_MESSAGES/NI.po +12 -12
- holidays/locale/es/LC_MESSAGES/PE.po +30 -30
- holidays/locale/es/LC_MESSAGES/PY.po +16 -16
- holidays/locale/es/LC_MESSAGES/UY.po +15 -15
- holidays/locale/es/LC_MESSAGES/VE.po +16 -16
- holidays/locale/fi/LC_MESSAGES/FI.po +16 -16
- holidays/locale/fr/LC_MESSAGES/CA.po +43 -43
- holidays/locale/fr/LC_MESSAGES/CH.po +91 -56
- holidays/locale/fr/LC_MESSAGES/FR.po +27 -24
- holidays/locale/fr/LC_MESSAGES/MC.po +23 -23
- holidays/locale/hu/LC_MESSAGES/HU.mo +0 -0
- holidays/locale/hu/LC_MESSAGES/HU.po +109 -0
- holidays/locale/hy/LC_MESSAGES/AM.po +16 -16
- holidays/locale/is/LC_MESSAGES/IS.po +18 -18
- holidays/locale/it/LC_MESSAGES/CH.po +91 -56
- holidays/locale/ja/LC_MESSAGES/JP.po +25 -25
- holidays/locale/ka/LC_MESSAGES/GE.po +23 -27
- 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/nl/LC_MESSAGES/NL.po +13 -13
- holidays/locale/no/LC_MESSAGES/NO.po +14 -14
- 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 +38 -21
- holidays/locale/pt_PT/LC_MESSAGES/PT.po +39 -36
- holidays/locale/ro/LC_MESSAGES/MD.po +14 -15
- holidays/locale/ro/LC_MESSAGES/RO.po +13 -14
- holidays/locale/ru/LC_MESSAGES/RU.po +11 -9
- holidays/locale/sk/LC_MESSAGES/SK.po +17 -18
- holidays/locale/sr/LC_MESSAGES/RS.mo +0 -0
- holidays/locale/sr/LC_MESSAGES/RS.po +15 -17
- holidays/locale/sv/LC_MESSAGES/FI.po +16 -16
- holidays/locale/sv/LC_MESSAGES/SE.po +20 -20
- 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 +42 -42
- 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.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AR.po +35 -35
- holidays/locale/uk/LC_MESSAGES/AT.po +15 -16
- holidays/locale/uk/LC_MESSAGES/AW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AW.po +87 -0
- holidays/locale/uk/LC_MESSAGES/CH.po +92 -58
- holidays/locale/uk/LC_MESSAGES/CL.po +40 -40
- holidays/locale/uk/LC_MESSAGES/CO.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CO.po +28 -29
- holidays/locale/uk/LC_MESSAGES/CR.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CR.po +20 -21
- holidays/locale/uk/LC_MESSAGES/CU.po +11 -12
- holidays/locale/uk/LC_MESSAGES/CW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CW.po +82 -0
- holidays/locale/uk/LC_MESSAGES/DE.po +33 -34
- holidays/locale/uk/LC_MESSAGES/DK.po +14 -14
- holidays/locale/uk/LC_MESSAGES/DO.po +13 -14
- holidays/locale/uk/LC_MESSAGES/EC.po +12 -14
- holidays/locale/uk/LC_MESSAGES/FI.po +17 -18
- holidays/locale/uk/LC_MESSAGES/FR.po +28 -26
- holidays/locale/uk/LC_MESSAGES/HN.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/HN.po +18 -14
- holidays/locale/uk/LC_MESSAGES/HU.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/HU.po +109 -0
- holidays/locale/uk/LC_MESSAGES/IS.po +19 -20
- holidays/locale/uk/LC_MESSAGES/LI.po +24 -25
- holidays/locale/uk/LC_MESSAGES/MC.po +27 -28
- holidays/locale/uk/LC_MESSAGES/MD.po +14 -15
- holidays/locale/uk/LC_MESSAGES/MX.po +10 -14
- holidays/locale/uk/LC_MESSAGES/NI.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/NI.po +16 -17
- holidays/locale/uk/LC_MESSAGES/NL.po +14 -15
- holidays/locale/uk/LC_MESSAGES/NO.po +15 -16
- holidays/locale/uk/LC_MESSAGES/PE.po +31 -32
- holidays/locale/uk/LC_MESSAGES/PL.po +38 -21
- holidays/locale/uk/LC_MESSAGES/PY.po +17 -18
- holidays/locale/uk/LC_MESSAGES/RO.po +13 -14
- holidays/locale/uk/LC_MESSAGES/SE.po +21 -22
- holidays/locale/uk/LC_MESSAGES/SK.po +18 -20
- holidays/locale/uk/LC_MESSAGES/UA.po +17 -17
- holidays/locale/uk/LC_MESSAGES/UY.po +16 -17
- holidays/locale/uk/LC_MESSAGES/VE.po +17 -18
- holidays/registry.py +21 -12
- holidays/utils.py +87 -17
- {holidays-0.25.dist-info → holidays-0.27.dist-info}/METADATA +282 -265
- holidays-0.27.dist-info/RECORD +449 -0
- holidays-0.25.dist-info/RECORD +0 -390
- {holidays-0.25.dist-info → holidays-0.27.dist-info}/LICENSE +0 -0
- {holidays-0.25.dist-info → holidays-0.27.dist-info}/WHEEL +0 -0
- {holidays-0.25.dist-info → holidays-0.27.dist-info}/top_level.txt +0 -0
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
from datetime import date
|
|
13
13
|
from datetime import timedelta as td
|
|
14
14
|
|
|
15
|
-
from dateutil.easter import easter
|
|
16
|
-
|
|
17
15
|
from holidays.calendars import _get_nth_weekday_of_month
|
|
18
|
-
from holidays.constants import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP
|
|
19
|
-
from holidays.constants import OCT, NOV, DEC, MON, THU
|
|
16
|
+
from holidays.constants import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, MON, THU
|
|
20
17
|
from holidays.holiday_base import HolidayBase
|
|
18
|
+
from holidays.holiday_groups import ChristianHolidays, InternationalHolidays
|
|
21
19
|
|
|
22
20
|
|
|
23
|
-
class NewYorkStockExchange(HolidayBase):
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
class NewYorkStockExchange(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
22
|
+
"""
|
|
23
|
+
Official regulations:
|
|
24
|
+
- https://www.nyse.com/publicdocs/nyse/regulation/nyse/NYSE_Rules.pdf
|
|
25
|
+
- https://www.nyse.com/markets/hours-calendars
|
|
26
|
+
Historical data:
|
|
27
|
+
- s3.amazonaws.com/armstrongeconomics-wp/2013/07/NYSE-Closings.pdf
|
|
28
|
+
"""
|
|
29
29
|
|
|
30
30
|
market = "NYSE"
|
|
31
31
|
special_holidays = {
|
|
@@ -43,21 +43,21 @@ class NewYorkStockExchange(HolidayBase):
|
|
|
43
43
|
(OCT, 12, "Columbian Celebration"),
|
|
44
44
|
(OCT, 21, "Columbian Celebration"),
|
|
45
45
|
),
|
|
46
|
-
1893: (
|
|
47
|
-
1897: (
|
|
48
|
-
1898: (
|
|
46
|
+
1893: (APR, 27, "Columbian Celebration"),
|
|
47
|
+
1897: (APR, 27, "Grant's Birthday"),
|
|
48
|
+
1898: (MAY, 4, "Charter Day"),
|
|
49
49
|
1899: (
|
|
50
50
|
(MAY, 29, "Monday before Decoration Day"),
|
|
51
51
|
(JUL, 3, "Monday before Independence Day"),
|
|
52
52
|
(SEP, 29, "Admiral Dewey Celebration"),
|
|
53
53
|
),
|
|
54
|
-
1900: (
|
|
54
|
+
1900: (DEC, 24, "Christmas Eve"),
|
|
55
55
|
1901: (
|
|
56
56
|
(JUL, 5, "Friday after Independence Day"),
|
|
57
57
|
(SEP, 19, "Funeral of President McKinley"),
|
|
58
58
|
),
|
|
59
|
-
1903: (
|
|
60
|
-
1917: (
|
|
59
|
+
1903: (APR, 22, "Opening of new NYSE building"),
|
|
60
|
+
1917: (JUN, 5, "Draft Registration Day"),
|
|
61
61
|
1918: (
|
|
62
62
|
(JAN, 28, "Heatless Day"),
|
|
63
63
|
(FEB, 4, "Heatless Day"),
|
|
@@ -75,8 +75,8 @@ class NewYorkStockExchange(HolidayBase):
|
|
|
75
75
|
(AUG, 3, "Death of President Warren G. Harding"),
|
|
76
76
|
(AUG, 10, "Funeral of President Warren G. Harding"),
|
|
77
77
|
),
|
|
78
|
-
1927: (
|
|
79
|
-
1929: (
|
|
78
|
+
1927: (JUN, 13, "Parade for Colonel Charles Lindbergh"),
|
|
79
|
+
1929: (NOV, 29, "Catch Up Day"),
|
|
80
80
|
1933: (
|
|
81
81
|
(MAR, 6, "Special Bank Holiday"),
|
|
82
82
|
(MAR, 7, "Special Bank Holiday"),
|
|
@@ -91,12 +91,12 @@ class NewYorkStockExchange(HolidayBase):
|
|
|
91
91
|
(AUG, 16, "V-J Day (WWII)"),
|
|
92
92
|
(DEC, 24, "Christmas Eve"),
|
|
93
93
|
),
|
|
94
|
-
1954: (
|
|
95
|
-
1956: (
|
|
96
|
-
1958: (
|
|
97
|
-
1961: (
|
|
98
|
-
1963: (
|
|
99
|
-
1965: (
|
|
94
|
+
1954: (DEC, 24, "Christmas Eve"),
|
|
95
|
+
1956: (DEC, 24, "Christmas Eve"),
|
|
96
|
+
1958: (DEC, 26, "Day after Christmas"),
|
|
97
|
+
1961: (MAY, 29, "Day before Decoration Day"),
|
|
98
|
+
1963: (NOV, 25, "Funeral of President John F. Kennedy"),
|
|
99
|
+
1965: (DEC, 24, "Christmas Eve"),
|
|
100
100
|
1968: (
|
|
101
101
|
(APR, 9, "Day of Mourning for Martin Luther King Jr."),
|
|
102
102
|
(JUL, 5, "Day after Independence Day"),
|
|
@@ -106,145 +106,139 @@ class NewYorkStockExchange(HolidayBase):
|
|
|
106
106
|
(MAR, 31, "Funeral of President Dwight D. Eisenhower"),
|
|
107
107
|
(JUL, 21, "National Participation in Lunar Exploration"),
|
|
108
108
|
),
|
|
109
|
-
1972: (
|
|
110
|
-
1973: (
|
|
111
|
-
1977: (
|
|
112
|
-
1985: (
|
|
113
|
-
1994: (
|
|
109
|
+
1972: (DEC, 28, "Funeral for President Harry S. Truman"),
|
|
110
|
+
1973: (JAN, 25, "Funeral for President Lyndon B. Johnson"),
|
|
111
|
+
1977: (JUL, 14, "Blackout in New Yor City"),
|
|
112
|
+
1985: (SEP, 27, "Hurricane Gloria"),
|
|
113
|
+
1994: (APR, 27, "Funeral for President Richard M. Nixon"),
|
|
114
114
|
2001: (
|
|
115
115
|
(SEP, 11, "Closed for Sept 11, 2001 Attacks"),
|
|
116
116
|
(SEP, 12, "Closed for Sept 11, 2001 Attacks"),
|
|
117
117
|
(SEP, 13, "Closed for Sept 11, 2001 Attacks"),
|
|
118
118
|
(SEP, 14, "Closed for Sept 11, 2001 Attacks"),
|
|
119
119
|
),
|
|
120
|
-
2004: (
|
|
121
|
-
2007: (
|
|
120
|
+
2004: (JUN, 11, "Day of Mourning for President Ronald W. Reagan"),
|
|
121
|
+
2007: (JAN, 2, "Day of Mourning for President Gerald R. Ford"),
|
|
122
122
|
2012: (
|
|
123
123
|
(OCT, 29, "Hurricane Sandy"),
|
|
124
124
|
(OCT, 30, "Hurricane Sandy"),
|
|
125
125
|
),
|
|
126
|
-
2018: (
|
|
126
|
+
2018: (DEC, 5, "Day of Mourning for President George H.W. Bush"),
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
def
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
def __init__(self, *args, **kwargs):
|
|
130
|
+
ChristianHolidays.__init__(self)
|
|
131
|
+
InternationalHolidays.__init__(self)
|
|
132
|
+
super().__init__(*args, **kwargs)
|
|
133
|
+
|
|
134
|
+
def _add_observed_holiday(self, name: str, dt: date) -> None:
|
|
135
|
+
if self._is_saturday(dt):
|
|
136
|
+
dt += td(days=-1)
|
|
137
|
+
name = f"{name} (Observed)"
|
|
138
|
+
elif self._is_sunday(dt):
|
|
139
|
+
dt += td(days=+1)
|
|
140
|
+
name = f"{name} (Observed)"
|
|
141
|
+
|
|
142
|
+
self._add_holiday(name, dt)
|
|
136
143
|
|
|
137
144
|
def _populate(self, year):
|
|
138
145
|
super()._populate(year)
|
|
139
146
|
|
|
140
|
-
|
|
141
|
-
# REGULAR HOLIDAYS
|
|
142
|
-
##############################################################
|
|
143
|
-
|
|
144
|
-
# NYD
|
|
145
|
-
# This year's New Year Day.
|
|
147
|
+
# New Year Day.
|
|
146
148
|
jan_1 = date(year, JAN, 1)
|
|
147
149
|
if not self._is_saturday(jan_1):
|
|
148
|
-
self.
|
|
150
|
+
self._add_observed_holiday("New Year's Day", jan_1)
|
|
149
151
|
|
|
150
152
|
# https://www.nyse.com/publicdocs/nyse/regulation/nyse/NYSE_Rules.pdf
|
|
151
153
|
# As per Rule 7.2.: check if next year's NYD falls on Saturday and
|
|
152
154
|
# needs to be observed on Friday (Dec 31 of previous year).
|
|
153
155
|
dec_31 = date(year, DEC, 31)
|
|
154
156
|
if self._is_friday(dec_31):
|
|
155
|
-
self.
|
|
157
|
+
self._add_observed_holiday("New Year's Day", dec_31 + td(days=+1))
|
|
156
158
|
|
|
157
|
-
# MLK
|
|
159
|
+
# MLK, 3rd Monday of January.
|
|
158
160
|
if year >= 1998:
|
|
159
|
-
self
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
self._add_holiday(
|
|
162
|
+
"Martin Luther King Jr. Day",
|
|
163
|
+
_get_nth_weekday_of_month(3, MON, JAN, year),
|
|
164
|
+
)
|
|
162
165
|
|
|
163
166
|
# LINCOLN BIRTHDAY: observed 1896 - 1953 and 1968, Feb 12 (observed)
|
|
164
167
|
if 1896 <= year <= 1953 or year == 1968:
|
|
165
|
-
self.
|
|
168
|
+
self._add_observed_holiday("Lincoln's Birthday", date(year, FEB, 12))
|
|
166
169
|
|
|
167
170
|
# WASHINGTON'S BIRTHDAY: Feb 22 (obs) until 1971, then 3rd Mon of Feb
|
|
168
|
-
self.
|
|
169
|
-
date(year, FEB, 22)
|
|
170
|
-
if year <= 1970
|
|
171
|
-
else _get_nth_weekday_of_month(3, MON, FEB, year),
|
|
171
|
+
self._add_observed_holiday(
|
|
172
172
|
"Washington's Birthday",
|
|
173
|
+
date(year, FEB, 22) if year <= 1970 else _get_nth_weekday_of_month(3, MON, FEB, year),
|
|
173
174
|
)
|
|
174
175
|
|
|
175
176
|
# GOOD FRIDAY - closed every year except 1898, 1906, and 1907
|
|
176
177
|
if year not in {1898, 1906, 1907}:
|
|
177
|
-
self
|
|
178
|
+
self._add_good_friday("Good Friday")
|
|
178
179
|
|
|
179
180
|
# MEM DAY (May 30) - closed every year since 1873
|
|
180
181
|
# last Mon in May since 1971
|
|
181
182
|
if year >= 1873:
|
|
182
|
-
self.
|
|
183
|
+
self._add_observed_holiday(
|
|
184
|
+
"Memorial Day",
|
|
183
185
|
date(year, MAY, 30)
|
|
184
186
|
if year <= 1970
|
|
185
187
|
else _get_nth_weekday_of_month(-1, MON, MAY, year),
|
|
186
|
-
"Memorial Day",
|
|
187
188
|
)
|
|
188
189
|
|
|
189
190
|
# FLAG DAY: June 14th 1916 - 1953
|
|
190
191
|
if 1916 <= year <= 1953:
|
|
191
|
-
self.
|
|
192
|
+
self._add_observed_holiday("Flag Day", date(year, JUN, 14))
|
|
192
193
|
|
|
193
194
|
# JUNETEENTH: since 2021
|
|
194
195
|
if year >= 2021:
|
|
195
|
-
self.
|
|
196
|
-
date(year, JUN, 19), "Juneteenth National Independence Day"
|
|
197
|
-
)
|
|
196
|
+
self._add_observed_holiday("Juneteenth National Independence Day", date(year, JUN, 19))
|
|
198
197
|
|
|
199
198
|
# INDEPENDENCE DAY (July 4) - history suggests closed every year
|
|
200
|
-
self.
|
|
199
|
+
self._add_observed_holiday("Independence Day", date(year, JUL, 4))
|
|
201
200
|
|
|
202
201
|
# LABOR DAY - first mon in Sept, since 1887
|
|
203
202
|
if year >= 1887:
|
|
204
|
-
self
|
|
203
|
+
self._add_holiday("Labor Day", _get_nth_weekday_of_month(1, MON, SEP, year))
|
|
205
204
|
|
|
206
205
|
# COLUMBUS DAY/INDIGENOUS PPL DAY: Oct 12 - closed 1909-1953
|
|
207
206
|
if 1909 <= year <= 1953:
|
|
208
|
-
self.
|
|
207
|
+
self._add_observed_holiday("Columbus Day", date(year, OCT, 12))
|
|
209
208
|
|
|
210
209
|
# ELECTION DAY: Tuesday after first Monday in November (2 U.S. Code §7)
|
|
211
210
|
# closed until 1969, then closed pres years 1972-80
|
|
212
211
|
if year <= 1968 or year in {1972, 1976, 1980}:
|
|
213
|
-
self
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
self._add_holiday(
|
|
213
|
+
"Election Day",
|
|
214
|
+
_get_nth_weekday_of_month(1, MON, NOV, year) + td(days=+1),
|
|
215
|
+
)
|
|
216
216
|
|
|
217
217
|
# VETERAN'S DAY: Nov 11 - closed 1918, 1921, 1934-1953
|
|
218
218
|
if year in {1918, 1921} or 1934 <= year <= 1953:
|
|
219
|
-
self.
|
|
219
|
+
self._add_observed_holiday("Veteran's Day", date(year, NOV, 11))
|
|
220
220
|
|
|
221
221
|
# THXGIVING DAY: 4th Thurs in Nov - closed every year
|
|
222
|
-
self
|
|
222
|
+
self._add_holiday("Thanksgiving Day", _get_nth_weekday_of_month(4, THU, NOV, year))
|
|
223
223
|
|
|
224
224
|
# XMAS DAY: Dec 25th - every year
|
|
225
|
-
self.
|
|
225
|
+
self._add_observed_holiday("Christmas Day", date(year, DEC, 25))
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
# SPECIAL HOLIDAYS
|
|
229
|
-
##############################################################
|
|
227
|
+
# Special holidays.
|
|
230
228
|
if year == 1914:
|
|
231
|
-
# Beginning of WWI
|
|
229
|
+
# Beginning of WWI.
|
|
232
230
|
begin = date(year, JUL, 31)
|
|
233
231
|
end = date(year, NOV, 27)
|
|
234
|
-
for dt in (
|
|
235
|
-
|
|
236
|
-
):
|
|
237
|
-
if self._is_weekend(dt) or self.get(dt):
|
|
232
|
+
for dt in (begin + td(days=n) for n in range((end - begin).days + 1)):
|
|
233
|
+
if self._is_weekend(dt) or dt in self:
|
|
238
234
|
continue
|
|
239
|
-
self
|
|
235
|
+
self._add_holiday("World War I", dt)
|
|
240
236
|
elif year == 1968:
|
|
241
237
|
begin = date(year, JUN, 12)
|
|
242
238
|
end = date(year, DEC, 24)
|
|
243
|
-
# Wednesday special holiday
|
|
244
|
-
for dt in (
|
|
245
|
-
|
|
246
|
-
):
|
|
247
|
-
self[dt] = "Paper Crisis"
|
|
239
|
+
# Wednesday special holiday.
|
|
240
|
+
for dt in (begin + td(days=n) for n in range(0, (end - begin).days + 1, 7)):
|
|
241
|
+
self._add_holiday("Paper Crisis", dt)
|
|
248
242
|
|
|
249
243
|
|
|
250
244
|
class XNYS(NewYorkStockExchange):
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# python-holidays
|
|
2
|
+
# ---------------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
8
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
9
|
+
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
|
+
# License: MIT (see LICENSE file)
|
|
11
|
+
|
|
12
|
+
from holidays.groups.buddhist import BuddhistCalendarHolidays
|
|
13
|
+
from holidays.groups.chinese import ChineseCalendarHolidays
|
|
14
|
+
from holidays.groups.christian import ChristianHolidays
|
|
15
|
+
from holidays.groups.hindu import HinduCalendarHolidays
|
|
16
|
+
from holidays.groups.international import InternationalHolidays
|
|
17
|
+
from holidays.groups.islamic import IslamicHolidays
|
|
18
|
+
from holidays.groups.thai import ThaiCalendarHolidays
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# python-holidays
|
|
2
|
+
# ---------------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: dr-prodigy <maurizio.montel@gmail.com> (c) 2017-2022
|
|
8
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
9
|
+
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
|
+
# License: MIT (see LICENSE file)
|
|
11
|
+
|
|
12
|
+
from datetime import date
|
|
13
|
+
from typing import Tuple, Optional
|
|
14
|
+
|
|
15
|
+
from holidays.calendars import _BuddhistLunisolar
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class BuddhistCalendarHolidays:
|
|
19
|
+
"""
|
|
20
|
+
Buddhist lunisolar calendar holidays.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def __init__(self, calendar=_BuddhistLunisolar(), show_estimated=False) -> None:
|
|
24
|
+
self._buddhist_calendar = calendar
|
|
25
|
+
self._show_estimated = show_estimated
|
|
26
|
+
|
|
27
|
+
def _add_buddhist_calendar_holiday(
|
|
28
|
+
self,
|
|
29
|
+
name: str,
|
|
30
|
+
hol_date: Tuple[date, bool],
|
|
31
|
+
) -> Optional[date]:
|
|
32
|
+
"""
|
|
33
|
+
Add Buddhist calendar holiday.
|
|
34
|
+
|
|
35
|
+
Adds customizable estimation label to holiday name if holiday date
|
|
36
|
+
is an estimation.
|
|
37
|
+
"""
|
|
38
|
+
estimated_label = getattr(self, "estimated_label", "%s* (*estimated)")
|
|
39
|
+
dt, is_estimated = hol_date
|
|
40
|
+
|
|
41
|
+
return self._add_holiday(
|
|
42
|
+
self.tr(estimated_label) % self.tr(name)
|
|
43
|
+
if is_estimated and self._show_estimated
|
|
44
|
+
else name,
|
|
45
|
+
dt,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def _add_vesak(self, name) -> Optional[date]:
|
|
49
|
+
"""
|
|
50
|
+
Add Vesak (15th day of the 4th lunar month).
|
|
51
|
+
|
|
52
|
+
Vesak for Thailand, Laos, Singapore and Indonesia.
|
|
53
|
+
https://en.wikipedia.org/wiki/Vesak
|
|
54
|
+
"""
|
|
55
|
+
return self._add_buddhist_calendar_holiday(
|
|
56
|
+
name,
|
|
57
|
+
self._buddhist_calendar.vesak_date(self._year),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
def _add_vesak_may(self, name) -> Optional[date]:
|
|
61
|
+
"""
|
|
62
|
+
Add Vesak (on the day of the first full moon in May
|
|
63
|
+
in the Gregorian calendar).
|
|
64
|
+
|
|
65
|
+
Vesak for Sri Lanka, Nepal, India, Bangladesh and Malaysia.
|
|
66
|
+
https://en.wikipedia.org/wiki/Vesak
|
|
67
|
+
"""
|
|
68
|
+
return self._add_buddhist_calendar_holiday(
|
|
69
|
+
name,
|
|
70
|
+
self._buddhist_calendar.vesak_may_date(self._year),
|
|
71
|
+
)
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# python-holidays
|
|
2
|
+
# ---------------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: dr-prodigy <maurizio.montel@gmail.com> (c) 2017-2022
|
|
8
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
9
|
+
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
|
+
# License: MIT (see LICENSE file)
|
|
11
|
+
|
|
12
|
+
from datetime import date
|
|
13
|
+
from datetime import timedelta as td
|
|
14
|
+
from typing import Tuple, Optional
|
|
15
|
+
|
|
16
|
+
from holidays.calendars import _ChineseLunisolar
|
|
17
|
+
from holidays.constants import APR
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ChineseCalendarHolidays:
|
|
21
|
+
"""
|
|
22
|
+
Chinese lunisolar calendar holidays.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def __init__(self, calendar=_ChineseLunisolar(), show_estimated=False) -> None:
|
|
26
|
+
self._chinese_calendar = calendar
|
|
27
|
+
self._show_estimated = show_estimated
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def _chinese_new_year(self):
|
|
31
|
+
"""
|
|
32
|
+
Return Chinese New Year date.
|
|
33
|
+
"""
|
|
34
|
+
return self._chinese_calendar.lunar_new_year_date(self._year)[0]
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def _qingming_date(self):
|
|
38
|
+
day = 5
|
|
39
|
+
if (self._year % 4 < 1) or (self._year % 4 < 2 and self._year >= 2009):
|
|
40
|
+
day = 4
|
|
41
|
+
return date(self._year, APR, day)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def _mid_autumn_festival(self):
|
|
45
|
+
"""
|
|
46
|
+
Return Mid Autumn Festival (15th day of the 8th lunar month) date.
|
|
47
|
+
"""
|
|
48
|
+
return self._chinese_calendar.mid_autumn_date(self._year)[0]
|
|
49
|
+
|
|
50
|
+
def _add_chinese_calendar_holiday(
|
|
51
|
+
self,
|
|
52
|
+
name: str,
|
|
53
|
+
hol_date: Tuple[date, bool],
|
|
54
|
+
days_delta: int = 0,
|
|
55
|
+
) -> Optional[date]:
|
|
56
|
+
"""
|
|
57
|
+
Add Chinese calendar holiday.
|
|
58
|
+
|
|
59
|
+
Adds customizable estimation label to holiday name if holiday date
|
|
60
|
+
is an estimation.
|
|
61
|
+
"""
|
|
62
|
+
estimated_label = getattr(self, "estimated_label", "%s* (*estimated)")
|
|
63
|
+
dt, is_estimated = hol_date
|
|
64
|
+
if days_delta != 0:
|
|
65
|
+
dt += td(days=days_delta)
|
|
66
|
+
|
|
67
|
+
return self._add_holiday(
|
|
68
|
+
self.tr(estimated_label) % self.tr(name)
|
|
69
|
+
if is_estimated and self._show_estimated
|
|
70
|
+
else name,
|
|
71
|
+
dt,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def _add_chinese_birthday_of_buddha(self, name) -> Optional[date]:
|
|
75
|
+
"""
|
|
76
|
+
Add Birthday of the Buddha by Chinese lunar calendar (8th day of the
|
|
77
|
+
4th lunar month).
|
|
78
|
+
|
|
79
|
+
Birthday of the Buddha is a Buddhist festival that is celebrated in
|
|
80
|
+
most of East Asia and South Asia commemorating the birth of Gautama
|
|
81
|
+
Buddha, who was the founder of Buddhism.
|
|
82
|
+
https://en.wikipedia.org/wiki/Buddha%27s_Birthday
|
|
83
|
+
"""
|
|
84
|
+
return self._add_chinese_calendar_holiday(
|
|
85
|
+
name,
|
|
86
|
+
self._chinese_calendar.buddha_birthday_date(self._year),
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
def _add_chinese_new_years_eve(self, name) -> Optional[date]:
|
|
90
|
+
"""
|
|
91
|
+
Add Chinese New Year's Eve (last day of 12th lunar month).
|
|
92
|
+
|
|
93
|
+
Chinese New Year's Eve is the day before the Chinese New Year.
|
|
94
|
+
https://en.wikipedia.org/wiki/Chinese_New_Year%27s_Eve
|
|
95
|
+
"""
|
|
96
|
+
return self._add_chinese_calendar_holiday(
|
|
97
|
+
name,
|
|
98
|
+
self._chinese_calendar.lunar_new_year_date(self._year),
|
|
99
|
+
days_delta=-1,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
def _add_chinese_new_years_day(self, name) -> Optional[date]:
|
|
103
|
+
"""
|
|
104
|
+
Add Chinese New Year's Day (first day of the first lunar month).
|
|
105
|
+
|
|
106
|
+
Chinese New Year is the festival that celebrates the beginning of
|
|
107
|
+
a new year on the traditional lunisolar and solar Chinese calendar.
|
|
108
|
+
https://en.wikipedia.org/wiki/Chinese_New_Year
|
|
109
|
+
"""
|
|
110
|
+
return self._add_chinese_calendar_holiday(
|
|
111
|
+
name,
|
|
112
|
+
self._chinese_calendar.lunar_new_year_date(self._year),
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
def _add_chinese_new_years_day_two(self, name) -> Optional[date]:
|
|
116
|
+
"""
|
|
117
|
+
Add Chinese New Year's Day Two.
|
|
118
|
+
|
|
119
|
+
https://en.wikipedia.org/wiki/Chinese_New_Year
|
|
120
|
+
"""
|
|
121
|
+
return self._add_chinese_calendar_holiday(
|
|
122
|
+
name,
|
|
123
|
+
self._chinese_calendar.lunar_new_year_date(self._year),
|
|
124
|
+
days_delta=+1,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def _add_chinese_new_years_day_three(self, name) -> Optional[date]:
|
|
128
|
+
"""
|
|
129
|
+
Add Chinese New Year's Day Three.
|
|
130
|
+
|
|
131
|
+
https://en.wikipedia.org/wiki/Chinese_New_Year
|
|
132
|
+
"""
|
|
133
|
+
return self._add_chinese_calendar_holiday(
|
|
134
|
+
name,
|
|
135
|
+
self._chinese_calendar.lunar_new_year_date(self._year),
|
|
136
|
+
days_delta=+2,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
def _add_chinese_new_years_day_four(self, name) -> Optional[date]:
|
|
140
|
+
"""
|
|
141
|
+
Add Chinese New Year's Day Four.
|
|
142
|
+
|
|
143
|
+
https://en.wikipedia.org/wiki/Chinese_New_Year
|
|
144
|
+
"""
|
|
145
|
+
return self._add_chinese_calendar_holiday(
|
|
146
|
+
name,
|
|
147
|
+
self._chinese_calendar.lunar_new_year_date(self._year),
|
|
148
|
+
days_delta=+3,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
def _add_chinese_new_years_day_five(self, name) -> Optional[date]:
|
|
152
|
+
"""
|
|
153
|
+
Add Chinese New Year's Day Five.
|
|
154
|
+
|
|
155
|
+
https://en.wikipedia.org/wiki/Chinese_New_Year
|
|
156
|
+
"""
|
|
157
|
+
return self._add_chinese_calendar_holiday(
|
|
158
|
+
name,
|
|
159
|
+
self._chinese_calendar.lunar_new_year_date(self._year),
|
|
160
|
+
days_delta=+4,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
def _add_qingming_festival(self, name) -> date:
|
|
164
|
+
"""
|
|
165
|
+
Add Qingming Festival (15th day after the Spring Equinox).
|
|
166
|
+
|
|
167
|
+
The Qingming festival or Ching Ming Festival, also known as
|
|
168
|
+
Tomb-Sweeping Day in English, is a traditional Chinese festival.
|
|
169
|
+
https://en.wikipedia.org/wiki/Qingming_Festival
|
|
170
|
+
"""
|
|
171
|
+
return self._add_holiday(name, self._qingming_date)
|
|
172
|
+
|
|
173
|
+
def _add_double_ninth_festival(self, name) -> Optional[date]:
|
|
174
|
+
"""
|
|
175
|
+
Add Double Ninth Festival (9th day of 9th lunar month).
|
|
176
|
+
|
|
177
|
+
The Double Ninth Festival (Chongyang Festival in Mainland China
|
|
178
|
+
and Taiwan or Chung Yeung Festival in Hong Kong and Macau).
|
|
179
|
+
https://en.wikipedia.org/wiki/Double_Ninth_Festival
|
|
180
|
+
"""
|
|
181
|
+
return self._add_chinese_calendar_holiday(
|
|
182
|
+
name, self._chinese_calendar.double_ninth_date(self._year)
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
def _add_dragon_boat_festival(self, name) -> Optional[date]:
|
|
186
|
+
"""
|
|
187
|
+
Add Dragon Boat Festival (5th day of 5th lunar month).
|
|
188
|
+
|
|
189
|
+
The Dragon Boat Festival is a traditional Chinese holiday which occurs
|
|
190
|
+
on the fifth day of the fifth month of the Chinese calendar.
|
|
191
|
+
https://en.wikipedia.org/wiki/Dragon_Boat_Festival
|
|
192
|
+
"""
|
|
193
|
+
return self._add_chinese_calendar_holiday(
|
|
194
|
+
name, self._chinese_calendar.dragon_boat_date(self._year)
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
def _add_hung_kings_day(self, name) -> Optional[date]:
|
|
198
|
+
"""
|
|
199
|
+
Add Hùng Kings' Temple Festival (10th day of the 3rd lunar month).
|
|
200
|
+
|
|
201
|
+
Vietnamese festival held annually from the 8th to the 11th day of the
|
|
202
|
+
3rd lunar month in honour of the Hùng Kings.
|
|
203
|
+
https://en.wikipedia.org/wiki/H%C3%B9ng_Kings%27_Festival
|
|
204
|
+
"""
|
|
205
|
+
return self._add_chinese_calendar_holiday(
|
|
206
|
+
name,
|
|
207
|
+
self._chinese_calendar.hung_kings_date(self._year),
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
def _add_mid_autumn_festival(self, name) -> Optional[date]:
|
|
211
|
+
"""
|
|
212
|
+
Add Mid Autumn Festival (15th day of the 8th lunar month).
|
|
213
|
+
|
|
214
|
+
The Mid-Autumn Festival, also known as the Moon Festival or
|
|
215
|
+
Mooncake Festival.
|
|
216
|
+
https://en.wikipedia.org/wiki/Mid-Autumn_Festival
|
|
217
|
+
"""
|
|
218
|
+
return self._add_chinese_calendar_holiday(
|
|
219
|
+
name,
|
|
220
|
+
self._chinese_calendar.mid_autumn_date(self._year),
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
def _add_mid_autumn_festival_day_two(self, name) -> Optional[date]:
|
|
224
|
+
"""
|
|
225
|
+
Add Mid Autumn Festival Day Two (16th day of the 8th lunar month).
|
|
226
|
+
|
|
227
|
+
The Mid-Autumn Festival, also known as the Moon Festival or
|
|
228
|
+
Mooncake Festival.
|
|
229
|
+
https://en.wikipedia.org/wiki/Mid-Autumn_Festival
|
|
230
|
+
"""
|
|
231
|
+
return self._add_chinese_calendar_holiday(
|
|
232
|
+
name,
|
|
233
|
+
self._chinese_calendar.mid_autumn_date(self._year),
|
|
234
|
+
days_delta=+1,
|
|
235
|
+
)
|