holidays 0.87__py3-none-any.whl → 0.89__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/constants.py +1 -0
- holidays/countries/american_samoa.py +2 -0
- holidays/countries/argentina.py +49 -37
- holidays/countries/australia.py +13 -1
- holidays/countries/azerbaijan.py +5 -4
- holidays/countries/belarus.py +4 -2
- holidays/countries/brazil.py +27 -1
- holidays/countries/chile.py +2 -3
- holidays/countries/estonia.py +5 -5
- holidays/countries/guam.py +2 -0
- holidays/countries/italy.py +7 -7
- holidays/countries/jordan.py +6 -4
- holidays/countries/kyrgyzstan.py +3 -2
- holidays/countries/macau.py +39 -45
- holidays/countries/malaysia.py +171 -71
- holidays/countries/new_zealand.py +4 -3
- holidays/countries/northern_mariana_islands.py +2 -0
- holidays/countries/puerto_rico.py +4 -2
- holidays/countries/qatar.py +4 -5
- holidays/countries/sweden.py +35 -11
- holidays/countries/taiwan.py +6 -5
- holidays/countries/timor_leste.py +14 -20
- holidays/countries/turks_and_caicos_islands.py +13 -3
- holidays/countries/united_states.py +400 -108
- holidays/countries/united_states_minor_outlying_islands.py +2 -0
- holidays/countries/united_states_virgin_islands.py +2 -0
- holidays/countries/uzbekistan.py +12 -1
- holidays/countries/venezuela.py +113 -23
- holidays/financial/__init__.py +1 -0
- holidays/financial/bombay_stock_exchange.py +33 -0
- holidays/financial/national_stock_exchange_of_india.py +1 -1
- holidays/holiday_base.py +2 -1
- holidays/locale/en_AU/LC_MESSAGES/AU.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/XBOM.mo +0 -0
- holidays/locale/en_TC/LC_MESSAGES/TC.mo +0 -0
- holidays/locale/en_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TC.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/VE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/XBOM.mo +0 -0
- holidays/locale/es/LC_MESSAGES/VE.mo +0 -0
- holidays/locale/gu/LC_MESSAGES/XBOM.mo +0 -0
- holidays/locale/gu/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/XBOM.mo +0 -0
- holidays/locale/ms_MY/LC_MESSAGES/MY.mo +0 -0
- holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
- holidays/locale/pt_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/sv/LC_MESSAGES/SE.mo +0 -0
- holidays/locale/tet/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/AU.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MY.mo +0 -0
- holidays/locale/th/LC_MESSAGES/SE.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TL.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/SE.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/VE.mo +0 -0
- holidays/registry.py +1 -0
- holidays/utils.py +52 -0
- holidays/version.py +3 -1
- {holidays-0.87.dist-info → holidays-0.89.dist-info}/METADATA +18 -18
- {holidays-0.87.dist-info → holidays-0.89.dist-info}/RECORD +71 -65
- {holidays-0.87.dist-info → holidays-0.89.dist-info}/licenses/CONTRIBUTORS +7 -0
- {holidays-0.87.dist-info → holidays-0.89.dist-info}/WHEEL +0 -0
- {holidays-0.87.dist-info → holidays-0.89.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.87.dist-info → holidays-0.89.dist-info}/top_level.txt +0 -0
holidays/countries/sweden.py
CHANGED
|
@@ -20,7 +20,7 @@ from holidays.calendars.gregorian import (
|
|
|
20
20
|
_get_nth_weekday_from,
|
|
21
21
|
_timedelta,
|
|
22
22
|
)
|
|
23
|
-
from holidays.constants import BANK, OPTIONAL, PUBLIC
|
|
23
|
+
from holidays.constants import BANK, DE_FACTO, OPTIONAL, PUBLIC
|
|
24
24
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
25
25
|
from holidays.holiday_base import HolidayBase
|
|
26
26
|
|
|
@@ -37,9 +37,31 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
37
37
|
* <https://sv.wikipedia.org/wiki/Sveriges_nationaldag>
|
|
38
38
|
* <https://sv.wikipedia.org/wiki/Midsommarafton>
|
|
39
39
|
* [Bank Holidays 2025](https://web.archive.org/web/20250811112642/https://www.riksbank.se/sv/press-och-publicerat/kalender/helgdagar-2025/)
|
|
40
|
+
* [Swedish Annual Leave Law (SFS 1977:480)](https://web.archive.org/web/20260106114757/https://www.riksdagen.se/sv/dokument-och-lagar/dokument/svensk-forfattningssamling/semesterlag-1977480_sfs-1977-480/)
|
|
40
41
|
|
|
41
42
|
In Sweden, ALL sundays are considered a holiday.
|
|
42
43
|
Initialize this class with `include_sundays=False` to not include sundays as a holiday.
|
|
44
|
+
|
|
45
|
+
Supported holiday categories:
|
|
46
|
+
|
|
47
|
+
- PUBLIC: Official public holidays with general time off
|
|
48
|
+
- DE_FACTO: Holidays treated equivalently to public holidays by law
|
|
49
|
+
- BANK: Banking institution holidays
|
|
50
|
+
- OPTIONAL: Optional or cultural observances
|
|
51
|
+
|
|
52
|
+
The DE_FACTO category includes:
|
|
53
|
+
- Midsommarafton (Midsummer Eve)
|
|
54
|
+
- Julafton (Christmas Eve)
|
|
55
|
+
- Nyårsafton (New Year's Eve)
|
|
56
|
+
|
|
57
|
+
According to Swedish Annual Leave Law (SFS 1977:480, Section 7): "Med söndag
|
|
58
|
+
jämställs allmän helgdag samt midsommarafton, julafton och nyårsafton"
|
|
59
|
+
(Sundays are equivalent to public holidays as well as Midsummer's Eve,
|
|
60
|
+
Christmas Eve, and New Year's Eve).
|
|
61
|
+
|
|
62
|
+
These holidays are not official public holidays but must be treated as
|
|
63
|
+
non-working days. For accurate `is_working_day()` calculations, use:
|
|
64
|
+
`Sweden(categories=(PUBLIC, DE_FACTO))`
|
|
43
65
|
"""
|
|
44
66
|
|
|
45
67
|
# %s (from 2pm).
|
|
@@ -48,7 +70,7 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
48
70
|
default_language = "sv"
|
|
49
71
|
# Act 1952:48.
|
|
50
72
|
start_year = 1953
|
|
51
|
-
supported_categories = (BANK, OPTIONAL, PUBLIC)
|
|
73
|
+
supported_categories = (BANK, DE_FACTO, OPTIONAL, PUBLIC)
|
|
52
74
|
supported_languages = ("en_US", "sv", "th", "uk")
|
|
53
75
|
|
|
54
76
|
def __init__(self, *args, include_sundays: bool = True, **kwargs):
|
|
@@ -126,6 +148,16 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
126
148
|
# Sunday.
|
|
127
149
|
self._add_holiday(tr("Söndag"), dt)
|
|
128
150
|
|
|
151
|
+
def _populate_de_facto_holidays(self):
|
|
152
|
+
# Midsummer Eve.
|
|
153
|
+
self._add_holiday_1st_fri_from_jun_19(tr("Midsommarafton"))
|
|
154
|
+
|
|
155
|
+
# Christmas Eve.
|
|
156
|
+
self._add_christmas_eve(tr("Julafton"))
|
|
157
|
+
|
|
158
|
+
# New Year's Eve.
|
|
159
|
+
self._add_new_years_eve(tr("Nyårsafton"))
|
|
160
|
+
|
|
129
161
|
def _populate_common(self):
|
|
130
162
|
"""Populate holidays that are both optional and bank holidays."""
|
|
131
163
|
|
|
@@ -138,22 +170,14 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
138
170
|
# Walpurgis Night.
|
|
139
171
|
self._add_holiday_apr_30(self.tr(self.begin_time_label) % self.tr("Valborgsmässoafton"))
|
|
140
172
|
|
|
141
|
-
# Midsummer Eve.
|
|
142
|
-
self._add_holiday_1st_fri_from_jun_19(tr("Midsommarafton"))
|
|
143
|
-
|
|
144
173
|
self._add_holiday_1st_fri_from_oct_30(
|
|
145
174
|
# All Saints' Eve.
|
|
146
175
|
self.tr(self.begin_time_label) % self.tr("Allahelgonsafton")
|
|
147
176
|
)
|
|
148
177
|
|
|
149
|
-
# Christmas Eve.
|
|
150
|
-
self._add_christmas_eve(tr("Julafton"))
|
|
151
|
-
|
|
152
|
-
# New Year's Eve.
|
|
153
|
-
self._add_new_years_eve(tr("Nyårsafton"))
|
|
154
|
-
|
|
155
178
|
def _populate_bank_holidays(self):
|
|
156
179
|
self._populate_common()
|
|
180
|
+
self._populate_de_facto_holidays()
|
|
157
181
|
|
|
158
182
|
self._add_holiday_38_days_past_easter(
|
|
159
183
|
# Day before Ascension Day.
|
holidays/countries/taiwan.py
CHANGED
|
@@ -168,7 +168,7 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
|
|
|
168
168
|
|
|
169
169
|
if self._year >= 2026:
|
|
170
170
|
# Labor Day.
|
|
171
|
-
self._add_labor_day(tr("勞動節"))
|
|
171
|
+
dts_observed.add(self._add_labor_day(tr("勞動節")))
|
|
172
172
|
|
|
173
173
|
# Dragon Boat Festival.
|
|
174
174
|
dts_observed.add(self._add_dragon_boat_festival(tr("端午節")))
|
|
@@ -178,17 +178,17 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
|
|
|
178
178
|
|
|
179
179
|
if self._year >= 2025:
|
|
180
180
|
# Confucius' Birthday.
|
|
181
|
-
self._add_holiday_sep_28(tr("孔子誕辰紀念日"))
|
|
181
|
+
dts_observed.add(self._add_holiday_sep_28(tr("孔子誕辰紀念日")))
|
|
182
182
|
|
|
183
183
|
# National Day.
|
|
184
184
|
dts_observed.add(self._add_holiday_oct_10(tr("國慶日")))
|
|
185
185
|
|
|
186
186
|
if self._year >= 2025:
|
|
187
187
|
# Taiwan Restoration and Guningtou Victory Memorial Day.
|
|
188
|
-
self._add_holiday_oct_25(tr("臺灣光復暨金門古寧頭大捷紀念日"))
|
|
188
|
+
dts_observed.add(self._add_holiday_oct_25(tr("臺灣光復暨金門古寧頭大捷紀念日")))
|
|
189
189
|
|
|
190
190
|
# Constitution Day.
|
|
191
|
-
self._add_holiday_dec_25(tr("行憲紀念日"))
|
|
191
|
+
dts_observed.add(self._add_holiday_dec_25(tr("行憲紀念日")))
|
|
192
192
|
|
|
193
193
|
if self.observed:
|
|
194
194
|
self._populate_observed(dts_observed)
|
|
@@ -338,7 +338,8 @@ class TaiwanStaticHolidays:
|
|
|
338
338
|
* [2022](https://web.archive.org/web/20220809133226/https://www.dgpa.gov.tw/en/information?uid=353&pid=10659)
|
|
339
339
|
* [2023](https://web.archive.org/web/20220809133225/https://www.dgpa.gov.tw/en/information?uid=353&pid=11016)
|
|
340
340
|
* [2024](https://web.archive.org/web/20250414165829/https://www.dgpa.gov.tw/en/information?uid=353&pid=11402)
|
|
341
|
-
* [2025](https://web.archive.org/web/
|
|
341
|
+
* [2025](https://web.archive.org/web/20251220073230/https://www.dgpa.gov.tw/en/information?uid=353&pid=12579)
|
|
342
|
+
* [2026](https://web.archive.org/web/20251220074207/https://www.dgpa.gov.tw/en/information?uid=353&pid=12580)
|
|
342
343
|
"""
|
|
343
344
|
|
|
344
345
|
# Date format (see strftime() Format Codes).
|
|
@@ -80,12 +80,18 @@ class TimorLeste(
|
|
|
80
80
|
# Veteran's Day.
|
|
81
81
|
self._add_holiday_mar_3(tr("Dia dos Veteranos"))
|
|
82
82
|
|
|
83
|
+
# Good Friday.
|
|
84
|
+
self._add_good_friday(tr("Sexta-Feira Santa"))
|
|
85
|
+
|
|
83
86
|
# International Worker's Day.
|
|
84
87
|
self._add_labor_day(tr("Dia Mundial do Trabalhador"))
|
|
85
88
|
|
|
86
89
|
# Restoration of Independence Day.
|
|
87
90
|
self._add_holiday_may_20(tr("Dia da Restauração da Independência"))
|
|
88
91
|
|
|
92
|
+
# Corpus Christi.
|
|
93
|
+
self._add_corpus_christi_day(tr("Festa do Corpo de Deus"))
|
|
94
|
+
|
|
89
95
|
# Popular Consultation Day.
|
|
90
96
|
self._add_holiday_aug_30(tr("Dia da Consulta Popular"))
|
|
91
97
|
|
|
@@ -133,22 +139,21 @@ class TimorLeste(
|
|
|
133
139
|
else:
|
|
134
140
|
self._add_holiday_dec_7(name)
|
|
135
141
|
|
|
136
|
-
# Variable Date Public Holidays.
|
|
137
|
-
|
|
138
|
-
# Holy Friday.
|
|
139
|
-
self._add_good_friday(tr("Sexta-Feira Santa"))
|
|
140
|
-
|
|
141
142
|
# Eid al-Fitr.
|
|
142
143
|
self._add_eid_al_fitr_day(tr("Idul Fitri"))
|
|
143
144
|
|
|
144
|
-
# Corpus Christi.
|
|
145
|
-
self._add_corpus_christi_day(tr("Festa do Corpo de Deus"))
|
|
146
|
-
|
|
147
145
|
# Eid al-Adha.
|
|
148
146
|
self._add_eid_al_adha_day(tr("Idul Adha"))
|
|
149
147
|
|
|
150
148
|
def _populate_workday_holidays(self):
|
|
151
|
-
#
|
|
149
|
+
# Ash Wednesday.
|
|
150
|
+
self._add_ash_wednesday(tr("Quarta-Feira de Cinzas"))
|
|
151
|
+
|
|
152
|
+
# Maundy Thursday.
|
|
153
|
+
self._add_holy_thursday(tr("Quinta-Feira Santa"))
|
|
154
|
+
|
|
155
|
+
# The Day of Ascension of Jesus Christ into Heaven.
|
|
156
|
+
self._add_ascension_thursday(tr("Dia da Ascensão de Jesus Cristo ao Céu"))
|
|
152
157
|
|
|
153
158
|
# International Children's Day.
|
|
154
159
|
self._add_childrens_day(tr("Dia Mundial da Criança"))
|
|
@@ -172,17 +177,6 @@ class TimorLeste(
|
|
|
172
177
|
# International Human Rights Day.
|
|
173
178
|
self._add_holiday_dec_10(tr("Dia Mundial dos Direitos Humanos"))
|
|
174
179
|
|
|
175
|
-
# Variable Date Government Holidays.
|
|
176
|
-
|
|
177
|
-
# Ash Wednesday.
|
|
178
|
-
self._add_ash_wednesday(tr("Quarta-Feira de Cinzas"))
|
|
179
|
-
|
|
180
|
-
# Holy Thursday.
|
|
181
|
-
self._add_holy_thursday(tr("Quinta-Feira Santa"))
|
|
182
|
-
|
|
183
|
-
# The Day of Ascension of Jesus Christ into Heaven.
|
|
184
|
-
self._add_ascension_thursday(tr("Dia da Ascensão de Jesus Cristo ao Céu"))
|
|
185
|
-
|
|
186
180
|
|
|
187
181
|
class TL(TimorLeste):
|
|
188
182
|
pass
|
|
@@ -39,6 +39,7 @@ class TurksAndCaicosIslands(ObservedHolidayBase, ChristianHolidays, Internationa
|
|
|
39
39
|
* [2025](https://web.archive.org/web/20250608202433/https://www.facebook.com/photo/?fbid=1019082573584944&set=a.353200576839817)
|
|
40
40
|
* [Destination TCI](https://web.archive.org/web/20250429024708/https://destinationtci.tc/turks-and-caicos-islands-public-holidays/)
|
|
41
41
|
* [Time and Date](https://web.archive.org/web/20250429024853/https://www.timeanddate.com/holidays/turks-and-caicos-islands/)
|
|
42
|
+
* [Constitution Day](https://web.archive.org/web/20251230163946/https://www.visittci.com/news/turks-and-caicos-public-holiday-changes-2026)
|
|
42
43
|
"""
|
|
43
44
|
|
|
44
45
|
country = "TC"
|
|
@@ -99,6 +100,18 @@ class TurksAndCaicosIslands(ObservedHolidayBase, ChristianHolidays, Internationa
|
|
|
99
100
|
# Emancipation Day.
|
|
100
101
|
self._add_observed(self._add_holiday_aug_1(tr("Emancipation Day")))
|
|
101
102
|
|
|
103
|
+
if self._year >= 2014:
|
|
104
|
+
# National Day of Thanksgiving.
|
|
105
|
+
name = tr("National Day of Thanksgiving")
|
|
106
|
+
if self._year >= 2026:
|
|
107
|
+
self._add_holiday_1_day_prior_last_mon_of_aug(name)
|
|
108
|
+
else:
|
|
109
|
+
self._add_holiday_4th_fri_of_nov(name)
|
|
110
|
+
|
|
111
|
+
if self._year >= 2026:
|
|
112
|
+
# Constitution Day.
|
|
113
|
+
self._add_holiday_last_mon_of_aug(tr("Constitution Day"))
|
|
114
|
+
|
|
102
115
|
# National Youth Day.
|
|
103
116
|
self._add_holiday_last_fri_of_sep(tr("National Youth Day"))
|
|
104
117
|
|
|
@@ -110,9 +123,6 @@ class TurksAndCaicosIslands(ObservedHolidayBase, ChristianHolidays, Internationa
|
|
|
110
123
|
else tr("Columbus Day")
|
|
111
124
|
)
|
|
112
125
|
|
|
113
|
-
# National Day of Thanksgiving.
|
|
114
|
-
self._add_holiday_4th_fri_of_nov(tr("National Day of Thanksgiving"))
|
|
115
|
-
|
|
116
126
|
self._add_observed(
|
|
117
127
|
# Christmas Day.
|
|
118
128
|
self._add_christmas_day(tr("Christmas Day")),
|