holidays 0.81__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/hebrew.py +2 -2
- holidays/calendars/thai.py +49 -2
- holidays/countries/__init__.py +10 -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/cuba.py +3 -4
- holidays/countries/djibouti.py +1 -1
- holidays/countries/heard_island_and_mcdonald_islands.py +31 -0
- 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/malaysia.py +14 -3
- 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/portugal.py +5 -6
- holidays/countries/qatar.py +5 -2
- holidays/countries/rwanda.py +6 -1
- 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 +6 -1
- holidays/countries/spain.py +4 -4
- holidays/countries/sudan.py +6 -3
- holidays/countries/switzerland.py +169 -3
- holidays/countries/taiwan.py +22 -2
- 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 +6 -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 +25 -0
- holidays/groups/custom.py +8 -2
- holidays/groups/eastern.py +24 -0
- holidays/groups/hebrew.py +16 -14
- holidays/groups/hindu.py +15 -13
- holidays/groups/islamic.py +43 -48
- 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/ca/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BR.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/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/MM.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
- holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/es/LC_MESSAGES/PY.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_KP/LC_MESSAGES/KP.mo +0 -0
- holidays/locale/my/LC_MESSAGES/MM.mo +0 -0
- holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
- holidays/locale/th/LC_MESSAGES/JP.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MM.mo +0 -0
- holidays/locale/th/LC_MESSAGES/US.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/no_holiday_base.py +21 -0
- holidays/registry.py +6 -0
- holidays/utils.py +5 -5
- holidays/version.py +1 -1
- {holidays-0.81.dist-info → holidays-0.82.dist-info}/METADATA +47 -5
- {holidays-0.81.dist-info → holidays-0.82.dist-info}/RECORD +98 -83
- {holidays-0.81.dist-info → holidays-0.82.dist-info}/licenses/CONTRIBUTORS +2 -0
- {holidays-0.81.dist-info → holidays-0.82.dist-info}/WHEEL +0 -0
- {holidays-0.81.dist-info → holidays-0.82.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.81.dist-info → holidays-0.82.dist-info}/top_level.txt +0 -0
holidays/countries/portugal.py
CHANGED
|
@@ -129,15 +129,14 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
129
129
|
if self._year >= 1911:
|
|
130
130
|
if 1933 <= self._year <= 1973:
|
|
131
131
|
# Day of Camões, Portugal, and the Portuguese Race.
|
|
132
|
-
|
|
132
|
+
name = tr("Dia de Camões, de Portugal e da Raça")
|
|
133
133
|
elif self._year >= 1978:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
tr("Dia de Portugal, de Camões e das Comunidades Portuguesas")
|
|
137
|
-
)
|
|
134
|
+
# Day of Portugal, Camões, and the Portuguese Communities.
|
|
135
|
+
name = tr("Dia de Portugal, de Camões e das Comunidades Portuguesas")
|
|
138
136
|
else:
|
|
139
137
|
# Portugal Day.
|
|
140
|
-
|
|
138
|
+
name = tr("Dia de Portugal")
|
|
139
|
+
self._add_holiday_jun_10(name)
|
|
141
140
|
|
|
142
141
|
# Assumption Day.
|
|
143
142
|
self._add_assumption_of_mary_day(tr("Assunção de Nossa Senhora"))
|
holidays/countries/qatar.py
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
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
16
|
from holidays.calendars import _CustomIslamicHolidays
|
|
@@ -36,6 +37,7 @@ class Qatar(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays)
|
|
|
36
37
|
start_year = 1971
|
|
37
38
|
supported_categories = (BANK, PUBLIC)
|
|
38
39
|
supported_languages = ("ar_QA", "en_US")
|
|
40
|
+
weekend = {FRI, SAT}
|
|
39
41
|
|
|
40
42
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
41
43
|
"""
|
|
@@ -51,10 +53,11 @@ class Qatar(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays)
|
|
|
51
53
|
StaticHolidays.__init__(self, QatarStaticHolidays)
|
|
52
54
|
super().__init__(*args, **kwargs)
|
|
53
55
|
|
|
54
|
-
def
|
|
56
|
+
def _get_weekend(self, dt: date) -> set[int]:
|
|
55
57
|
# Qatar switches from THU-FRI to FRI-SAT on Aug 1, 2003.
|
|
56
|
-
|
|
58
|
+
return {FRI, SAT} if dt >= date(2003, AUG, 1) else {THU, FRI}
|
|
57
59
|
|
|
60
|
+
def _populate_public_holidays(self):
|
|
58
61
|
if self._year >= 2012:
|
|
59
62
|
# National Sports Day.
|
|
60
63
|
self._add_holiday_2nd_tue_of_feb(tr("اليوم الوطني للرياضة"))
|
holidays/countries/rwanda.py
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
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 import _CustomIslamicHolidays
|
|
17
19
|
from holidays.calendars.gregorian import MAR, JUN, JUL, AUG
|
|
@@ -22,6 +24,9 @@ from holidays.observed_holiday_base import (
|
|
|
22
24
|
SAT_SUN_TO_NEXT_WORKDAY,
|
|
23
25
|
)
|
|
24
26
|
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import date
|
|
29
|
+
|
|
25
30
|
|
|
26
31
|
class Rwanda(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
27
32
|
"""Rwanda holidays.
|
|
@@ -14,7 +14,7 @@ from datetime import date
|
|
|
14
14
|
from gettext import gettext as tr
|
|
15
15
|
|
|
16
16
|
from holidays.calendars import _CustomIslamicHolidays
|
|
17
|
-
from holidays.calendars.gregorian import SEP, NOV, THU, FRI, SAT, _timedelta
|
|
17
|
+
from holidays.calendars.gregorian import JUN, SEP, NOV, THU, FRI, SAT, _timedelta
|
|
18
18
|
from holidays.groups import IslamicHolidays, StaticHolidays
|
|
19
19
|
from holidays.observed_holiday_base import (
|
|
20
20
|
ObservedHolidayBase,
|
|
@@ -46,6 +46,7 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
|
|
|
46
46
|
# %s (observed, estimated).
|
|
47
47
|
observed_estimated_label = tr("%s (المقدرة، ملاحظة)")
|
|
48
48
|
supported_languages = ("ar", "en_US")
|
|
49
|
+
weekend = {FRI, SAT}
|
|
49
50
|
|
|
50
51
|
def __init__(self, *args, islamic_show_estimated: bool = False, **kwargs):
|
|
51
52
|
"""Saudi Arabia has traditionally used the Umm al-Qura calendar
|
|
@@ -71,16 +72,16 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
|
|
|
71
72
|
for i in range(4):
|
|
72
73
|
self._add_observed(_timedelta(dt, -i), name=self[dt], rule=observed_rule)
|
|
73
74
|
|
|
74
|
-
def
|
|
75
|
+
def _get_weekend(self, dt: date) -> set[int]:
|
|
75
76
|
# Weekend used to be THU, FRI before June 28th, 2013.
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
return {FRI, SAT} if dt >= date(2013, JUN, 28) else {THU, FRI}
|
|
78
|
+
|
|
79
|
+
def _populate_public_holidays(self):
|
|
78
80
|
self._observed_rule = (
|
|
79
81
|
THU_TO_PREV_WED + FRI_TO_NEXT_SAT
|
|
80
82
|
if self._year <= 2012
|
|
81
83
|
else FRI_TO_PREV_THU + SAT_TO_NEXT_SUN
|
|
82
84
|
)
|
|
83
|
-
self.weekend = {THU, FRI} if self._year <= 2012 else {FRI, SAT}
|
|
84
85
|
|
|
85
86
|
# Eid al-Fitr Holiday.
|
|
86
87
|
eid_al_fitr_name = tr("عطلة عيد الفطر")
|
holidays/countries/serbia.py
CHANGED
|
@@ -28,6 +28,8 @@ class Serbia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
28
28
|
default_language = "sr"
|
|
29
29
|
# %s (observed).
|
|
30
30
|
observed_label = tr("%s (слободан дан)")
|
|
31
|
+
# Independence Restored on June 5th, 2006.
|
|
32
|
+
start_year = 2007
|
|
31
33
|
supported_languages = ("en_US", "sr")
|
|
32
34
|
|
|
33
35
|
def __init__(self, *args, **kwargs):
|
|
@@ -64,10 +66,13 @@ class Serbia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
64
66
|
|
|
65
67
|
# Good Friday.
|
|
66
68
|
self._add_good_friday(tr("Велики петак"))
|
|
69
|
+
|
|
67
70
|
# Holy Saturday.
|
|
68
71
|
self._add_holy_saturday(tr("Велика субота"))
|
|
72
|
+
|
|
69
73
|
# Easter Sunday.
|
|
70
74
|
self._add_easter_sunday(tr("Васкрс"))
|
|
75
|
+
|
|
71
76
|
# Easter Monday.
|
|
72
77
|
self._add_easter_monday(tr("Други дан Васкрса"))
|
|
73
78
|
|
|
@@ -20,15 +20,18 @@ class SouthAfrica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
20
20
|
|
|
21
21
|
References:
|
|
22
22
|
* <https://web.archive.org/web/20250424073852/https://www.gov.za/about-sa/public-holidays>
|
|
23
|
+
* [Act No. 36, 1994](https://web.archive.org/web/20250914045710/https://www.gov.za/sites/default/files/gcis_document/201409/act36of1994.pdf)
|
|
24
|
+
* <https://web.archive.org/web/20250914050022/https://www.ancestors.co.za/origins-of-public-holidays-in-south-africa/>
|
|
23
25
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_South_Africa>
|
|
24
26
|
* <https://web.archive.org/web/20240715110800/https://www.gov.za/speeches/president-cyril-ramaphosa-progress-economic-recovery-30-oct-2023-0000>
|
|
25
27
|
* <https://web.archive.org/web/20250427184315/https://www.gov.za/documents/notices/public-holidays-act-declaration-29-may-2024-public-holiday-23-feb-2024>
|
|
26
28
|
"""
|
|
27
29
|
|
|
28
30
|
country = "ZA"
|
|
31
|
+
# %s (observed).
|
|
29
32
|
observed_label = "%s (observed)"
|
|
30
|
-
#
|
|
31
|
-
start_year =
|
|
33
|
+
# Public Holidays Act (No. 3 of 1910) came in effect on January 1st, 1911.
|
|
34
|
+
start_year = 1911
|
|
32
35
|
|
|
33
36
|
def __init__(self, *args, **kwargs):
|
|
34
37
|
ChristianHolidays.__init__(self)
|
|
@@ -39,75 +42,113 @@ class SouthAfrica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
39
42
|
super().__init__(*args, **kwargs)
|
|
40
43
|
|
|
41
44
|
def _populate_public_holidays(self):
|
|
45
|
+
# New Year's Day.
|
|
42
46
|
self._add_observed(self._add_new_years_day("New Year's Day"))
|
|
43
47
|
|
|
48
|
+
if 1980 <= self._year <= 1994:
|
|
49
|
+
# Founder's Day.
|
|
50
|
+
self._add_holiday_apr_6("Founder's Day")
|
|
51
|
+
elif 1952 <= self._year <= 1973:
|
|
52
|
+
# Van Riebeeck's Day.
|
|
53
|
+
self._add_holiday_apr_6("Van Riebeeck's Day")
|
|
54
|
+
|
|
55
|
+
# Good Friday.
|
|
44
56
|
self._add_good_friday("Good Friday")
|
|
45
57
|
|
|
46
|
-
|
|
58
|
+
if self._year <= 1979:
|
|
59
|
+
# Easter Monday.
|
|
60
|
+
self._add_easter_monday("Easter Monday")
|
|
47
61
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
name
|
|
52
|
-
elif self._year <=
|
|
53
|
-
name
|
|
54
|
-
else:
|
|
55
|
-
name = "Day of Reconciliation"
|
|
56
|
-
self._add_observed(self._add_holiday_dec_16(name))
|
|
62
|
+
# Family Day.
|
|
63
|
+
name = "Family Day"
|
|
64
|
+
if self._year >= 1980:
|
|
65
|
+
self._add_easter_monday(name)
|
|
66
|
+
elif 1961 <= self._year <= 1973:
|
|
67
|
+
self._add_holiday_jul_10(name)
|
|
57
68
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
self.
|
|
61
|
-
self.
|
|
62
|
-
|
|
69
|
+
# Workers' Day.
|
|
70
|
+
name = "Workers' Day"
|
|
71
|
+
if self._year >= 1995:
|
|
72
|
+
self._add_observed(self._add_labor_day(name))
|
|
73
|
+
elif 1987 <= self._year <= 1989:
|
|
74
|
+
self._add_holiday_1st_fri_of_may(name)
|
|
63
75
|
|
|
64
76
|
if self._year >= 1995:
|
|
77
|
+
# Human Rights Day.
|
|
65
78
|
self._add_observed(self._add_holiday_mar_21("Human Rights Day"))
|
|
66
79
|
|
|
80
|
+
# Freedom Day.
|
|
67
81
|
self._add_observed(self._add_holiday_apr_27("Freedom Day"))
|
|
68
82
|
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
# Youth Day.
|
|
71
84
|
self._add_observed(self._add_holiday_jun_16("Youth Day"))
|
|
72
85
|
|
|
86
|
+
# National Women's Day.
|
|
73
87
|
self._add_observed(self._add_holiday_aug_9("National Women's Day"))
|
|
74
88
|
|
|
89
|
+
# Heritage Day.
|
|
75
90
|
self._add_observed(self._add_holiday_sep_24("Heritage Day"))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if self._year <= 1993:
|
|
91
|
+
elif self._year <= 1993:
|
|
92
|
+
self._add_holiday_may_31(
|
|
93
|
+
# Republic Day.
|
|
94
|
+
"Republic Day"
|
|
95
|
+
if self._year >= 1961
|
|
96
|
+
# Union Day.
|
|
97
|
+
else "Union Day"
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# Ascension Day.
|
|
87
101
|
self._add_ascension_thursday("Ascension Day")
|
|
88
102
|
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
if self._year >= 1952:
|
|
104
|
+
# Kruger Day.
|
|
105
|
+
self._add_holiday_oct_10("Kruger Day")
|
|
91
106
|
|
|
92
|
-
if self._year
|
|
93
|
-
self.
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
if self._year >= 1952:
|
|
108
|
+
if self._year <= 1960:
|
|
109
|
+
# Queen's Birthday.
|
|
110
|
+
self._add_holiday_2nd_mon_of_jul("Queen's Birthday")
|
|
96
111
|
|
|
97
|
-
|
|
98
|
-
|
|
112
|
+
if self._year <= 1979:
|
|
113
|
+
# Settlers' Day.
|
|
114
|
+
self._add_holiday_1st_mon_of_sep("Settlers' Day")
|
|
115
|
+
else:
|
|
116
|
+
# According to our sources, Act No. 3 of 1910 supposedly uses the term "Victoria Day"
|
|
117
|
+
# but as we can't find the original document and that Empire Day was supposed
|
|
118
|
+
# instituted empire-wide circa 1904 - we'll stick with its latter name for now.
|
|
99
119
|
|
|
100
|
-
|
|
101
|
-
self.
|
|
120
|
+
# Empire Day.
|
|
121
|
+
self._add_holiday_may_24("Empire Day")
|
|
102
122
|
|
|
103
|
-
|
|
123
|
+
# King's Birthday.
|
|
104
124
|
self._add_holiday_1st_mon_of_aug("King's Birthday")
|
|
105
125
|
|
|
106
|
-
if
|
|
107
|
-
|
|
126
|
+
if self._year >= 1995:
|
|
127
|
+
# Day of Reconciliation.
|
|
128
|
+
name = "Day of Reconciliation"
|
|
129
|
+
elif self._year >= 1980:
|
|
130
|
+
# Day of the Vow.
|
|
131
|
+
name = "Day of the Vow"
|
|
132
|
+
elif self._year >= 1952:
|
|
133
|
+
# Day of the Covenant.
|
|
134
|
+
name = "Day of the Covenant"
|
|
135
|
+
else:
|
|
136
|
+
# Dingaan's Day.
|
|
137
|
+
name = "Dingaan's Day"
|
|
138
|
+
self._add_observed(self._add_holiday_dec_16(name))
|
|
139
|
+
|
|
140
|
+
# Christmas Day.
|
|
141
|
+
self._add_christmas_day("Christmas Day")
|
|
108
142
|
|
|
109
|
-
|
|
110
|
-
self.
|
|
143
|
+
self._add_observed(
|
|
144
|
+
self._add_christmas_day_two(
|
|
145
|
+
# Day of Goodwill.
|
|
146
|
+
"Day of Goodwill"
|
|
147
|
+
if self._year >= 1980
|
|
148
|
+
# Boxing Day.
|
|
149
|
+
else "Boxing Day"
|
|
150
|
+
)
|
|
151
|
+
)
|
|
111
152
|
|
|
112
153
|
|
|
113
154
|
class ZA(SouthAfrica):
|
|
@@ -119,11 +160,14 @@ class ZAF(SouthAfrica):
|
|
|
119
160
|
|
|
120
161
|
|
|
121
162
|
class SouthAfricaStaticHolidays:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
163
|
+
# Local Government Elections.
|
|
164
|
+
local_elections = "Local Government Elections"
|
|
165
|
+
# National and Provincial Government Elections.
|
|
166
|
+
national_and_provincial_elections = "National and Provincial Government Elections"
|
|
167
|
+
# Public Holiday by Presidential Decree.
|
|
168
|
+
presidential_decree_holiday = "Public Holiday by Presidential Decree"
|
|
169
|
+
# Y2K Changeover.
|
|
170
|
+
y2k_changeover = "Y2K Changeover"
|
|
127
171
|
special_public_holidays = {
|
|
128
172
|
1999: (
|
|
129
173
|
(JUN, 2, national_and_provincial_elections),
|
|
@@ -144,13 +188,12 @@ class SouthAfricaStaticHolidays:
|
|
|
144
188
|
(DEC, 27, presidential_decree_holiday),
|
|
145
189
|
),
|
|
146
190
|
2019: (MAY, 8, national_and_provincial_elections),
|
|
147
|
-
|
|
191
|
+
# Municipal elections.
|
|
192
|
+
2021: (NOV, 1, "Municipal elections"),
|
|
148
193
|
2022: (DEC, 27, presidential_decree_holiday),
|
|
149
|
-
# Winning the 2023 Rugby World Cup
|
|
150
194
|
2023: (DEC, 15, presidential_decree_holiday),
|
|
151
195
|
2024: (MAY, 29, national_and_provincial_elections),
|
|
152
196
|
}
|
|
153
|
-
|
|
154
197
|
special_public_holidays_observed = {
|
|
155
198
|
# https://web.archive.org/web/20120328122217/http://www.info.gov.za/speeches/1999/991028409p1002.htm
|
|
156
199
|
2000: (JAN, 3, y2k_changeover),
|
|
@@ -10,9 +10,11 @@
|
|
|
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
|
import warnings
|
|
14
|
-
from datetime import date
|
|
15
16
|
from gettext import gettext as tr
|
|
17
|
+
from typing import TYPE_CHECKING
|
|
16
18
|
|
|
17
19
|
from holidays.calendars.chinese import KOREAN_CALENDAR
|
|
18
20
|
from holidays.calendars.gregorian import (
|
|
@@ -43,6 +45,9 @@ from holidays.observed_holiday_base import (
|
|
|
43
45
|
SUN_TO_NEXT_WORKDAY,
|
|
44
46
|
)
|
|
45
47
|
|
|
48
|
+
if TYPE_CHECKING:
|
|
49
|
+
from datetime import date
|
|
50
|
+
|
|
46
51
|
|
|
47
52
|
class SouthKorea(
|
|
48
53
|
ObservedHolidayBase,
|
holidays/countries/spain.py
CHANGED
|
@@ -121,7 +121,7 @@ class Spain(
|
|
|
121
121
|
"La Rioja": "RI",
|
|
122
122
|
"Valenciana": "VC",
|
|
123
123
|
}
|
|
124
|
-
supported_languages = ("en_US", "es", "uk")
|
|
124
|
+
supported_languages = ("ca", "en_US", "es", "uk")
|
|
125
125
|
|
|
126
126
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
127
127
|
"""
|
|
@@ -186,7 +186,7 @@ class Spain(
|
|
|
186
186
|
self._move_holiday(self._add_epiphany_day(tr("Epifanía del Señor")))
|
|
187
187
|
|
|
188
188
|
# Andalusia Day.
|
|
189
|
-
self._move_holiday(self._add_holiday_feb_28(tr("Día de
|
|
189
|
+
self._move_holiday(self._add_holiday_feb_28(tr("Día de Andalucía")))
|
|
190
190
|
|
|
191
191
|
# Maundy Thursday.
|
|
192
192
|
self._add_holy_thursday(tr("Jueves Santo"))
|
|
@@ -260,7 +260,7 @@ class Spain(
|
|
|
260
260
|
if self._year in {2010, 2021}:
|
|
261
261
|
self._move_holiday(self._add_assumption_of_mary_day(tr("Asunción de la Virgen")))
|
|
262
262
|
|
|
263
|
-
#
|
|
263
|
+
# Asturias Day.
|
|
264
264
|
self._move_holiday(self._add_holiday_sep_8(tr("Día de Asturias")))
|
|
265
265
|
|
|
266
266
|
if self._year in {2014, 2025}:
|
|
@@ -301,7 +301,7 @@ class Spain(
|
|
|
301
301
|
self._add_holiday_jul_28(tr("Día de las Instituciones de Cantabria"))
|
|
302
302
|
|
|
303
303
|
if self._year not in {2013, 2019, 2024}:
|
|
304
|
-
# Our Lady of
|
|
304
|
+
# Our Lady of Bien Aparecida.
|
|
305
305
|
self._add_holiday_sep_15(tr("La Bien Aparecida"))
|
|
306
306
|
|
|
307
307
|
if self._year == 2015:
|
holidays/countries/sudan.py
CHANGED
|
@@ -10,10 +10,11 @@
|
|
|
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
16
|
from holidays.calendars import _CustomIslamicHolidays
|
|
16
|
-
from holidays.calendars.gregorian import MAY, JUL, AUG, SEP, FRI, SAT
|
|
17
|
+
from holidays.calendars.gregorian import JAN, MAY, JUL, AUG, SEP, FRI, SAT
|
|
17
18
|
from holidays.calendars.julian import JULIAN_CALENDAR
|
|
18
19
|
from holidays.groups import ChristianHolidays, IslamicHolidays
|
|
19
20
|
from holidays.holiday_base import HolidayBase
|
|
@@ -34,6 +35,7 @@ class Sudan(HolidayBase, ChristianHolidays, IslamicHolidays):
|
|
|
34
35
|
estimated_label = tr("%s (المقدرة)")
|
|
35
36
|
supported_languages = ("ar_SD", "en_US")
|
|
36
37
|
start_year = 1985
|
|
38
|
+
weekend = {FRI, SAT}
|
|
37
39
|
|
|
38
40
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
39
41
|
ChristianHolidays.__init__(self)
|
|
@@ -42,11 +44,12 @@ class Sudan(HolidayBase, ChristianHolidays, IslamicHolidays):
|
|
|
42
44
|
)
|
|
43
45
|
super().__init__(*args, **kwargs)
|
|
44
46
|
|
|
45
|
-
def
|
|
47
|
+
def _get_weekend(self, dt: date) -> set[int]:
|
|
46
48
|
# The resting days are Friday and Saturday since January 26th, 2008.
|
|
47
49
|
# https://sudantribune.com/article25544/
|
|
48
|
-
|
|
50
|
+
return {FRI, SAT} if dt >= date(2008, JAN, 26) else {FRI}
|
|
49
51
|
|
|
52
|
+
def _populate_public_holidays(self):
|
|
50
53
|
# Independence Day.
|
|
51
54
|
self._add_holiday_jan_1(tr("عيد الإستقلال"))
|
|
52
55
|
|