holidays 0.68__py3-none-any.whl → 0.70__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 +2 -1
- holidays/calendars/balinese_saka.py +112 -0
- holidays/calendars/buddhist.py +1 -1
- holidays/calendars/chinese.py +1 -1
- holidays/calendars/custom.py +1 -1
- holidays/calendars/gregorian.py +1 -1
- holidays/calendars/hebrew.py +1 -1
- holidays/calendars/hindu.py +866 -2
- holidays/calendars/islamic.py +161 -1
- holidays/calendars/julian.py +1 -1
- holidays/calendars/julian_revised.py +1 -1
- holidays/calendars/persian.py +1 -1
- holidays/calendars/sinhala.py +1 -1
- holidays/calendars/thai.py +309 -257
- holidays/constants.py +3 -1
- holidays/countries/__init__.py +7 -1
- holidays/countries/afghanistan.py +17 -7
- holidays/countries/albania.py +16 -7
- holidays/countries/algeria.py +14 -10
- holidays/countries/american_samoa.py +12 -6
- holidays/countries/andorra.py +5 -4
- holidays/countries/angola.py +15 -14
- holidays/countries/antigua_and_barbuda.py +145 -0
- holidays/countries/argentina.py +787 -169
- holidays/countries/armenia.py +5 -6
- holidays/countries/aruba.py +11 -9
- holidays/countries/australia.py +21 -20
- holidays/countries/austria.py +3 -1
- holidays/countries/azerbaijan.py +30 -19
- holidays/countries/bahamas.py +13 -11
- holidays/countries/bahrain.py +14 -7
- holidays/countries/bangladesh.py +5 -4
- holidays/countries/barbados.py +11 -9
- holidays/countries/belarus.py +15 -15
- holidays/countries/belgium.py +8 -6
- holidays/countries/belize.py +7 -6
- holidays/countries/bolivia.py +12 -11
- holidays/countries/bosnia_and_herzegovina.py +21 -11
- holidays/countries/botswana.py +8 -6
- holidays/countries/brazil.py +8 -7
- holidays/countries/brunei.py +56 -62
- holidays/countries/bulgaria.py +9 -10
- holidays/countries/burkina_faso.py +14 -5
- holidays/countries/burundi.py +17 -12
- holidays/countries/cambodia.py +15 -24
- holidays/countries/cameroon.py +16 -7
- holidays/countries/canada.py +13 -12
- holidays/countries/chad.py +15 -6
- holidays/countries/chile.py +29 -28
- holidays/countries/china.py +39 -38
- holidays/countries/colombia.py +15 -20
- holidays/countries/congo.py +6 -7
- holidays/countries/costa_rica.py +11 -10
- holidays/countries/croatia.py +8 -5
- holidays/countries/cuba.py +30 -27
- holidays/countries/curacao.py +6 -4
- holidays/countries/cyprus.py +4 -5
- holidays/countries/czechia.py +7 -6
- holidays/countries/denmark.py +5 -6
- holidays/countries/djibouti.py +11 -3
- holidays/countries/dominica.py +18 -16
- holidays/countries/dominican_republic.py +6 -4
- holidays/countries/ecuador.py +5 -4
- holidays/countries/egypt.py +10 -11
- holidays/countries/el_salvador.py +6 -5
- holidays/countries/estonia.py +3 -1
- holidays/countries/eswatini.py +6 -4
- holidays/countries/ethiopia.py +26 -11
- holidays/countries/fiji.py +183 -0
- holidays/countries/finland.py +11 -10
- holidays/countries/france.py +6 -9
- holidays/countries/gabon.py +17 -8
- holidays/countries/georgia.py +7 -7
- holidays/countries/germany.py +11 -11
- holidays/countries/ghana.py +14 -6
- holidays/countries/greece.py +4 -5
- holidays/countries/greenland.py +5 -6
- holidays/countries/guam.py +12 -6
- holidays/countries/guatemala.py +7 -9
- holidays/countries/guernsey.py +37 -34
- holidays/countries/guinea.py +182 -0
- holidays/countries/haiti.py +6 -5
- holidays/countries/honduras.py +8 -4
- holidays/countries/hongkong.py +49 -60
- holidays/countries/hungary.py +26 -23
- holidays/countries/iceland.py +5 -4
- holidays/countries/india.py +494 -174
- holidays/countries/indonesia.py +68 -108
- holidays/countries/iran.py +18 -9
- holidays/countries/ireland.py +5 -4
- holidays/countries/isle_of_man.py +2 -2
- holidays/countries/israel.py +4 -5
- holidays/countries/italy.py +5 -4
- holidays/countries/ivory_coast.py +156 -0
- holidays/countries/jamaica.py +6 -4
- holidays/countries/japan.py +5 -5
- holidays/countries/jersey.py +29 -26
- holidays/countries/jordan.py +13 -6
- holidays/countries/kazakhstan.py +72 -51
- holidays/countries/kenya.py +28 -18
- holidays/countries/kuwait.py +14 -7
- holidays/countries/kyrgyzstan.py +11 -6
- holidays/countries/laos.py +21 -29
- holidays/countries/latvia.py +7 -5
- holidays/countries/lesotho.py +6 -5
- holidays/countries/liechtenstein.py +5 -5
- holidays/countries/lithuania.py +4 -5
- holidays/countries/luxembourg.py +5 -3
- holidays/countries/macau.py +480 -0
- holidays/countries/madagascar.py +5 -4
- holidays/countries/malawi.py +6 -4
- holidays/countries/malaysia.py +30 -18
- holidays/countries/maldives.py +14 -7
- holidays/countries/malta.py +10 -19
- holidays/countries/marshall_islands.py +6 -4
- holidays/countries/mauritania.py +13 -6
- holidays/countries/mexico.py +8 -7
- holidays/countries/moldova.py +6 -4
- holidays/countries/monaco.py +6 -4
- holidays/countries/montenegro.py +16 -7
- holidays/countries/morocco.py +13 -8
- holidays/countries/mozambique.py +3 -1
- holidays/countries/namibia.py +7 -5
- holidays/countries/netherlands.py +6 -6
- holidays/countries/new_zealand.py +3 -1
- holidays/countries/nicaragua.py +6 -5
- holidays/countries/nigeria.py +13 -5
- holidays/countries/north_macedonia.py +13 -5
- holidays/countries/northern_mariana_islands.py +12 -6
- holidays/countries/norway.py +15 -15
- holidays/countries/pakistan.py +48 -18
- holidays/countries/palau.py +13 -11
- holidays/countries/panama.py +9 -8
- holidays/countries/papua_new_guinea.py +25 -21
- holidays/countries/paraguay.py +10 -9
- holidays/countries/peru.py +4 -5
- holidays/countries/philippines.py +32 -18
- holidays/countries/poland.py +7 -6
- holidays/countries/portugal.py +13 -15
- holidays/countries/puerto_rico.py +12 -6
- holidays/countries/qatar.py +172 -0
- holidays/countries/romania.py +6 -4
- holidays/countries/russia.py +6 -4
- holidays/countries/saint_kitts_and_nevis.py +24 -22
- holidays/countries/saint_lucia.py +8 -7
- holidays/countries/samoa.py +7 -6
- holidays/countries/san_marino.py +4 -3
- holidays/countries/saudi_arabia.py +15 -15
- holidays/countries/serbia.py +3 -4
- holidays/countries/seychelles.py +22 -26
- holidays/countries/singapore.py +33 -38
- holidays/countries/slovakia.py +6 -5
- holidays/countries/slovenia.py +7 -6
- holidays/countries/south_africa.py +8 -6
- holidays/countries/south_korea.py +25 -32
- holidays/countries/spain.py +31 -24
- holidays/countries/sri_lanka.py +52 -42
- holidays/countries/sweden.py +20 -19
- holidays/countries/switzerland.py +6 -5
- holidays/countries/taiwan.py +230 -31
- holidays/countries/tanzania.py +34 -27
- holidays/countries/thailand.py +134 -142
- holidays/countries/timor_leste.py +38 -17
- holidays/countries/tonga.py +46 -42
- holidays/countries/tunisia.py +9 -3
- holidays/countries/turkey.py +17 -9
- holidays/countries/tuvalu.py +12 -11
- holidays/countries/ukraine.py +54 -54
- holidays/countries/united_arab_emirates.py +43 -30
- holidays/countries/united_kingdom.py +7 -6
- holidays/countries/united_states.py +130 -86
- holidays/countries/united_states_minor_outlying_islands.py +12 -6
- holidays/countries/united_states_virgin_islands.py +12 -6
- holidays/countries/uruguay.py +10 -9
- holidays/countries/uzbekistan.py +16 -7
- holidays/countries/vanuatu.py +7 -5
- holidays/countries/vatican_city.py +16 -15
- holidays/countries/venezuela.py +11 -14
- holidays/countries/vietnam.py +15 -11
- holidays/countries/zambia.py +8 -6
- holidays/countries/zimbabwe.py +6 -4
- holidays/deprecations/v1_incompatibility.py +1 -1
- holidays/financial/__init__.py +1 -1
- holidays/financial/brasil_bolsa_balcao.py +14 -13
- holidays/financial/european_central_bank.py +7 -6
- holidays/financial/ice_futures_europe.py +7 -6
- holidays/financial/ny_stock_exchange.py +13 -10
- holidays/groups/__init__.py +2 -1
- holidays/groups/balinese_saka.py +45 -0
- holidays/groups/buddhist.py +1 -1
- holidays/groups/chinese.py +69 -4
- holidays/groups/christian.py +1 -1
- holidays/groups/custom.py +1 -1
- holidays/groups/eastern.py +1 -1
- holidays/groups/hebrew.py +1 -1
- holidays/groups/hindu.py +256 -1
- holidays/groups/international.py +1 -1
- holidays/groups/islamic.py +17 -3
- holidays/groups/persian.py +1 -1
- holidays/groups/sinhala.py +1 -1
- holidays/groups/thai.py +1 -7
- holidays/helpers.py +1 -1
- holidays/holiday_base.py +410 -273
- holidays/ical.py +228 -0
- holidays/locale/ar_QA/LC_MESSAGES/QA.mo +0 -0
- holidays/locale/de/LC_MESSAGES/PL.mo +0 -0
- holidays/locale/en_CI/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/QA.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/GN.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/pt_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/tet/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/ur_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
- holidays/mixins.py +2 -2
- holidays/observed_holiday_base.py +5 -2
- holidays/registry.py +7 -1
- holidays/utils.py +151 -151
- holidays/version.py +2 -2
- holidays-0.70.dist-info/METADATA +1404 -0
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/RECORD +253 -222
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/WHEEL +1 -1
- holidays-0.68.dist-info/AUTHORS → holidays-0.70.dist-info/licenses/AUTHORS.md +7 -2
- {holidays-0.68.dist-info → holidays-0.70.dist-info/licenses}/LICENSE +1 -1
- holidays-0.68.dist-info/METADATA +0 -1080
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/top_level.txt +0 -0
holidays/countries/taiwan.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -31,6 +31,7 @@ from holidays.calendars.gregorian import (
|
|
|
31
31
|
SAT,
|
|
32
32
|
SUN,
|
|
33
33
|
)
|
|
34
|
+
from holidays.constants import GOVERNMENT, OPTIONAL, PUBLIC, SCHOOL, WORKDAY
|
|
34
35
|
from holidays.groups import ChineseCalendarHolidays, InternationalHolidays, StaticHolidays
|
|
35
36
|
from holidays.observed_holiday_base import (
|
|
36
37
|
ObservedHolidayBase,
|
|
@@ -44,33 +45,38 @@ CHILDRENS_DAY_RULE = ObservedRule({MON: +1, TUE: -1, WED: -1, THU: +1, FRI: -1,
|
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays, StaticHolidays):
|
|
47
|
-
"""
|
|
48
|
+
"""Taiwan holidays.
|
|
49
|
+
|
|
48
50
|
References:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
* <https://zh.wikipedia.org/wiki/中華民國節日與歲時列表>
|
|
52
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Taiwan>
|
|
53
|
+
|
|
54
|
+
Commemorative Day and Day Implementation Method Amendments:
|
|
55
|
+
* [Ministry of Interior (87) Order No. 8706459](https://zh.wikisource.org/wiki/紀念日及節日實施辦法_(民國87年))
|
|
56
|
+
* [Ministry of Interior (88) Order No. 8897074](https://zh.wikisource.org/wiki/紀念日及節日實施辦法_(民國88年))
|
|
57
|
+
* [Ministry of Interior (89) Order No. 8972185](https://zh.wikisource.org/wiki/紀念日及節日實施辦法_(民國89年2月))
|
|
58
|
+
* [Ministry of Interior (89) Order No. 8962562](https://zh.wikisource.org/wiki/紀念日及節日實施辦法_(民國89年12月))
|
|
59
|
+
* [Ministry of Interior Order No. 0950045320](https://law.moj.gov.tw/LawClass/LawOldVer.aspx?pcode=D0020033&lnndate=20060309&lser=001)
|
|
60
|
+
* [Ministry of Interior Order No. 0960110433](https://law.moj.gov.tw/LawClass/LawOldVer.aspx?pcode=D0020033&lnndate=20070711&lser=001)
|
|
61
|
+
* [Ministry of Interior Order No. 0960131407](https://law.moj.gov.tw/LawClass/LawOldVer.aspx?pcode=D0020033&lnndate=20070711&lser=001)
|
|
62
|
+
* [Ministry of Interior Order No. 0960155673](https://law.moj.gov.tw/LawClass/LawOldVer.aspx?pcode=D0020033&lnndate=20071003&lser=001)
|
|
63
|
+
* [Ministry of Interior Order No. 0990212117](https://law.moj.gov.tw/LawClass/LawOldVer.aspx?pcode=D0020033&lnndate=20101102&lser=001)
|
|
64
|
+
* [Ministry of Interior Order No. 1010307327 and 1030128812](https://law.moj.gov.tw/LawClass/LawOldVer.aspx?pcode=D0020033&lnndate=20120925&lser=001)
|
|
65
|
+
* [Ministry of Interior Order No. 1030182404](https://law.moj.gov.tw/LawClass/LawAll.aspx?pcode=D0020033)
|
|
66
|
+
|
|
67
|
+
Checked With:
|
|
68
|
+
* [DGPA Work Calendar (1998-2025; Chinese)](https://www.dgpa.gov.tw/informationlist?uid=30)
|
|
69
|
+
* [DGPA Work Calendar (2001-2025; English)](https://www.dgpa.gov.tw/en/informationlist?uid=353)
|
|
66
70
|
"""
|
|
67
71
|
|
|
68
72
|
country = "TW"
|
|
69
73
|
# %s (observed).
|
|
70
74
|
observed_label = tr("%s(慶祝)")
|
|
71
75
|
default_language = "zh_TW"
|
|
76
|
+
supported_categories = (GOVERNMENT, OPTIONAL, PUBLIC, SCHOOL, WORKDAY)
|
|
72
77
|
supported_languages = ("en_US", "th", "zh_CN", "zh_TW")
|
|
73
|
-
|
|
78
|
+
# Ministry of Interior (87) Order No. 8706459.
|
|
79
|
+
start_year = 1998
|
|
74
80
|
|
|
75
81
|
def __init__(self, *args, **kwargs):
|
|
76
82
|
ChineseCalendarHolidays.__init__(self)
|
|
@@ -82,9 +88,18 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
|
|
|
82
88
|
def _populate_observed(
|
|
83
89
|
self, dts: set[date], rule: ObservedRule = None, since: int = 2015
|
|
84
90
|
) -> None:
|
|
91
|
+
"""
|
|
92
|
+
Taiwan's General Observance Rule first started in 2015 as per
|
|
93
|
+
decreed in 內政部台內民字第1030182404號令.
|
|
94
|
+
|
|
95
|
+
Children's Day Special Observance Rule first started in 2012 as per
|
|
96
|
+
decreed in 內政部台內民字第1010307327號令 - as this doesn't affect 2011 ones,
|
|
97
|
+
as such the logic is simplified.
|
|
98
|
+
"""
|
|
85
99
|
if self._year < since:
|
|
86
100
|
return None
|
|
87
101
|
|
|
102
|
+
# Children's Day.
|
|
88
103
|
childrens_day = self.tr("兒童節")
|
|
89
104
|
for dt in sorted(dts):
|
|
90
105
|
names = self.get_list(dt)
|
|
@@ -92,7 +107,7 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
|
|
|
92
107
|
self._add_observed(
|
|
93
108
|
dt,
|
|
94
109
|
name,
|
|
95
|
-
# Children's Day falls on the same day as Tomb
|
|
110
|
+
# Children's Day falls on the same day as Tomb-Sweeping Day.
|
|
96
111
|
CHILDRENS_DAY_RULE if name == childrens_day and len(names) > 1 else rule,
|
|
97
112
|
)
|
|
98
113
|
|
|
@@ -115,17 +130,15 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
|
|
|
115
130
|
dts_observed_forward.add(self._add_chinese_new_years_day_two(name))
|
|
116
131
|
dts_observed_forward.add(self._add_chinese_new_years_day_three(name))
|
|
117
132
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
dts_observed.add(self._add_holiday_feb_28(tr("和平紀念日")))
|
|
133
|
+
# Peace Memorial Day.
|
|
134
|
+
dts_observed.add(self._add_holiday_feb_28(tr("和平紀念日")))
|
|
121
135
|
|
|
122
|
-
if
|
|
136
|
+
if self._year >= 2011:
|
|
123
137
|
# Children's Day.
|
|
124
138
|
dts_observed.add(self._add_holiday_apr_4(tr("兒童節")))
|
|
125
139
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
dts_observed.add(self._add_qingming_festival(tr("清明節")))
|
|
140
|
+
# Tomb-Sweeping Day.
|
|
141
|
+
dts_observed.add(self._add_qingming_festival(tr("民族掃墓節")))
|
|
129
142
|
|
|
130
143
|
# Dragon Boat Festival.
|
|
131
144
|
dts_observed.add(self._add_dragon_boat_festival(tr("端午節")))
|
|
@@ -134,11 +147,112 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
|
|
|
134
147
|
dts_observed.add(self._add_mid_autumn_festival(tr("中秋節")))
|
|
135
148
|
|
|
136
149
|
# National Day.
|
|
137
|
-
dts_observed.add(self._add_holiday_oct_10(tr("
|
|
150
|
+
dts_observed.add(self._add_holiday_oct_10(tr("國慶日")))
|
|
138
151
|
|
|
139
152
|
if self.observed:
|
|
140
153
|
self._populate_observed(dts_observed)
|
|
141
|
-
|
|
154
|
+
# While Chinese New Year special observances rule weren't officially decreed
|
|
155
|
+
# until 2015, this was de facto implemented by the DGPA since at least 2003.
|
|
156
|
+
self._populate_observed(dts_observed_forward, rule=SAT_SUN_TO_NEXT_WORKDAY, since=2003)
|
|
157
|
+
|
|
158
|
+
def _populate_school_holidays(self):
|
|
159
|
+
if self._year <= 2000:
|
|
160
|
+
# Founding Day of the Republic of China.
|
|
161
|
+
self._add_new_years_day_two(tr("中華民國開國紀念日"))
|
|
162
|
+
|
|
163
|
+
# Confucius' Birthday.
|
|
164
|
+
self._add_holiday_sep_28(tr("孔子誕辰紀念日"))
|
|
165
|
+
|
|
166
|
+
# Taiwan Retrocession Day.
|
|
167
|
+
self._add_holiday_oct_25(tr("臺灣光復節"))
|
|
168
|
+
|
|
169
|
+
# Late President Chiang Kai-shek's Birthday.
|
|
170
|
+
self._add_holiday_oct_31(tr("先總統 蔣公誕辰紀念日"))
|
|
171
|
+
|
|
172
|
+
# Dr. Sun Yat-sen's Birthday.
|
|
173
|
+
self._add_holiday_nov_12(tr("國父誕辰紀念日"))
|
|
174
|
+
|
|
175
|
+
# Constitution Day.
|
|
176
|
+
self._add_holiday_dec_25(tr("行憲紀念日"))
|
|
177
|
+
|
|
178
|
+
def _populate_government_holidays(self):
|
|
179
|
+
self._populate_school_holidays()
|
|
180
|
+
|
|
181
|
+
if self._year <= 2000:
|
|
182
|
+
# Revolutionary Martyrs Memorial Day.
|
|
183
|
+
self._add_holiday_mar_29(tr("革命先烈紀念日"))
|
|
184
|
+
|
|
185
|
+
def _populate_optional_holidays(self):
|
|
186
|
+
# Labor Day.
|
|
187
|
+
self._add_labor_day(tr("勞動節"))
|
|
188
|
+
|
|
189
|
+
# Armed Forces Day.
|
|
190
|
+
self._add_holiday_sep_3(tr("軍人節"))
|
|
191
|
+
|
|
192
|
+
def _populate_workday_holidays(self):
|
|
193
|
+
# Dr. Sun Yat-sen's Memorial Day.
|
|
194
|
+
self._add_holiday_mar_12(tr("國父逝世紀念日"))
|
|
195
|
+
|
|
196
|
+
# Arbor Day.
|
|
197
|
+
self._add_holiday_mar_12(tr("植樹節"))
|
|
198
|
+
|
|
199
|
+
# Youth Day.
|
|
200
|
+
self._add_holiday_mar_29(tr("青年節"))
|
|
201
|
+
|
|
202
|
+
# Teacher's Day.
|
|
203
|
+
self._add_holiday_sep_28(tr("教師節"))
|
|
204
|
+
|
|
205
|
+
# Chinese Cultural Renaissance Day.
|
|
206
|
+
self._add_holiday_nov_12(tr("中華文化復興節"))
|
|
207
|
+
|
|
208
|
+
# Women's Day.
|
|
209
|
+
self._add_womens_day(tr("婦女節"))
|
|
210
|
+
|
|
211
|
+
if self._year <= 2007:
|
|
212
|
+
# Late President Chiang Kai-shek's Memorial Day.
|
|
213
|
+
self._add_qingming_festival(tr("先總統蔣公逝世紀念日"))
|
|
214
|
+
|
|
215
|
+
if self._year <= 2010:
|
|
216
|
+
# Children's Day.
|
|
217
|
+
self._add_holiday_apr_4(tr("兒童節"))
|
|
218
|
+
|
|
219
|
+
if self._year >= 2000:
|
|
220
|
+
# The Buddha's Birthday.
|
|
221
|
+
self._add_chinese_birthday_of_buddha(tr("佛陀誕辰紀念日"))
|
|
222
|
+
|
|
223
|
+
if self._year >= 2001:
|
|
224
|
+
# Taoism Day.
|
|
225
|
+
self._add_chinese_new_years_day(tr("道教節"))
|
|
226
|
+
|
|
227
|
+
# Revolutionary Martyrs Memorial Day.
|
|
228
|
+
self._add_holiday_mar_29(tr("革命先烈紀念日"))
|
|
229
|
+
|
|
230
|
+
# Confucius' Birthday.
|
|
231
|
+
self._add_holiday_sep_28(tr("孔子誕辰紀念日"))
|
|
232
|
+
|
|
233
|
+
# Taiwan Retrocession Day.
|
|
234
|
+
self._add_holiday_oct_25(tr("臺灣光復節"))
|
|
235
|
+
|
|
236
|
+
# Dr. Sun Yat-sen's Birthday.
|
|
237
|
+
self._add_holiday_nov_12(tr("國父誕辰紀念日"))
|
|
238
|
+
|
|
239
|
+
# Constitution Day.
|
|
240
|
+
self._add_holiday_dec_25(tr("行憲紀念日"))
|
|
241
|
+
|
|
242
|
+
if self._year <= 2006:
|
|
243
|
+
# Late President Chiang Kai-shek's Birthday.
|
|
244
|
+
self._add_holiday_oct_31(tr("先總統 蔣公誕辰紀念日"))
|
|
245
|
+
|
|
246
|
+
if self._year >= 2006:
|
|
247
|
+
# Anti-Aggression Day.
|
|
248
|
+
self._add_holiday_mar_14(tr("反侵略日"))
|
|
249
|
+
|
|
250
|
+
if self._year >= 2008:
|
|
251
|
+
# Commemoration Day of the Lifting of Martial Law.
|
|
252
|
+
self._add_holiday_jul_15(tr("解嚴紀念日"))
|
|
253
|
+
|
|
254
|
+
# Taiwan United Nations Day.
|
|
255
|
+
self._add_united_nations_day(tr("臺灣聯合國日"))
|
|
142
256
|
|
|
143
257
|
|
|
144
258
|
class TW(Taiwan):
|
|
@@ -150,14 +264,67 @@ class TWN(Taiwan):
|
|
|
150
264
|
|
|
151
265
|
|
|
152
266
|
class TaiwanStaticHolidays:
|
|
267
|
+
"""Taiwan special holidays.
|
|
268
|
+
|
|
269
|
+
DGPA, Executive Yuan Work Calendars:
|
|
270
|
+
* [1998](https://www.dgpa.gov.tw/information?uid=30&pid=4979)
|
|
271
|
+
* [1999](https://www.dgpa.gov.tw/information?uid=30&pid=4978)
|
|
272
|
+
* [2000](https://www.dgpa.gov.tw/information?uid=30&pid=4977)
|
|
273
|
+
* [2001](https://www.dgpa.gov.tw/en/information?uid=353&pid=6199)
|
|
274
|
+
* [2002](https://www.dgpa.gov.tw/en/information?uid=353&pid=6198)
|
|
275
|
+
* [2003](https://www.dgpa.gov.tw/en/information?uid=353&pid=6197)
|
|
276
|
+
* [2004](https://www.dgpa.gov.tw/en/information?uid=353&pid=6196)
|
|
277
|
+
* [2005](https://www.dgpa.gov.tw/en/information?uid=353&pid=6195)
|
|
278
|
+
* [2006](https://www.dgpa.gov.tw/en/information?uid=353&pid=6192)
|
|
279
|
+
* [2007](https://www.dgpa.gov.tw/en/information?uid=353&pid=6194)
|
|
280
|
+
* [2008](https://www.dgpa.gov.tw/en/information?uid=353&pid=6191)
|
|
281
|
+
* [2009](https://www.dgpa.gov.tw/en/information?uid=353&pid=6190)
|
|
282
|
+
* [2010](https://www.dgpa.gov.tw/en/information?uid=353&pid=6189)
|
|
283
|
+
* [2011](https://www.dgpa.gov.tw/en/information?uid=353&pid=6188)
|
|
284
|
+
* [2012](https://www.dgpa.gov.tw/en/information?uid=353&pid=6187)
|
|
285
|
+
* [2013](https://www.dgpa.gov.tw/en/information?uid=353&pid=6186)
|
|
286
|
+
* [2014](https://www.dgpa.gov.tw/en/information?uid=353&pid=6183)
|
|
287
|
+
* [2015](https://www.dgpa.gov.tw/en/information?uid=353&pid=6182)
|
|
288
|
+
* [2016](https://www.dgpa.gov.tw/en/information?uid=353&pid=6180)
|
|
289
|
+
* [2017](https://www.dgpa.gov.tw/en/information?uid=353&pid=6178)
|
|
290
|
+
* [2018](https://www.dgpa.gov.tw/en/information?uid=353&pid=7730)
|
|
291
|
+
* [2019](https://www.dgpa.gov.tw/en/information?uid=353&pid=8178)
|
|
292
|
+
* [2020](https://www.dgpa.gov.tw/en/information?uid=353&pid=9724)
|
|
293
|
+
* [2021](https://www.dgpa.gov.tw/en/information?uid=353&pid=10181)
|
|
294
|
+
* [2022](https://www.dgpa.gov.tw/en/information?uid=353&pid=10659)
|
|
295
|
+
* [2023](https://www.dgpa.gov.tw/en/information?uid=353&pid=11016)
|
|
296
|
+
* [2024](https://www.dgpa.gov.tw/en/information?uid=353&pid=11402)
|
|
297
|
+
* [2025](https://www.dgpa.gov.tw/en/information?uid=353&pid=11979)
|
|
298
|
+
"""
|
|
299
|
+
|
|
153
300
|
# Date format (see strftime() Format Codes).
|
|
154
301
|
substituted_date_format = tr("%Y-%m-%d")
|
|
302
|
+
|
|
155
303
|
# Day off (substituted from %s).
|
|
156
304
|
substituted_label = tr("休息日(%s日起取代)")
|
|
157
305
|
|
|
306
|
+
# Women's Day.
|
|
307
|
+
womens_day = tr("婦女節")
|
|
308
|
+
|
|
309
|
+
# Children's Day.
|
|
158
310
|
childrens_day = tr("兒童節")
|
|
159
311
|
|
|
160
312
|
special_public_holidays = {
|
|
313
|
+
2000: (APR, 3, APR, 8),
|
|
314
|
+
2001: (JAN, 22, JAN, 20),
|
|
315
|
+
2005: (FEB, 7, FEB, 5),
|
|
316
|
+
2006: (OCT, 9, OCT, 14),
|
|
317
|
+
2007: (
|
|
318
|
+
(FEB, 23, MAR, 3),
|
|
319
|
+
(APR, 6, APR, 14),
|
|
320
|
+
(JUN, 18, JUN, 23),
|
|
321
|
+
(SEP, 24, SEP, 29),
|
|
322
|
+
),
|
|
323
|
+
2009: (
|
|
324
|
+
(JAN, 2, JAN, 10),
|
|
325
|
+
(JAN, 30, JAN, 17),
|
|
326
|
+
(MAY, 29, JUN, 6),
|
|
327
|
+
),
|
|
161
328
|
2010: (FEB, 19, FEB, 6),
|
|
162
329
|
2012: (
|
|
163
330
|
(JAN, 27, FEB, 4),
|
|
@@ -209,7 +376,39 @@ class TaiwanStaticHolidays:
|
|
|
209
376
|
2024: (FEB, 8, FEB, 17),
|
|
210
377
|
2025: (JAN, 27, FEB, 8),
|
|
211
378
|
}
|
|
212
|
-
|
|
379
|
+
# Prior to 2001, Women's Day and Children's Day holidays were given on
|
|
380
|
+
# the day before the Tomb-Sweeping Day.
|
|
381
|
+
special_optional_holidays_observed = {
|
|
382
|
+
1998: (
|
|
383
|
+
(APR, 4, childrens_day),
|
|
384
|
+
(APR, 4, womens_day),
|
|
385
|
+
),
|
|
386
|
+
1999: (
|
|
387
|
+
(APR, 4, childrens_day),
|
|
388
|
+
(APR, 4, womens_day),
|
|
389
|
+
),
|
|
390
|
+
2000: (
|
|
391
|
+
(APR, 3, childrens_day),
|
|
392
|
+
(APR, 3, womens_day),
|
|
393
|
+
# Armed Forces Day.
|
|
394
|
+
(SEP, 4, tr("軍人節")),
|
|
395
|
+
),
|
|
396
|
+
}
|
|
397
|
+
# The Buddha's Birthday was observed on 2nd Sunday of May in 2000.
|
|
213
398
|
special_public_holidays_observed = {
|
|
399
|
+
1998: (
|
|
400
|
+
# Chinese New Year.
|
|
401
|
+
(JAN, 31, tr("春節")),
|
|
402
|
+
# Tomb-Sweeping Day.
|
|
403
|
+
(APR, 6, tr("民族掃墓節")),
|
|
404
|
+
),
|
|
405
|
+
1999: (
|
|
406
|
+
# Founding Day of the Republic of China.
|
|
407
|
+
(JAN, 2, tr("中華民國開國紀念日")),
|
|
408
|
+
# Dragon Boat Festival.
|
|
409
|
+
(JUN, 19, tr("端午節")),
|
|
410
|
+
),
|
|
411
|
+
# The Buddha's Birthday.
|
|
412
|
+
2000: (MAY, 14, tr("佛陀誕辰紀念日")),
|
|
214
413
|
2013: (APR, 5, childrens_day),
|
|
215
414
|
}
|
holidays/countries/tanzania.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -27,35 +27,34 @@ from holidays.holiday_base import HolidayBase
|
|
|
27
27
|
class Tanzania(
|
|
28
28
|
HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays
|
|
29
29
|
):
|
|
30
|
-
"""
|
|
30
|
+
"""Tanzania holidays.
|
|
31
|
+
|
|
31
32
|
References:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
* [1962](https://old.tanzlii.org/tz/legislation/act/1962/48/)
|
|
34
|
+
* [1964](https://old.tanzlii.org/tz/legislation/act/1964/52/)
|
|
35
|
+
* [1966](https://old.tanzlii.org/tz/legislation/act/1966/39/)
|
|
36
|
+
* [1993](https://www.parliament.go.tz/polis/uploads/bills/acts/1566639469-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20Act,%201993.pdf)
|
|
37
|
+
* [1994](https://www.parliament.go.tz/polis/uploads/bills/acts/1566638051-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20(No.%202)%20Act,%201994.pdf)
|
|
38
|
+
* [2002](http://parliament.go.tz/polis/uploads/bills/acts/1454076376-ActNo-25-2002.pdf)
|
|
39
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Tanzania>
|
|
40
|
+
* <http://mytanzaniatimes.blogspot.com/2014/08/holiday-nane-nane-farmers-day-in.html>
|
|
41
|
+
* <https://www.theeastafrican.co.ke/tea/business/tanzania-declares-public-holiday-on-census-day-3918836>
|
|
42
|
+
* <https://www.dw.com/en/samia-suluhu-hassan-who-is-tanzanias-new-president/a-56932264>
|
|
42
43
|
|
|
43
44
|
Checked With:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
* [2023](https://www.bot.go.tz/webdocs/Other/2023%20public%20holidays.pdf)
|
|
46
|
+
* [2022](https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202022.pdf)
|
|
47
|
+
* [2021](https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202021.pdf)
|
|
48
|
+
* [2020](https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202020.pdf)
|
|
49
|
+
* [2018](https://issamichuzi.blogspot.com/2017/11/sikukuu-za-kitaifa-zenye-mapumziko-kwa.html)
|
|
50
|
+
* [from 2013 onwards](https://www.timeanddate.com/holidays/tanzania/)
|
|
50
51
|
|
|
51
52
|
Limitations:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- Exact Islamic holidays dates are only available for 2013-2023; the rest are estimates.
|
|
53
|
+
* Only works from 1994 onwards due to the lack of sources for certain legislation:
|
|
54
|
+
* Government Notices No. 79 of 1977
|
|
55
|
+
* Government Notices No. 300 of 1985
|
|
56
|
+
* Government Notices No. 296 of 1994
|
|
57
|
+
* Exact Islamic holidays dates are only available for 2013-2023; the rest are estimates.
|
|
59
58
|
"""
|
|
60
59
|
|
|
61
60
|
country = "TZ"
|
|
@@ -67,10 +66,18 @@ class Tanzania(
|
|
|
67
66
|
# Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
|
|
68
67
|
start_year = 1994
|
|
69
68
|
|
|
70
|
-
def __init__(self, *args, **kwargs):
|
|
69
|
+
def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
|
|
70
|
+
"""
|
|
71
|
+
Args:
|
|
72
|
+
islamic_show_estimated:
|
|
73
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
74
|
+
if holiday date is estimated.
|
|
75
|
+
"""
|
|
71
76
|
ChristianHolidays.__init__(self)
|
|
72
77
|
InternationalHolidays.__init__(self)
|
|
73
|
-
IslamicHolidays.__init__(
|
|
78
|
+
IslamicHolidays.__init__(
|
|
79
|
+
self, cls=TanzaniaIslamicHolidays, show_estimated=islamic_show_estimated
|
|
80
|
+
)
|
|
74
81
|
StaticHolidays.__init__(self, TanzaniaStaticHolidays)
|
|
75
82
|
super().__init__(*args, **kwargs)
|
|
76
83
|
|