holidays 0.80__py3-none-any.whl → 0.82__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- holidays/calendars/__init__.py +1 -0
- holidays/calendars/burmese.py +319 -0
- holidays/calendars/chinese.py +39 -1
- holidays/calendars/hebrew.py +2 -2
- holidays/calendars/thai.py +49 -2
- holidays/countries/__init__.py +16 -0
- holidays/countries/afghanistan.py +7 -5
- holidays/countries/algeria.py +89 -24
- holidays/countries/antarctica.py +58 -0
- holidays/countries/bouvet_island.py +31 -0
- holidays/countries/brazil.py +1 -1
- holidays/countries/british_indian_ocean_territory.py +31 -0
- holidays/countries/bulgaria.py +6 -1
- holidays/countries/chile.py +9 -8
- holidays/countries/china.py +4 -0
- holidays/countries/cuba.py +3 -4
- holidays/countries/djibouti.py +1 -1
- holidays/countries/heard_island_and_mcdonald_islands.py +31 -0
- holidays/countries/hongkong.py +5 -1
- holidays/countries/hungary.py +4 -5
- holidays/countries/india.py +6 -0
- holidays/countries/japan.py +22 -18
- holidays/countries/jordan.py +6 -3
- holidays/countries/kuwait.py +6 -3
- holidays/countries/macau.py +9 -0
- holidays/countries/malaysia.py +14 -3
- holidays/countries/mongolia.py +2 -0
- holidays/countries/myanmar.py +195 -0
- holidays/countries/north_korea.py +161 -0
- holidays/countries/norway.py +23 -8
- holidays/countries/oman.py +6 -2
- holidays/countries/paraguay.py +70 -23
- holidays/countries/philippines.py +11 -2
- holidays/countries/portugal.py +5 -6
- holidays/countries/qatar.py +5 -2
- holidays/countries/rwanda.py +6 -1
- holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py +197 -0
- holidays/countries/saudi_arabia.py +6 -5
- holidays/countries/serbia.py +5 -0
- holidays/countries/south_africa.py +96 -53
- holidays/countries/south_korea.py +10 -1
- holidays/countries/spain.py +26 -4
- holidays/countries/sudan.py +118 -0
- holidays/countries/switzerland.py +169 -3
- holidays/countries/taiwan.py +27 -3
- holidays/countries/tajikistan.py +1 -1
- holidays/countries/tanzania.py +6 -1
- holidays/countries/thailand.py +21 -0
- holidays/countries/tonga.py +6 -1
- holidays/countries/trinidad_and_tobago.py +6 -1
- holidays/countries/united_arab_emirates.py +9 -2
- holidays/countries/united_states.py +16 -0
- holidays/countries/uruguay.py +6 -1
- holidays/countries/vietnam.py +10 -1
- holidays/countries/yemen.py +6 -3
- holidays/groups/__init__.py +1 -0
- holidays/groups/balinese_saka.py +1 -1
- holidays/groups/buddhist.py +1 -1
- holidays/groups/burmese.py +273 -0
- holidays/groups/chinese.py +27 -14
- holidays/groups/custom.py +8 -2
- holidays/groups/eastern.py +25 -3
- holidays/groups/hebrew.py +16 -14
- holidays/groups/hindu.py +15 -13
- holidays/groups/islamic.py +52 -47
- holidays/groups/mongolian.py +1 -1
- holidays/groups/sinhala.py +4 -9
- holidays/groups/tibetan.py +3 -4
- holidays/holiday_base.py +5 -4
- holidays/ical.py +6 -4
- holidays/locale/ar/LC_MESSAGES/DZ.mo +0 -0
- holidays/locale/ar_SD/LC_MESSAGES/SD.mo +0 -0
- holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/SH.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_PH/LC_MESSAGES/PH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/DZ.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ES.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/JP.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KP.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MM.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/VN.mo +0 -0
- holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/fil/LC_MESSAGES/PH.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/DZ.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/ja/LC_MESSAGES/JP.mo +0 -0
- holidays/locale/ko/LC_MESSAGES/KR.mo +0 -0
- holidays/locale/ko_KP/LC_MESSAGES/KP.mo +0 -0
- holidays/locale/mn/LC_MESSAGES/MN.mo +0 -0
- holidays/locale/my/LC_MESSAGES/MM.mo +0 -0
- holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
- holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
- holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/JP.mo +0 -0
- holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MM.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/PH.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/th/LC_MESSAGES/US.mo +0 -0
- holidays/locale/th/LC_MESSAGES/VN.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/vi/LC_MESSAGES/VN.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/CN.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/CN.mo +0 -0
- holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
- holidays/no_holiday_base.py +21 -0
- holidays/observed_holiday_base.py +1 -1
- holidays/registry.py +12 -0
- holidays/utils.py +5 -5
- holidays/version.py +1 -1
- {holidays-0.80.dist-info → holidays-0.82.dist-info}/METADATA +61 -5
- {holidays-0.80.dist-info → holidays-0.82.dist-info}/RECORD +142 -121
- {holidays-0.80.dist-info → holidays-0.82.dist-info}/licenses/CONTRIBUTORS +2 -0
- {holidays-0.80.dist-info → holidays-0.82.dist-info}/WHEEL +0 -0
- {holidays-0.80.dist-info → holidays-0.82.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.80.dist-info → holidays-0.82.dist-info}/top_level.txt +0 -0
holidays/countries/algeria.py
CHANGED
|
@@ -10,27 +10,50 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
13
15
|
from gettext import gettext as tr
|
|
16
|
+
from typing import TYPE_CHECKING
|
|
14
17
|
|
|
15
18
|
from holidays.calendars.gregorian import THU, FRI, SAT, SUN
|
|
16
|
-
from holidays.
|
|
19
|
+
from holidays.constants import CHRISTIAN, HEBREW, PUBLIC
|
|
20
|
+
from holidays.groups import (
|
|
21
|
+
ChristianHolidays,
|
|
22
|
+
HebrewCalendarHolidays,
|
|
23
|
+
InternationalHolidays,
|
|
24
|
+
IslamicHolidays,
|
|
25
|
+
)
|
|
17
26
|
from holidays.holiday_base import HolidayBase
|
|
18
27
|
|
|
28
|
+
if TYPE_CHECKING:
|
|
29
|
+
from datetime import date
|
|
30
|
+
|
|
19
31
|
|
|
20
|
-
class Algeria(
|
|
32
|
+
class Algeria(
|
|
33
|
+
HolidayBase, ChristianHolidays, HebrewCalendarHolidays, InternationalHolidays, IslamicHolidays
|
|
34
|
+
):
|
|
21
35
|
"""Algeria holidays.
|
|
22
36
|
|
|
23
37
|
References:
|
|
24
38
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_Algeria>
|
|
25
|
-
*
|
|
39
|
+
* [Loi n° 63-278 du 26 juillet 1963](https://web.archive.org/web/20250903142053/https://drive.google.com/file/d/1rWkxBEjs9aNkbiTTRXBET3Qo_3HQOJR9/view)
|
|
40
|
+
* [Ordonnance n° 68-419 du 26 juin 1968](https://web.archive.org/web/20250903142828/https://drive.google.com/file/d/1fMGyGVnunGkACWhm0tICANEZqao2pOV3/view)
|
|
41
|
+
* [Loi n° 05-06 du 17 Rabie El Aoeul 1426](https://web.archive.org/web/20250903143453/https://drive.google.com/file/d/1AXISrPGJzgDO8G3uB1TyICdtnOYW6ewm/view)
|
|
42
|
+
* [Loi n° 18-12 du 18 Chaoual 1439](https://web.archive.org/web/20250903141752/https://drive.google.com/file/d/1qxcrF3J-SUXmLdGZLVF0gdrN0aQWwykb/view)
|
|
43
|
+
* [Loi n° 23-10 du 8 Dhou El Hidja 1444](https://web.archive.org/web/20250903141052/https://drive.google.com/file/d/1hZJtxofzjFAphOX09dGGtvHxl6IN5aNz/view)
|
|
26
44
|
* <https://web.archive.org/web/20241231091630/https://www.thenationalnews.com/mena/2021/12/07/when-is-the-weekend-in-the-arab-world/>
|
|
45
|
+
* <https://web.archive.org/web/20250903160618/https://www.lemonde.fr/afrique/article/2018/01/12/en-algerie-le-nouvel-an-berbere-ferie-pour-la-premiere-fois_5241028_3212.html>
|
|
27
46
|
"""
|
|
28
47
|
|
|
29
48
|
country = "DZ"
|
|
30
49
|
default_language = "ar"
|
|
31
50
|
# %s (estimated).
|
|
32
51
|
estimated_label = tr("%s (المقدرة)")
|
|
52
|
+
# Loi n° 63-278 du 26 juillet 1963.
|
|
53
|
+
start_year = 1964
|
|
54
|
+
supported_categories = (CHRISTIAN, HEBREW, PUBLIC)
|
|
33
55
|
supported_languages = ("ar", "en_US", "fr")
|
|
56
|
+
weekend = {FRI, SAT}
|
|
34
57
|
|
|
35
58
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
36
59
|
"""
|
|
@@ -39,24 +62,28 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
39
62
|
Whether to add "estimated" label to Islamic holidays name
|
|
40
63
|
if holiday date is estimated.
|
|
41
64
|
"""
|
|
65
|
+
ChristianHolidays.__init__(self)
|
|
66
|
+
HebrewCalendarHolidays.__init__(self)
|
|
42
67
|
InternationalHolidays.__init__(self)
|
|
43
68
|
IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
|
|
44
69
|
super().__init__(*args, **kwargs)
|
|
45
70
|
|
|
46
|
-
def
|
|
71
|
+
def _get_weekend(self, dt: date) -> set[int]:
|
|
47
72
|
# The resting days are Friday and Saturday since 2009.
|
|
48
73
|
# Previously, these were on Thursday and Friday as implemented in 1976.
|
|
49
|
-
if
|
|
50
|
-
|
|
51
|
-
elif
|
|
52
|
-
|
|
74
|
+
if dt.year >= 2009:
|
|
75
|
+
return {FRI, SAT}
|
|
76
|
+
elif dt.year >= 1976:
|
|
77
|
+
return {THU, FRI}
|
|
53
78
|
else:
|
|
54
|
-
|
|
79
|
+
return {SAT, SUN}
|
|
55
80
|
|
|
81
|
+
def _populate_public_holidays(self):
|
|
56
82
|
# New Year's Day.
|
|
57
83
|
self._add_new_years_day(tr("رأس السنة الميلادية"))
|
|
58
84
|
|
|
59
|
-
#
|
|
85
|
+
# First Celebrated in 2018.
|
|
86
|
+
# Reaffirmed via Loi n° 18-12 du 18 Chaoual 1439.
|
|
60
87
|
if self._year >= 2018:
|
|
61
88
|
# Amazigh New Year.
|
|
62
89
|
self._add_holiday_jan_12(tr("رأس السنة الأمازيغية"))
|
|
@@ -64,13 +91,17 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
64
91
|
# Labor Day.
|
|
65
92
|
self._add_labor_day(tr("عيد العمال"))
|
|
66
93
|
|
|
67
|
-
|
|
94
|
+
# Name changed in Loi n° 05-06 du 17 Rabie El Aoeul 1426.
|
|
95
|
+
self._add_holiday_jul_5(
|
|
68
96
|
# Independence Day.
|
|
69
|
-
|
|
97
|
+
tr("عيد الاستقلال")
|
|
98
|
+
if self._year >= 2005
|
|
99
|
+
# Independence and National Liberation Front Day.
|
|
100
|
+
else tr("عيد الاستقلال وجبهة التحرير الوطني")
|
|
101
|
+
)
|
|
70
102
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
self._add_holiday_nov_1(tr("عيد الثورة"))
|
|
103
|
+
# Revolution Day.
|
|
104
|
+
self._add_holiday_nov_1(tr("عيد الثورة"))
|
|
74
105
|
|
|
75
106
|
# Islamic New Year.
|
|
76
107
|
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
|
|
@@ -82,18 +113,52 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
82
113
|
self._add_mawlid_day(tr("عيد المولد النبوي"))
|
|
83
114
|
|
|
84
115
|
# Eid al-Fitr.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
self._add_eid_al_fitr_day_two(
|
|
116
|
+
name = tr("عيد الفطر")
|
|
117
|
+
self._add_eid_al_fitr_day(name)
|
|
118
|
+
self._add_eid_al_fitr_day_two(name)
|
|
119
|
+
# Added via Loi n° 23-10 du 8 Dhou El Hidja 1444.
|
|
88
120
|
if self._year >= 2024:
|
|
89
|
-
self._add_eid_al_fitr_day_three(
|
|
121
|
+
self._add_eid_al_fitr_day_three(name)
|
|
90
122
|
|
|
91
123
|
# Eid al-Adha.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if self._year >=
|
|
96
|
-
self.
|
|
124
|
+
name = tr("عيد الأضحى")
|
|
125
|
+
self._add_eid_al_adha_day(name)
|
|
126
|
+
# Added via Ordonnance n° 68-419 du 26 juin 1968.
|
|
127
|
+
if self._year >= 1969:
|
|
128
|
+
self._add_eid_al_adha_day_two(name)
|
|
129
|
+
# Added via Loi n° 23-10 du 8 Dhou El Hidja 1444.
|
|
130
|
+
if self._year >= 2023:
|
|
131
|
+
self._add_eid_al_adha_day_three(name)
|
|
132
|
+
|
|
133
|
+
def _populate_christian_holidays(self):
|
|
134
|
+
# As outlined in Loi n° 63-278 du 26 juillet 1963.
|
|
135
|
+
|
|
136
|
+
# Easter Monday.
|
|
137
|
+
self._add_easter_monday(tr("إثنين الفصح"))
|
|
138
|
+
|
|
139
|
+
# Ascension Day.
|
|
140
|
+
self._add_ascension_thursday(tr("عيد الصعود"))
|
|
141
|
+
|
|
142
|
+
# Whit Monday.
|
|
143
|
+
self._add_whit_monday(tr("إثنين العنصرة"))
|
|
144
|
+
|
|
145
|
+
# Assumption Day.
|
|
146
|
+
self._add_assumption_of_mary_day(tr("عيد انتقال السيدة العذراء"))
|
|
147
|
+
|
|
148
|
+
# Christmas Day.
|
|
149
|
+
self._add_christmas_day(tr("عيد الميلاد"))
|
|
150
|
+
|
|
151
|
+
def _populate_hebrew_holidays(self):
|
|
152
|
+
# As outlined in Loi n° 63-278 du 26 juillet 1963.
|
|
153
|
+
|
|
154
|
+
# Rosh Hashanah.
|
|
155
|
+
self._add_rosh_hashanah(tr("رأس السنة العبرية"))
|
|
156
|
+
|
|
157
|
+
# Yom Kippur.
|
|
158
|
+
self._add_yom_kippur(tr("يوم الغفران"))
|
|
159
|
+
|
|
160
|
+
# Pesach.
|
|
161
|
+
self._add_passover(tr("عيد الفصح اليهودي"))
|
|
97
162
|
|
|
98
163
|
|
|
99
164
|
class DZ(Algeria):
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 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: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
14
|
+
from holidays.holiday_base import HolidayBase
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Antarctica(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
18
|
+
"""Antarctica holidays.
|
|
19
|
+
|
|
20
|
+
References:
|
|
21
|
+
* <https://en.wikipedia.org/wiki/Antarctica_Day>
|
|
22
|
+
* <https://en.wikipedia.org/wiki/Midwinter_Day>
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
country = "AQ"
|
|
26
|
+
# The Antarctica Treaty System became active on June 23rd, 1961.
|
|
27
|
+
start_year = 1962
|
|
28
|
+
|
|
29
|
+
def __init__(self, *args, **kwargs):
|
|
30
|
+
ChristianHolidays.__init__(self)
|
|
31
|
+
InternationalHolidays.__init__(self)
|
|
32
|
+
super().__init__(*args, **kwargs)
|
|
33
|
+
|
|
34
|
+
def _populate_public_holidays(self):
|
|
35
|
+
# New Year's Day.
|
|
36
|
+
self._add_new_years_day("New Year's Day")
|
|
37
|
+
|
|
38
|
+
# Midwinter Day.
|
|
39
|
+
name = "Midwinter Day"
|
|
40
|
+
if self._is_leap_year():
|
|
41
|
+
self._add_holiday_jun_20(name)
|
|
42
|
+
else:
|
|
43
|
+
self._add_holiday_jun_21(name)
|
|
44
|
+
|
|
45
|
+
if self._year >= 2010:
|
|
46
|
+
# Antarctica Day.
|
|
47
|
+
self._add_holiday_dec_1("Antarctica Day")
|
|
48
|
+
|
|
49
|
+
# Christmas Day.
|
|
50
|
+
self._add_christmas_day("Christmas Day")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class AQ(Antarctica):
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class ATA(Antarctica):
|
|
58
|
+
pass
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 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: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from holidays.no_holiday_base import NoHolidayBase
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class BouvetIsland(NoHolidayBase):
|
|
17
|
+
"""Bouvet Island holidays.
|
|
18
|
+
|
|
19
|
+
References:
|
|
20
|
+
* <https://en.wikipedia.org/wiki/Bouvet_Island>
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
country = "BV"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class BV(BouvetIsland):
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class BVT(BouvetIsland):
|
|
31
|
+
pass
|
holidays/countries/brazil.py
CHANGED
|
@@ -106,7 +106,7 @@ class Brazil(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
106
106
|
|
|
107
107
|
if 1892 <= self._year <= 1930:
|
|
108
108
|
# Republic Constitution Day.
|
|
109
|
-
self._add_holiday_feb_24(tr("Constituição da
|
|
109
|
+
self._add_holiday_feb_24(tr("Constituição da República"))
|
|
110
110
|
|
|
111
111
|
# Good Friday.
|
|
112
112
|
self._add_good_friday(tr("Sexta-feira Santa"))
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 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: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from holidays.no_holiday_base import NoHolidayBase
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class BritishIndianOceanTerritory(NoHolidayBase):
|
|
17
|
+
"""British Indian Ocean Territory holidays.
|
|
18
|
+
|
|
19
|
+
References:
|
|
20
|
+
* <https://en.wikipedia.org/wiki/British_Indian_Ocean_Territory>
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
country = "IO"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class IO(BritishIndianOceanTerritory):
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class IOT(BritishIndianOceanTerritory):
|
|
31
|
+
pass
|
holidays/countries/bulgaria.py
CHANGED
|
@@ -10,14 +10,19 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
14
15
|
from gettext import gettext as tr
|
|
16
|
+
from typing import TYPE_CHECKING
|
|
15
17
|
|
|
16
18
|
from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR
|
|
17
19
|
from holidays.constants import PUBLIC, SCHOOL
|
|
18
20
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
19
21
|
from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY
|
|
20
22
|
|
|
23
|
+
if TYPE_CHECKING:
|
|
24
|
+
from datetime import date
|
|
25
|
+
|
|
21
26
|
|
|
22
27
|
class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
23
28
|
"""Bulgaria holidays.
|
holidays/countries/chile.py
CHANGED
|
@@ -118,6 +118,7 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
118
118
|
# New Year's Day.
|
|
119
119
|
self._add_new_years_day(tr("Año Nuevo"))
|
|
120
120
|
if self._year >= 2017:
|
|
121
|
+
# National Holiday.
|
|
121
122
|
self._add_observed(self._add_new_years_day_two(tr("Feriado nacional")), rule=MON_ONLY)
|
|
122
123
|
|
|
123
124
|
# Good Friday.
|
|
@@ -171,12 +172,18 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
171
172
|
# Day of National Unity.
|
|
172
173
|
self._add_holiday_1st_mon_of_sep(tr("Día de la Unidad Nacional"))
|
|
173
174
|
|
|
175
|
+
# National Holiday.
|
|
176
|
+
name = tr("Fiestas Patrias")
|
|
177
|
+
|
|
174
178
|
if self._year >= 2007:
|
|
175
179
|
self._add_observed(
|
|
176
|
-
|
|
177
|
-
self._add_holiday_sep_17(tr("Fiestas Patrias")),
|
|
180
|
+
self._add_holiday_sep_17(name),
|
|
178
181
|
rule=MON_FRI_ONLY if self._year >= 2017 else MON_ONLY,
|
|
179
182
|
)
|
|
183
|
+
if self._year >= 2008:
|
|
184
|
+
self._add_observed(self._add_holiday_sep_20(name), rule=FRI_ONLY)
|
|
185
|
+
elif 1932 <= self._year <= 1944:
|
|
186
|
+
self._add_holiday_sep_20(name)
|
|
180
187
|
|
|
181
188
|
# Independence Day.
|
|
182
189
|
self._add_holiday_sep_18(tr("Día de la Independencia"))
|
|
@@ -184,12 +191,6 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
184
191
|
# Army Day.
|
|
185
192
|
self._add_holiday_sep_19(tr("Día de las Glorias del Ejército"))
|
|
186
193
|
|
|
187
|
-
if self._year >= 2008:
|
|
188
|
-
self._add_observed(self._add_holiday_sep_20(tr("Fiestas Patrias")), rule=FRI_ONLY)
|
|
189
|
-
|
|
190
|
-
if 1932 <= self._year <= 1944:
|
|
191
|
-
self._add_holiday_sep_20(tr("Fiestas Patrias"))
|
|
192
|
-
|
|
193
194
|
if self._year >= 1922 and self._year != 1973:
|
|
194
195
|
self._move_holiday(
|
|
195
196
|
self._add_columbus_day(
|
holidays/countries/china.py
CHANGED
|
@@ -65,6 +65,10 @@ class China(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays,
|
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
67
|
country = "CN"
|
|
68
|
+
# %s (estimated).
|
|
69
|
+
estimated_label = tr("%s(推定)")
|
|
70
|
+
# %s (observed, estimated).
|
|
71
|
+
observed_estimated_label = tr("%s(观察日,推定)")
|
|
68
72
|
# %s (observed).
|
|
69
73
|
observed_label = tr("%s(观察日)")
|
|
70
74
|
supported_categories = (PUBLIC, HALF_DAY)
|
holidays/countries/cuba.py
CHANGED
|
@@ -80,14 +80,13 @@ class Cuba(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
80
80
|
self._add_observed(self._add_labor_day(tr("Día Internacional de los Trabajadores")))
|
|
81
81
|
|
|
82
82
|
# Commemoration of the Assault of the Moncada garrison.
|
|
83
|
-
|
|
83
|
+
name = tr("Conmemoración del asalto a Moncada")
|
|
84
|
+
self._add_holiday_jul_25(name)
|
|
85
|
+
self._add_holiday_jul_27(name)
|
|
84
86
|
|
|
85
87
|
# Day of the National Rebellion.
|
|
86
88
|
self._add_holiday_jul_26(tr("Día de la Rebeldía Nacional"))
|
|
87
89
|
|
|
88
|
-
# Commemoration of the Assault of the Moncada garrison.
|
|
89
|
-
self._add_holiday_jul_27(tr("Conmemoración del asalto a Moncada"))
|
|
90
|
-
|
|
91
90
|
# Independence Day.
|
|
92
91
|
self._add_observed(self._add_holiday_oct_10(tr("Inicio de las Guerras de Independencia")))
|
|
93
92
|
|
holidays/countries/djibouti.py
CHANGED
|
@@ -17,7 +17,7 @@ from holidays.groups import ChristianHolidays, IslamicHolidays, InternationalHol
|
|
|
17
17
|
from holidays.holiday_base import HolidayBase
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
class Djibouti(HolidayBase, ChristianHolidays,
|
|
20
|
+
class Djibouti(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
21
21
|
"""Djibouti holidays."""
|
|
22
22
|
|
|
23
23
|
country = "DJ"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 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: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from holidays.no_holiday_base import NoHolidayBase
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class HeardIslandAndMcDonaldIslands(NoHolidayBase):
|
|
17
|
+
"""Heard Island and McDonald Islands holidays.
|
|
18
|
+
|
|
19
|
+
References:
|
|
20
|
+
* <https://en.wikipedia.org/wiki/Heard_Island_and_McDonald_Islands>
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
country = "HM"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class HM(HeardIslandAndMcDonaldIslands):
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class HMD(HeardIslandAndMcDonaldIslands):
|
|
31
|
+
pass
|
holidays/countries/hongkong.py
CHANGED
|
@@ -69,8 +69,12 @@ class HongKong(
|
|
|
69
69
|
country = "HK"
|
|
70
70
|
default_language = "zh_HK"
|
|
71
71
|
default_preferred_discretionary_holidays = (CHRISTMAS,)
|
|
72
|
+
# %s (estimated).
|
|
73
|
+
estimated_label = tr("%s(推定)")
|
|
74
|
+
# %s (observed, estimated).
|
|
75
|
+
observed_estimated_label = tr("%s(補假,推定)")
|
|
72
76
|
# %s (observed).
|
|
73
|
-
observed_label = tr("%s
|
|
77
|
+
observed_label = tr("%s(補假)")
|
|
74
78
|
supported_categories = (OPTIONAL, PUBLIC)
|
|
75
79
|
supported_languages = ("en_HK", "en_US", "th", "zh_CN", "zh_HK")
|
|
76
80
|
weekend = {SUN}
|
holidays/countries/hungary.py
CHANGED
|
@@ -43,7 +43,10 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
43
43
|
|
|
44
44
|
if self._year <= 1950 or self._year >= 1989:
|
|
45
45
|
# National Day.
|
|
46
|
-
|
|
46
|
+
name = tr("Nemzeti ünnep")
|
|
47
|
+
self._add_holiday_mar_15(name)
|
|
48
|
+
if self._year >= 1991:
|
|
49
|
+
self._add_holiday_oct_23(name)
|
|
47
50
|
|
|
48
51
|
if self._year >= 2017:
|
|
49
52
|
# Good Friday.
|
|
@@ -78,10 +81,6 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
78
81
|
else tr("Az államalapítás ünnepe")
|
|
79
82
|
)
|
|
80
83
|
|
|
81
|
-
if self._year >= 1991:
|
|
82
|
-
# National Day.
|
|
83
|
-
self._add_holiday_oct_23(tr("Nemzeti ünnep"))
|
|
84
|
-
|
|
85
84
|
if self._year >= 1999:
|
|
86
85
|
# All Saints' Day.
|
|
87
86
|
self._add_all_saints_day(tr("Mindenszentek"))
|
holidays/countries/india.py
CHANGED
|
@@ -279,6 +279,8 @@ class India(
|
|
|
279
279
|
self._add_holiday_apr_14(tr("Dr. B. R. Ambedkar's Jayanti"))
|
|
280
280
|
# Andhra Pradesh Foundation Day.
|
|
281
281
|
self._add_holiday_nov_1(tr("Andhra Pradesh Foundation Day"))
|
|
282
|
+
# Ugadi.
|
|
283
|
+
self._add_gudi_padwa(tr("Ugadi"))
|
|
282
284
|
|
|
283
285
|
# Assam.
|
|
284
286
|
def _populate_subdiv_as_public_holidays(self):
|
|
@@ -365,6 +367,8 @@ class India(
|
|
|
365
367
|
self._add_holiday_apr_14(tr("Dr. B. R. Ambedkar's Jayanti"))
|
|
366
368
|
# Karnataka Rajyotsav.
|
|
367
369
|
self._add_holiday_nov_1(tr("Karnataka Rajyotsava"))
|
|
370
|
+
# Ugadi.
|
|
371
|
+
self._add_gudi_padwa(tr("Ugadi"))
|
|
368
372
|
|
|
369
373
|
# Kerala.
|
|
370
374
|
def _populate_subdiv_kl_public_holidays(self):
|
|
@@ -476,6 +480,8 @@ class India(
|
|
|
476
480
|
self._add_holiday_jun_2(tr("Telangana Formation Day"))
|
|
477
481
|
# Bathukamma Festival.
|
|
478
482
|
self._add_holiday_oct_6(tr("Bathukamma Festival"))
|
|
483
|
+
# Ugadi.
|
|
484
|
+
self._add_gudi_padwa(tr("Ugadi"))
|
|
479
485
|
|
|
480
486
|
# Uttarakhand.
|
|
481
487
|
def _populate_subdiv_uk_public_holidays(self):
|
holidays/countries/japan.py
CHANGED
|
@@ -99,30 +99,38 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
|
|
|
99
99
|
# Foundation Day.
|
|
100
100
|
dts_observed.add(self._add_holiday_feb_11(tr("建国記念の日")))
|
|
101
101
|
|
|
102
|
-
if self._year
|
|
102
|
+
if self._year != 2019:
|
|
103
103
|
# Emperor's Birthday.
|
|
104
|
-
|
|
104
|
+
name = tr("天皇誕生日")
|
|
105
|
+
if self._year >= 2020:
|
|
106
|
+
# Reiwa Emperor's Birthday.
|
|
107
|
+
dt = self._add_holiday_feb_23(name)
|
|
108
|
+
elif self._year >= 1989:
|
|
109
|
+
# Heisei Emperor's Birthday.
|
|
110
|
+
dt = self._add_holiday_dec_23(name)
|
|
111
|
+
else:
|
|
112
|
+
# Showa Emperor's Birthday.
|
|
113
|
+
dt = self._add_holiday_apr_29(name)
|
|
114
|
+
dts_observed.add(dt)
|
|
105
115
|
|
|
106
116
|
# Vernal Equinox Day.
|
|
107
117
|
dts_observed.add(self._add_holiday(tr("春分の日"), self._vernal_equinox_date))
|
|
108
118
|
|
|
109
|
-
|
|
110
|
-
if self._year <= 1988:
|
|
111
|
-
name = tr("天皇誕生日")
|
|
112
|
-
elif self._year <= 2006:
|
|
113
|
-
# Greenery Day.
|
|
114
|
-
name = tr("みどりの日")
|
|
115
|
-
else:
|
|
119
|
+
if self._year >= 2007:
|
|
116
120
|
# Showa Day.
|
|
117
|
-
|
|
118
|
-
dts_observed.add(self._add_holiday_apr_29(name))
|
|
121
|
+
dts_observed.add(self._add_holiday_apr_29(tr("昭和の日")))
|
|
119
122
|
|
|
120
123
|
# Constitution Day.
|
|
121
124
|
dts_observed.add(self._add_holiday_may_3(tr("憲法記念日")))
|
|
122
125
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
if self._year >= 1989:
|
|
127
|
+
# Greenery Day.
|
|
128
|
+
name = tr("みどりの日")
|
|
129
|
+
dts_observed.add(
|
|
130
|
+
self._add_holiday_may_4(name)
|
|
131
|
+
if self._year >= 2007
|
|
132
|
+
else self._add_holiday_apr_29(name)
|
|
133
|
+
)
|
|
126
134
|
|
|
127
135
|
# Children's Day.
|
|
128
136
|
dts_observed.add(self._add_holiday_may_5(tr("こどもの日")))
|
|
@@ -188,10 +196,6 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
|
|
|
188
196
|
# Labor Thanksgiving Day.
|
|
189
197
|
dts_observed.add(self._add_holiday_nov_23(tr("勤労感謝の日")))
|
|
190
198
|
|
|
191
|
-
# Regarding the Emperor of Heisei.
|
|
192
|
-
if 1989 <= self._year <= 2018:
|
|
193
|
-
dts_observed.add(self._add_holiday_dec_23(tr("天皇誕生日")))
|
|
194
|
-
|
|
195
199
|
if self.observed:
|
|
196
200
|
self._populate_observed(dts_observed)
|
|
197
201
|
|
holidays/countries/jordan.py
CHANGED
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
+
from datetime import date
|
|
13
14
|
from gettext import gettext as tr
|
|
14
15
|
|
|
15
|
-
from holidays.calendars.gregorian import THU, FRI, SAT
|
|
16
|
+
from holidays.calendars.gregorian import JAN, THU, FRI, SAT
|
|
16
17
|
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
17
18
|
from holidays.holiday_base import HolidayBase
|
|
18
19
|
|
|
@@ -30,6 +31,7 @@ class Jordan(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolid
|
|
|
30
31
|
# %s (estimated).
|
|
31
32
|
estimated_label = tr("%s (المقدرة)")
|
|
32
33
|
supported_languages = ("ar", "en_US")
|
|
34
|
+
weekend = {FRI, SAT}
|
|
33
35
|
|
|
34
36
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
35
37
|
"""
|
|
@@ -43,11 +45,12 @@ class Jordan(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolid
|
|
|
43
45
|
IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
|
|
44
46
|
super().__init__(*args, **kwargs)
|
|
45
47
|
|
|
46
|
-
def
|
|
48
|
+
def _get_weekend(self, dt: date) -> set[int]:
|
|
47
49
|
# The resting days are Friday and Saturday since Jan 6, 2000.
|
|
48
50
|
# https://web.archive.org/web/20241226195649/http://archive.wfn.org/2000/01/msg00078.html
|
|
49
|
-
|
|
51
|
+
return {FRI, SAT} if dt >= date(2000, JAN, 6) else {THU, FRI}
|
|
50
52
|
|
|
53
|
+
def _populate_public_holidays(self):
|
|
51
54
|
# New Year's Day.
|
|
52
55
|
self._add_new_years_day(tr("رأس السنة الميلادية"))
|
|
53
56
|
|
holidays/countries/kuwait.py
CHANGED
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
+
from datetime import date
|
|
13
14
|
from gettext import gettext as tr
|
|
14
15
|
|
|
15
|
-
from holidays.calendars.gregorian import THU, FRI, SAT
|
|
16
|
+
from holidays.calendars.gregorian import SEP, THU, FRI, SAT
|
|
16
17
|
from holidays.groups import InternationalHolidays, IslamicHolidays
|
|
17
18
|
from holidays.holiday_base import HolidayBase
|
|
18
19
|
|
|
@@ -31,6 +32,7 @@ class Kuwait(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
31
32
|
# %s (estimated).
|
|
32
33
|
estimated_label = tr("%s (المقدرة)")
|
|
33
34
|
supported_languages = ("ar", "en_US")
|
|
35
|
+
weekend = {FRI, SAT}
|
|
34
36
|
|
|
35
37
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
36
38
|
"""
|
|
@@ -43,11 +45,12 @@ class Kuwait(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
43
45
|
IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
|
|
44
46
|
super().__init__(*args, **kwargs)
|
|
45
47
|
|
|
46
|
-
def
|
|
48
|
+
def _get_weekend(self, dt: date) -> set[int]:
|
|
47
49
|
# The resting days are Friday and Saturday since Sep 1, 2007.
|
|
48
50
|
# https://web.archive.org/web/20250414072729/https://www.arabnews.com/node/298933
|
|
49
|
-
|
|
51
|
+
return {FRI, SAT} if dt >= date(2007, SEP, 1) else {THU, FRI}
|
|
50
52
|
|
|
53
|
+
def _populate_public_holidays(self):
|
|
51
54
|
# New Year's Day.
|
|
52
55
|
self._add_new_years_day(tr("رأس السنة الميلادية"))
|
|
53
56
|
|
holidays/countries/macau.py
CHANGED
|
@@ -62,6 +62,8 @@ class Macau(
|
|
|
62
62
|
|
|
63
63
|
country = "MO"
|
|
64
64
|
default_language = "zh_MO"
|
|
65
|
+
# %s (estimated).
|
|
66
|
+
estimated_label = tr("%s(推定)")
|
|
65
67
|
# Decreto-Lei n.º 4/82/M.
|
|
66
68
|
start_year = 1982
|
|
67
69
|
subdivisions = (
|
|
@@ -374,6 +376,13 @@ class Macau(
|
|
|
374
376
|
# The first working day after %s.
|
|
375
377
|
else self.tr("%s後首個工作日")
|
|
376
378
|
)
|
|
379
|
+
self.observed_estimated_label = (
|
|
380
|
+
# Compensatory rest day for %s (estimated).
|
|
381
|
+
self.tr("%s的補假(推定)")
|
|
382
|
+
if self._year >= 2020
|
|
383
|
+
# The first working day after %s (estimated).
|
|
384
|
+
else self.tr("%s後首個工作日(推定)")
|
|
385
|
+
)
|
|
377
386
|
# Prior to 2012, in-lieus are only given for holidays which falls on Sunday.
|
|
378
387
|
self._observed_rule = (
|
|
379
388
|
SUN_TO_NEXT_WORKDAY if self._year <= 2011 else SAT_SUN_TO_NEXT_WORKDAY
|