holidays 0.61__py3-none-any.whl → 0.62__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 +3 -0
- holidays/countries/__init__.py +1 -0
- holidays/countries/albania.py +2 -4
- holidays/countries/angola.py +2 -4
- holidays/countries/argentina.py +23 -1
- holidays/countries/armenia.py +1 -3
- holidays/countries/aruba.py +2 -4
- holidays/countries/australia.py +1 -0
- holidays/countries/azerbaijan.py +31 -8
- holidays/countries/bahamas.py +2 -4
- holidays/countries/barbados.py +2 -4
- holidays/countries/belarus.py +2 -4
- holidays/countries/belize.py +2 -4
- holidays/countries/bolivia.py +1 -3
- holidays/countries/botswana.py +1 -3
- holidays/countries/brazil.py +2 -7
- holidays/countries/brunei.py +2 -4
- holidays/countries/bulgaria.py +1 -6
- holidays/countries/burkina_faso.py +3 -5
- holidays/countries/burundi.py +1 -3
- holidays/countries/cambodia.py +2 -4
- holidays/countries/cameroon.py +2 -4
- holidays/countries/canada.py +7 -11
- holidays/countries/chad.py +2 -4
- holidays/countries/chile.py +1 -3
- holidays/countries/china.py +2 -7
- holidays/countries/congo.py +2 -4
- holidays/countries/croatia.py +1 -3
- holidays/countries/cuba.py +2 -4
- holidays/countries/curacao.py +2 -7
- holidays/countries/cyprus.py +1 -9
- holidays/countries/djibouti.py +2 -4
- holidays/countries/dominica.py +2 -4
- holidays/countries/dominican_republic.py +2 -4
- holidays/countries/eswatini.py +1 -4
- holidays/countries/ethiopia.py +1 -3
- holidays/countries/finland.py +5 -2
- holidays/countries/france.py +1 -0
- holidays/countries/gabon.py +2 -4
- holidays/countries/georgia.py +1 -3
- holidays/countries/germany.py +4 -56
- holidays/countries/ghana.py +1 -4
- holidays/countries/guernsey.py +328 -0
- holidays/countries/haiti.py +2 -8
- holidays/countries/hongkong.py +2 -3
- holidays/countries/indonesia.py +1 -3
- holidays/countries/iran.py +1 -3
- holidays/countries/ireland.py +1 -3
- holidays/countries/israel.py +1 -18
- holidays/countries/japan.py +2 -6
- holidays/countries/jersey.py +2 -4
- holidays/countries/kazakhstan.py +2 -4
- holidays/countries/kenya.py +1 -3
- holidays/countries/laos.py +2 -13
- holidays/countries/latvia.py +1 -3
- holidays/countries/lesotho.py +1 -3
- holidays/countries/lithuania.py +1 -3
- holidays/countries/madagascar.py +1 -4
- holidays/countries/malawi.py +1 -4
- holidays/countries/malaysia.py +1 -6
- holidays/countries/malta.py +2 -4
- holidays/countries/moldova.py +1 -3
- holidays/countries/mozambique.py +1 -3
- holidays/countries/namibia.py +1 -3
- holidays/countries/netherlands.py +1 -0
- holidays/countries/new_zealand.py +1 -3
- holidays/countries/nigeria.py +1 -3
- holidays/countries/pakistan.py +1 -3
- holidays/countries/palau.py +5 -7
- holidays/countries/papua_new_guinea.py +2 -4
- holidays/countries/paraguay.py +32 -31
- holidays/countries/philippines.py +1 -3
- holidays/countries/poland.py +1 -3
- holidays/countries/portugal.py +1 -0
- holidays/countries/russia.py +1 -3
- holidays/countries/saint_kitts_and_nevis.py +2 -4
- holidays/countries/seychelles.py +2 -4
- holidays/countries/slovakia.py +2 -4
- holidays/countries/slovenia.py +1 -3
- holidays/countries/south_africa.py +2 -4
- holidays/countries/south_korea.py +1 -6
- holidays/countries/switzerland.py +1 -0
- holidays/countries/taiwan.py +1 -3
- holidays/countries/tanzania.py +2 -8
- holidays/countries/thailand.py +6 -8
- holidays/countries/timor_leste.py +4 -8
- holidays/countries/tonga.py +2 -4
- holidays/countries/turkey.py +2 -7
- holidays/countries/ukraine.py +2 -4
- holidays/countries/united_kingdom.py +2 -8
- holidays/countries/united_states.py +1 -0
- holidays/countries/uruguay.py +2 -7
- holidays/countries/uzbekistan.py +1 -2
- holidays/countries/vanuatu.py +2 -4
- holidays/countries/vatican_city.py +1 -3
- holidays/countries/venezuela.py +1 -0
- holidays/countries/zambia.py +1 -4
- holidays/countries/zimbabwe.py +1 -3
- holidays/financial/brasil_bolsa_balcao.py +4 -6
- holidays/financial/european_central_bank.py +2 -5
- holidays/financial/ice_futures_europe.py +2 -5
- holidays/financial/ny_stock_exchange.py +20 -21
- holidays/holiday_base.py +8 -1
- holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PY.po +18 -14
- holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/es/LC_MESSAGES/PY.po +17 -13
- holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/PY.po +18 -14
- holidays/registry.py +1 -0
- holidays/version.py +1 -1
- {holidays-0.61.dist-info → holidays-0.62.dist-info}/METADATA +8 -3
- {holidays-0.61.dist-info → holidays-0.62.dist-info}/RECORD +117 -116
- {holidays-0.61.dist-info → holidays-0.62.dist-info}/WHEEL +1 -1
- {holidays-0.61.dist-info → holidays-0.62.dist-info}/AUTHORS +0 -0
- {holidays-0.61.dist-info → holidays-0.62.dist-info}/LICENSE +0 -0
- {holidays-0.61.dist-info → holidays-0.62.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,328 @@
|
|
|
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 AUTHORS 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 datetime import date
|
|
14
|
+
from typing import Optional
|
|
15
|
+
|
|
16
|
+
from holidays.calendars.gregorian import JAN, APR, MAY, JUN, JUL, SEP, OCT, DEC
|
|
17
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
18
|
+
from holidays.observed_holiday_base import (
|
|
19
|
+
ObservedHolidayBase,
|
|
20
|
+
SAT_SUN_TO_NEXT_WORKDAY,
|
|
21
|
+
SUN_TO_NEXT_WORKDAY,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Guernsey(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
26
|
+
"""
|
|
27
|
+
References:
|
|
28
|
+
- https://en.wikipedia.org/wiki/Public_holidays_in_Guernsey
|
|
29
|
+
- https://guernseylegalresources.gg/ordinances/guernsey-bailiwick/p/public-holidays/
|
|
30
|
+
- https://www.thegazette.co.uk/all-notices
|
|
31
|
+
Checked with:
|
|
32
|
+
- https://www.gov.gg/holidaydates
|
|
33
|
+
|
|
34
|
+
His/Her Majesty's Birthday pre-1946 is cross-checked with The London Gazette's Record,
|
|
35
|
+
Specifically as "Home Station" entry under King's Birthday declaration lists.
|
|
36
|
+
|
|
37
|
+
Since 1955, if a bank holiday is on a sunday, a substitute weekday becomes a bank holiday,
|
|
38
|
+
normally the following Monday. From 2009 onwards this also applies to saturday as well.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
country = "GG"
|
|
42
|
+
observed_label = "%s (substitute day)"
|
|
43
|
+
# Ordonnance relative aux Jours Fériés, 1909.
|
|
44
|
+
start_year = 1909
|
|
45
|
+
|
|
46
|
+
def __init__(self, *args, **kwargs):
|
|
47
|
+
ChristianHolidays.__init__(self)
|
|
48
|
+
InternationalHolidays.__init__(self)
|
|
49
|
+
StaticHolidays.__init__(self, GuernseyStaticHolidays)
|
|
50
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
|
|
51
|
+
kwargs.setdefault("observed_since", 1955)
|
|
52
|
+
ObservedHolidayBase.__init__(self, *args, **kwargs)
|
|
53
|
+
|
|
54
|
+
def _add_observed(self, dt: date, **kwargs) -> tuple[bool, Optional[date]]:
|
|
55
|
+
# Prior to 2009, in-lieu are only given for Sundays.
|
|
56
|
+
# https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55179
|
|
57
|
+
kwargs.setdefault(
|
|
58
|
+
"rule", SUN_TO_NEXT_WORKDAY if dt < date(2009, DEC, 15) else self._observed_rule
|
|
59
|
+
)
|
|
60
|
+
return super()._add_observed(dt, **kwargs)
|
|
61
|
+
|
|
62
|
+
def _populate_public_holidays(self) -> None:
|
|
63
|
+
# New Year's Day
|
|
64
|
+
# Le jour de l'An
|
|
65
|
+
|
|
66
|
+
# New Year's Day.
|
|
67
|
+
self._add_observed(self._add_new_years_day("New Year's Day"))
|
|
68
|
+
|
|
69
|
+
# Good Friday
|
|
70
|
+
# Vendredi Saint
|
|
71
|
+
|
|
72
|
+
# Good Friday.
|
|
73
|
+
self._add_good_friday("Good Friday")
|
|
74
|
+
|
|
75
|
+
# Easter Monday
|
|
76
|
+
# Le Lundi de Pâques
|
|
77
|
+
|
|
78
|
+
# Easter Monday.
|
|
79
|
+
self._add_easter_monday("Easter Monday")
|
|
80
|
+
|
|
81
|
+
# May Day
|
|
82
|
+
# (No official Guernésiais translation available)
|
|
83
|
+
# Started in 1980 for Guernsey.
|
|
84
|
+
# Moved to May 8 specifically for 1995 and 2020.
|
|
85
|
+
|
|
86
|
+
if self._year >= 1980:
|
|
87
|
+
# May Day Bank Holiday
|
|
88
|
+
name = "May Day Bank Holiday"
|
|
89
|
+
if self._year in {1995, 2020}:
|
|
90
|
+
self._add_holiday_may_8(name)
|
|
91
|
+
else:
|
|
92
|
+
self._add_holiday_1st_mon_of_may(name)
|
|
93
|
+
|
|
94
|
+
# Spring bank holiday
|
|
95
|
+
# (No official Guernésiais translation available)
|
|
96
|
+
# Replaced Whit Monday in 1967, 1970, 1973, 1974, 1975, 1976.
|
|
97
|
+
# No observance in 1977-1978. Properly established from 1979 onwards.
|
|
98
|
+
# Moved for Queen Elizabeth II's Jubilee Dates in 2002, 2012, and 2022.
|
|
99
|
+
|
|
100
|
+
if self._year in {1967, 1970} or 1973 <= self._year <= 1976 or self._year >= 1979:
|
|
101
|
+
spring_bank_dates = {
|
|
102
|
+
2002: (JUN, 4),
|
|
103
|
+
2012: (JUN, 4),
|
|
104
|
+
2022: (JUN, 2),
|
|
105
|
+
}
|
|
106
|
+
# Spring Bank Holiday
|
|
107
|
+
name = "Spring Bank Holiday"
|
|
108
|
+
if self._year in spring_bank_dates:
|
|
109
|
+
self._add_holiday(name, spring_bank_dates[self._year])
|
|
110
|
+
else:
|
|
111
|
+
self._add_holiday_last_mon_of_may(name)
|
|
112
|
+
|
|
113
|
+
# Whit Monday
|
|
114
|
+
# Le lundi de Pentecôte
|
|
115
|
+
# Replaced by Spring Bank Holiday in 1967, 1970, 1973, 1974, 1975, 1976.
|
|
116
|
+
# Fully Removed in 1977.
|
|
117
|
+
|
|
118
|
+
if self._year <= 1966 or self._year in {1968, 1969, 1971, 1972}:
|
|
119
|
+
# Whit Monday.
|
|
120
|
+
self._add_whit_monday("Whit Monday")
|
|
121
|
+
|
|
122
|
+
# His/Her Majesty's Birthday
|
|
123
|
+
# La jour fixé pour la célébration du jour de naissanee de Sa Majesté
|
|
124
|
+
# Special Non-Observance Decree was issued in 1940.
|
|
125
|
+
# This was fully replaced by Liberation Day in 1947.
|
|
126
|
+
|
|
127
|
+
if self._year <= 1946:
|
|
128
|
+
his_majesty_birth_dates = {
|
|
129
|
+
# Edward VII (MAY/JUN observance).
|
|
130
|
+
1909: (JUN, 25), # (NOV, 9) for overseas.
|
|
131
|
+
# George V.
|
|
132
|
+
1910: (JUN, 24), # (NOV, 9) for overseas; No decree cancelled Edward VII ones.
|
|
133
|
+
1911: (MAY, 27), # (JUN, 3) for overseas.
|
|
134
|
+
1912: (JUN, 14), # (JUN, 3) for overseas.
|
|
135
|
+
1913: (JUN, 3),
|
|
136
|
+
1914: (JUN, 24), # Specifically held on the 24th on Guernsey, is 22nd elsewhere.
|
|
137
|
+
# Not observed in 1915-1918 due to WW1.
|
|
138
|
+
1919: (JUN, 3),
|
|
139
|
+
1920: (JUN, 5), # (JUN, 3) for overseas.
|
|
140
|
+
1921: (JUN, 4), # (JUN, 3) for overseas.
|
|
141
|
+
1922: (JUN, 3),
|
|
142
|
+
1923: (JUN, 2),
|
|
143
|
+
1924: (JUN, 3),
|
|
144
|
+
1925: (JUN, 3),
|
|
145
|
+
1926: (JUN, 5),
|
|
146
|
+
1927: (JUN, 3),
|
|
147
|
+
1928: (JUN, 4),
|
|
148
|
+
1929: (JUN, 3),
|
|
149
|
+
1930: (JUN, 3),
|
|
150
|
+
1931: (JUN, 3),
|
|
151
|
+
1932: (JUN, 3),
|
|
152
|
+
1933: (JUN, 3),
|
|
153
|
+
1934: (JUN, 4),
|
|
154
|
+
1935: (JUN, 3),
|
|
155
|
+
# Edward VIII.
|
|
156
|
+
1936: (JUN, 23),
|
|
157
|
+
# George VI.
|
|
158
|
+
1937: (JUN, 9),
|
|
159
|
+
1938: (JUN, 9),
|
|
160
|
+
1939: (JUN, 8),
|
|
161
|
+
# Not observed in 1940-1941 due to WW2.
|
|
162
|
+
# Although this was only de jure cancelled in 1940 for Guernsey.
|
|
163
|
+
1942: (JUN, 11),
|
|
164
|
+
1943: (JUN, 2),
|
|
165
|
+
1944: (JUN, 8),
|
|
166
|
+
1945: (JUN, 14),
|
|
167
|
+
1946: (JUN, 13),
|
|
168
|
+
}
|
|
169
|
+
if self._year in his_majesty_birth_dates:
|
|
170
|
+
# His Majesty's Birthday.
|
|
171
|
+
self._add_holiday("His Majesty's Birthday", his_majesty_birth_dates[self._year])
|
|
172
|
+
|
|
173
|
+
# Summer Bank Holiday
|
|
174
|
+
# Le premier Lundi du mois d'Août
|
|
175
|
+
# Current Pattern started in 1965. Was initially on first Monday of August for Guernsey.
|
|
176
|
+
# Briefly as first Monday of September between 1968-1969 and no observance for 1977-1978.
|
|
177
|
+
|
|
178
|
+
# Summer Bank Holiday.
|
|
179
|
+
summer_bank_holiday = "Summer Bank Holiday"
|
|
180
|
+
if self._year <= 1976 or self._year >= 1979:
|
|
181
|
+
if 1968 <= self._year <= 1969:
|
|
182
|
+
self._add_holiday_1st_mon_of_sep(summer_bank_holiday)
|
|
183
|
+
elif self._year >= 1965:
|
|
184
|
+
self._add_holiday_last_mon_of_aug(summer_bank_holiday)
|
|
185
|
+
else:
|
|
186
|
+
self._add_holiday_1st_mon_of_aug(summer_bank_holiday)
|
|
187
|
+
|
|
188
|
+
# Christmas Day
|
|
189
|
+
# Le jour de Noël
|
|
190
|
+
|
|
191
|
+
# Christmas Day
|
|
192
|
+
christmas_day = self._add_christmas_day("Christmas Day")
|
|
193
|
+
|
|
194
|
+
# Boxing Day
|
|
195
|
+
# Le premier jour ouvrier après le jour de Noël
|
|
196
|
+
|
|
197
|
+
# Boxing Day
|
|
198
|
+
boxing_day = self._add_christmas_day_two("Boxing Day")
|
|
199
|
+
|
|
200
|
+
self._add_observed(christmas_day)
|
|
201
|
+
self._add_observed(boxing_day)
|
|
202
|
+
|
|
203
|
+
# Guernsey exclusive holidays
|
|
204
|
+
|
|
205
|
+
# Liberation Day
|
|
206
|
+
# Le jour fixé par les Etats pour la célébration de la Libération de cette Ile
|
|
207
|
+
# de l'occupation allemande par les Forces Britannique
|
|
208
|
+
# Started in 1946 for Guernsey. Fully replaced HM Birthdays in 1947. This has no in-lieus.
|
|
209
|
+
# Specifically moved to May 10 in 2010.
|
|
210
|
+
# Unlike Jersey this wasn't moved in 2021.
|
|
211
|
+
|
|
212
|
+
if self._year >= 1946:
|
|
213
|
+
liberation_dates = {
|
|
214
|
+
2010: (MAY, 10),
|
|
215
|
+
}
|
|
216
|
+
# Liberation Day.
|
|
217
|
+
name = "Liberation Day"
|
|
218
|
+
if self._year in liberation_dates:
|
|
219
|
+
self._add_holiday(name, liberation_dates[self._year])
|
|
220
|
+
else:
|
|
221
|
+
self._add_holiday_may_9(name)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class GG(Guernsey):
|
|
225
|
+
pass
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
class GGY(Guernsey):
|
|
229
|
+
pass
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class GuernseyStaticHolidays:
|
|
233
|
+
"""
|
|
234
|
+
References:
|
|
235
|
+
- https://www.gov.gg/holidaydates
|
|
236
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52182
|
|
237
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52183
|
|
238
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52184
|
|
239
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52185
|
|
240
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52188
|
|
241
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52189
|
|
242
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=52631
|
|
243
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55175
|
|
244
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55176
|
|
245
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55177
|
|
246
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55179
|
|
247
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55180
|
|
248
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55183
|
|
249
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55185
|
|
250
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=55505
|
|
251
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=57425
|
|
252
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=60605
|
|
253
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=60606
|
|
254
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=60607
|
|
255
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=60608
|
|
256
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=60613
|
|
257
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=60614
|
|
258
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=79939
|
|
259
|
+
- https://guernseylegalresources.gg/CHttpHandler.ashx?documentid=83147
|
|
260
|
+
- https://www.bbc.com/news/world-europe-guernsey-62864318
|
|
261
|
+
- https://www.bbc.co.uk/news/articles/c1441ddn87po
|
|
262
|
+
|
|
263
|
+
All "jour de relâche" entries are translated as special day off instead.
|
|
264
|
+
|
|
265
|
+
While there's no source for Queen Elizabeth II's Silver Jubilee being observed
|
|
266
|
+
by Guernsey - it's safe to assume such holiday was declared.
|
|
267
|
+
"""
|
|
268
|
+
|
|
269
|
+
# Special Day Off.
|
|
270
|
+
special_day_off = "Special Day Off"
|
|
271
|
+
|
|
272
|
+
# The visit of Her Majesty Queen Elizabeth II.
|
|
273
|
+
elizabeth_2_royal_visit = "The visit of Her Majesty Queen Elizabeth II"
|
|
274
|
+
|
|
275
|
+
# Millenium Celebrations.
|
|
276
|
+
millenium_celebrations = "Millennium Celebrations"
|
|
277
|
+
|
|
278
|
+
# New Year's Day.
|
|
279
|
+
new_years_day_in_lieu = "New Year's Day"
|
|
280
|
+
|
|
281
|
+
# Christmas Day.
|
|
282
|
+
christmas_day_in_lieu = "Christmas Day"
|
|
283
|
+
|
|
284
|
+
# Boxing Day.
|
|
285
|
+
boxing_day_in_lieu = "Boxing Day"
|
|
286
|
+
|
|
287
|
+
special_public_holidays = {
|
|
288
|
+
1930: (OCT, 10, special_day_off),
|
|
289
|
+
1935: (MAY, 6, "Silver Jubilee of King George V"),
|
|
290
|
+
1937: (MAY, 12, "The Coronation of King George VI and Queen Elizabeth"),
|
|
291
|
+
1939: (SEP, 4, special_day_off),
|
|
292
|
+
1949: (SEP, 19, special_day_off),
|
|
293
|
+
1953: (JUN, 2, "The Coronation of Queen Elizabeth II"),
|
|
294
|
+
1957: (JUL, 26, elizabeth_2_royal_visit),
|
|
295
|
+
1977: (JUN, 7, "Silver Jubilee of Elizabeth II"),
|
|
296
|
+
1978: (JUN, 28, elizabeth_2_royal_visit),
|
|
297
|
+
1981: (JUL, 29, "Wedding of Charles and Diana"),
|
|
298
|
+
1989: (MAY, 23, elizabeth_2_royal_visit),
|
|
299
|
+
1999: (
|
|
300
|
+
(DEC, 28, millenium_celebrations),
|
|
301
|
+
(DEC, 31, millenium_celebrations),
|
|
302
|
+
),
|
|
303
|
+
2000: (JAN, 3, millenium_celebrations),
|
|
304
|
+
2001: (JUL, 12, elizabeth_2_royal_visit),
|
|
305
|
+
2002: (JUN, 3, "Golden Jubilee of Elizabeth II"),
|
|
306
|
+
2011: (APR, 29, "Wedding of William and Catherine"),
|
|
307
|
+
2012: (JUN, 5, "Diamond Jubilee of Elizabeth II"),
|
|
308
|
+
2022: (
|
|
309
|
+
(JUN, 3, "Queen's Platinum Jubilee Bank Holiday"),
|
|
310
|
+
(SEP, 19, "State Funeral of Queen Elizabeth II"),
|
|
311
|
+
),
|
|
312
|
+
2023: (MAY, 8, "Extra Public Holiday for the Coronation of King Charles III"),
|
|
313
|
+
2024: (JUL, 16, "The visit of His Majesty King Charles III and Queen Camilla"),
|
|
314
|
+
}
|
|
315
|
+
special_public_holidays_observed = {
|
|
316
|
+
1932: (DEC, 27, christmas_day_in_lieu),
|
|
317
|
+
1933: (JAN, 2, new_years_day_in_lieu),
|
|
318
|
+
1938: (DEC, 27, christmas_day_in_lieu),
|
|
319
|
+
1939: (JAN, 2, new_years_day_in_lieu),
|
|
320
|
+
1981: (DEC, 28, boxing_day_in_lieu),
|
|
321
|
+
1982: (DEC, 28, christmas_day_in_lieu),
|
|
322
|
+
1983: (JAN, 3, new_years_day_in_lieu),
|
|
323
|
+
1987: (DEC, 28, boxing_day_in_lieu),
|
|
324
|
+
1993: (DEC, 28, christmas_day_in_lieu),
|
|
325
|
+
1994: (JAN, 3, new_years_day_in_lieu),
|
|
326
|
+
2004: (DEC, 28, christmas_day_in_lieu),
|
|
327
|
+
2005: (JAN, 3, new_years_day_in_lieu),
|
|
328
|
+
}
|
holidays/countries/haiti.py
CHANGED
|
@@ -29,6 +29,8 @@ class Haiti(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
29
29
|
supported_categories = (OPTIONAL, PUBLIC)
|
|
30
30
|
default_language = "fr_HT"
|
|
31
31
|
supported_languages = ("en_US", "es", "fr_HT", "ht")
|
|
32
|
+
# 1987 Constitution.
|
|
33
|
+
start_year = 1987
|
|
32
34
|
|
|
33
35
|
def __init__(self, *args, **kwargs):
|
|
34
36
|
ChristianHolidays.__init__(self)
|
|
@@ -36,10 +38,6 @@ class Haiti(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
36
38
|
super().__init__(*args, **kwargs)
|
|
37
39
|
|
|
38
40
|
def _populate_public_holidays(self):
|
|
39
|
-
# 1987 Constitution.
|
|
40
|
-
if self._year <= 1986:
|
|
41
|
-
return None
|
|
42
|
-
|
|
43
41
|
# ARTICLE 275.1 : National Holidays.
|
|
44
42
|
# Both Battle of Vertieres Day and Armed Forces Day are on Nov 18, declared discretely.
|
|
45
43
|
|
|
@@ -100,10 +98,6 @@ class Haiti(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
100
98
|
self._add_christmas_day(tr("Noël"))
|
|
101
99
|
|
|
102
100
|
def _populate_optional_holidays(self):
|
|
103
|
-
# 1987 Constitution.
|
|
104
|
-
if self._year <= 1986:
|
|
105
|
-
return None
|
|
106
|
-
|
|
107
101
|
# Ash Wednesday.
|
|
108
102
|
self._add_ash_wednesday(tr("Mercredi des Cendres"))
|
|
109
103
|
|
holidays/countries/hongkong.py
CHANGED
|
@@ -68,6 +68,8 @@ class HongKong(
|
|
|
68
68
|
observed_label = "%s (observed)"
|
|
69
69
|
supported_categories = (OPTIONAL, PUBLIC)
|
|
70
70
|
weekend = {SUN}
|
|
71
|
+
# Current set of holidays actually valid since 1946
|
|
72
|
+
start_year = 1946
|
|
71
73
|
|
|
72
74
|
def __init__(self, *args, **kwargs):
|
|
73
75
|
ChineseCalendarHolidays.__init__(self)
|
|
@@ -238,9 +240,6 @@ class HongKong(
|
|
|
238
240
|
self._add_observed(self._add_christmas_day("Christmas Day"))
|
|
239
241
|
|
|
240
242
|
def _populate_optional_holidays(self):
|
|
241
|
-
if self._year <= 1945:
|
|
242
|
-
return None
|
|
243
|
-
|
|
244
243
|
# General Holidays.
|
|
245
244
|
|
|
246
245
|
# The first day of January.
|
holidays/countries/indonesia.py
CHANGED
|
@@ -60,6 +60,7 @@ class Indonesia(
|
|
|
60
60
|
observed_estimated_label = tr("Pegangti %s (perkiraan)")
|
|
61
61
|
supported_languages = ("en_US", "id", "th", "uk")
|
|
62
62
|
supported_categories = (GOVERNMENT, PUBLIC)
|
|
63
|
+
start_year = 1946
|
|
63
64
|
|
|
64
65
|
def __init__(self, *args, **kwargs):
|
|
65
66
|
BuddhistCalendarHolidays.__init__(self, cls=IndonesiaBuddhistHolidays, show_estimated=True)
|
|
@@ -71,9 +72,6 @@ class Indonesia(
|
|
|
71
72
|
super().__init__(*args, **kwargs)
|
|
72
73
|
|
|
73
74
|
def _populate_public_holidays(self):
|
|
74
|
-
if self._year <= 1945:
|
|
75
|
-
return None
|
|
76
|
-
|
|
77
75
|
# New Year's Day.
|
|
78
76
|
self._add_new_years_day(tr("Tahun Baru Masehi"))
|
|
79
77
|
|
holidays/countries/iran.py
CHANGED
|
@@ -28,6 +28,7 @@ class Iran(HolidayBase, IslamicHolidays, PersianCalendarHolidays):
|
|
|
28
28
|
# %s (estimated).
|
|
29
29
|
estimated_label = tr("(تخمین زده) %s")
|
|
30
30
|
supported_languages = ("en_US", "fa")
|
|
31
|
+
start_year = 1980
|
|
31
32
|
|
|
32
33
|
def __init__(self, *args, **kwargs):
|
|
33
34
|
IslamicHolidays.__init__(self)
|
|
@@ -35,9 +36,6 @@ class Iran(HolidayBase, IslamicHolidays, PersianCalendarHolidays):
|
|
|
35
36
|
super().__init__(*args, **kwargs)
|
|
36
37
|
|
|
37
38
|
def _populate_public_holidays(self):
|
|
38
|
-
if self._year <= 1979:
|
|
39
|
-
return None
|
|
40
|
-
|
|
41
39
|
# Persian New Year.
|
|
42
40
|
name = tr("نوروز")
|
|
43
41
|
self._add_nowruz_day(name)
|
holidays/countries/ireland.py
CHANGED
|
@@ -23,6 +23,7 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
country = "IE"
|
|
26
|
+
start_year = 1872
|
|
26
27
|
|
|
27
28
|
def __init__(self, *args, **kwargs):
|
|
28
29
|
ChristianHolidays.__init__(self)
|
|
@@ -31,9 +32,6 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
31
32
|
super().__init__(*args, **kwargs)
|
|
32
33
|
|
|
33
34
|
def _populate_public_holidays(self):
|
|
34
|
-
if self._year <= 1871:
|
|
35
|
-
return None
|
|
36
|
-
|
|
37
35
|
# New Year's Day.
|
|
38
36
|
if self._year >= 1975:
|
|
39
37
|
self._add_new_years_day("New Year's Day")
|
holidays/countries/israel.py
CHANGED
|
@@ -54,6 +54,7 @@ class Israel(ObservedHolidayBase):
|
|
|
54
54
|
supported_categories = (OPTIONAL, PUBLIC, SCHOOL)
|
|
55
55
|
supported_languages = ("en_US", "he", "uk")
|
|
56
56
|
weekend = {FRI, SAT}
|
|
57
|
+
start_year = 1948
|
|
57
58
|
|
|
58
59
|
def __init__(self, *args, **kwargs):
|
|
59
60
|
kwargs.setdefault("observed_rule", FRI_TO_PREV_THU + SAT_TO_PREV_THU)
|
|
@@ -63,12 +64,6 @@ class Israel(ObservedHolidayBase):
|
|
|
63
64
|
return _HebrewLunisolar._get_holiday(holiday, self._year)
|
|
64
65
|
|
|
65
66
|
def _populate_public_holidays(self):
|
|
66
|
-
if self._year <= 1947:
|
|
67
|
-
return None
|
|
68
|
-
|
|
69
|
-
if self._year >= 2101:
|
|
70
|
-
raise NotImplementedError
|
|
71
|
-
|
|
72
67
|
# Rosh Hashanah (New Year).
|
|
73
68
|
name = tr("ראש השנה")
|
|
74
69
|
rosh_hashanah_dt = self._get_holiday(ROSH_HASHANAH)
|
|
@@ -105,12 +100,6 @@ class Israel(ObservedHolidayBase):
|
|
|
105
100
|
self._add_holiday(tr("שבועות"), self._get_holiday(SHAVUOT))
|
|
106
101
|
|
|
107
102
|
def _populate_optional_holidays(self):
|
|
108
|
-
if self._year <= 1947:
|
|
109
|
-
return None
|
|
110
|
-
|
|
111
|
-
if self._year >= 2101:
|
|
112
|
-
raise NotImplementedError
|
|
113
|
-
|
|
114
103
|
sukkot_dt = self._get_holiday(SUKKOT)
|
|
115
104
|
for offset in range(1, 6):
|
|
116
105
|
# Chol HaMoed Sukkot (Feast of Tabernacles holiday).
|
|
@@ -151,12 +140,6 @@ class Israel(ObservedHolidayBase):
|
|
|
151
140
|
self._add_holiday(name, tisha_bav_dt)
|
|
152
141
|
|
|
153
142
|
def _populate_school_holidays(self):
|
|
154
|
-
if self._year <= 1947:
|
|
155
|
-
return None
|
|
156
|
-
|
|
157
|
-
if self._year >= 2101:
|
|
158
|
-
raise NotImplementedError
|
|
159
|
-
|
|
160
143
|
sukkot_dt = self._get_holiday(SUKKOT)
|
|
161
144
|
for offset in range(1, 6):
|
|
162
145
|
# Chol HaMoed Sukkot (Feast of Tabernacles holiday).
|
holidays/countries/japan.py
CHANGED
|
@@ -43,6 +43,8 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
|
|
|
43
43
|
default_language = "ja"
|
|
44
44
|
supported_categories = (BANK, PUBLIC)
|
|
45
45
|
supported_languages = ("en_US", "ja", "th")
|
|
46
|
+
start_year = 1949
|
|
47
|
+
end_year = 2099
|
|
46
48
|
|
|
47
49
|
def __init__(self, *args, **kwargs) -> None:
|
|
48
50
|
InternationalHolidays.__init__(self)
|
|
@@ -80,9 +82,6 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
|
|
|
80
82
|
break
|
|
81
83
|
|
|
82
84
|
def _populate_public_holidays(self):
|
|
83
|
-
if self._year < 1949 or self._year > 2099:
|
|
84
|
-
raise NotImplementedError
|
|
85
|
-
|
|
86
85
|
dts_observed = set()
|
|
87
86
|
|
|
88
87
|
# New Year's Day.
|
|
@@ -199,9 +198,6 @@ class Japan(ObservedHolidayBase, InternationalHolidays, StaticHolidays):
|
|
|
199
198
|
self._populate_observed(dts_observed)
|
|
200
199
|
|
|
201
200
|
def _populate_bank_holidays(self):
|
|
202
|
-
if self._year < 1949 or self._year > 2099:
|
|
203
|
-
raise NotImplementedError
|
|
204
|
-
|
|
205
201
|
# Bank Holiday.
|
|
206
202
|
name = tr("銀行休業日")
|
|
207
203
|
self._add_new_years_day(name)
|
holidays/countries/jersey.py
CHANGED
|
@@ -48,6 +48,8 @@ class Jersey(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
48
48
|
|
|
49
49
|
country = "JE"
|
|
50
50
|
observed_label = "%s (substitute day)"
|
|
51
|
+
# Earliest available piece of law available is from 1952.
|
|
52
|
+
start_year = 1952
|
|
51
53
|
|
|
52
54
|
def __init__(self, *args, **kwargs):
|
|
53
55
|
ChristianHolidays.__init__(self)
|
|
@@ -65,10 +67,6 @@ class Jersey(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
65
67
|
return super()._add_observed(dt, **kwargs)
|
|
66
68
|
|
|
67
69
|
def _populate_public_holidays(self) -> None:
|
|
68
|
-
# Earliest available piece of law available is from 1952.
|
|
69
|
-
if self._year <= 1951:
|
|
70
|
-
return None
|
|
71
|
-
|
|
72
70
|
# New Year's Day.
|
|
73
71
|
# Available online source shown that this was celebrated since at least 1952.
|
|
74
72
|
# Was briefly removed in 1983 only to be added back again before that came to effect.
|
holidays/countries/kazakhstan.py
CHANGED
|
@@ -85,6 +85,8 @@ class Kazakhstan(
|
|
|
85
85
|
# %s (observed, estimated).
|
|
86
86
|
observed_estimated_label = tr("%s (қайта белгіленген демалыс, бағаланған)")
|
|
87
87
|
supported_languages = ("en_US", "kk", "uk")
|
|
88
|
+
# Kazakhstan declared its sovereignty on 25 October 1990.
|
|
89
|
+
start_year = 1991
|
|
88
90
|
|
|
89
91
|
def __init__(self, *args, **kwargs):
|
|
90
92
|
ChristianHolidays.__init__(self, JULIAN_CALENDAR)
|
|
@@ -96,10 +98,6 @@ class Kazakhstan(
|
|
|
96
98
|
super().__init__(*args, **kwargs)
|
|
97
99
|
|
|
98
100
|
def _populate_public_holidays(self):
|
|
99
|
-
# Kazakhstan declared its sovereignty on 25 October 1990
|
|
100
|
-
if self._year <= 1990:
|
|
101
|
-
return None
|
|
102
|
-
|
|
103
101
|
dts_observed = set()
|
|
104
102
|
|
|
105
103
|
# New Year's Day.
|
holidays/countries/kenya.py
CHANGED
|
@@ -24,6 +24,7 @@ class Kenya(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
24
24
|
|
|
25
25
|
country = "KE"
|
|
26
26
|
observed_label = "%s (observed)"
|
|
27
|
+
start_year = 1963
|
|
27
28
|
|
|
28
29
|
def __init__(self, *args, **kwargs):
|
|
29
30
|
ChristianHolidays.__init__(self)
|
|
@@ -33,9 +34,6 @@ class Kenya(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
33
34
|
super().__init__(*args, **kwargs)
|
|
34
35
|
|
|
35
36
|
def _populate_public_holidays(self):
|
|
36
|
-
if self._year <= 1962:
|
|
37
|
-
return None
|
|
38
|
-
|
|
39
37
|
# New Year's Day
|
|
40
38
|
self._add_observed(self._add_new_years_day("New Year's Day"))
|
|
41
39
|
|
holidays/countries/laos.py
CHANGED
|
@@ -66,6 +66,8 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
|
|
|
66
66
|
# %s (in lieu).
|
|
67
67
|
observed_label = tr("ພັກຊົດເຊີຍ%s")
|
|
68
68
|
supported_languages = ("en_US", "lo", "th")
|
|
69
|
+
# Available post-Lao PDR proclamation on Dec 2, 1975.
|
|
70
|
+
start_year = 1976
|
|
69
71
|
|
|
70
72
|
def __init__(self, *args, **kwargs):
|
|
71
73
|
InternationalHolidays.__init__(self)
|
|
@@ -77,9 +79,6 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
|
|
|
77
79
|
|
|
78
80
|
def _populate_bank_holidays(self):
|
|
79
81
|
# Based on both LSX and BCEL calendar.
|
|
80
|
-
# Available post-Lao PDR proclamation on Dec 2, 1975.
|
|
81
|
-
if self._year <= 1975:
|
|
82
|
-
return None
|
|
83
82
|
|
|
84
83
|
# ວັນສ້າງຕັ້ງທະນາຄານແຫ່ງ ສປປ ລາວ
|
|
85
84
|
# Status: In-Use.
|
|
@@ -109,10 +108,6 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
|
|
|
109
108
|
self._add_holiday(name, self._get_next_workday(second_to_last_workday, -1))
|
|
110
109
|
|
|
111
110
|
def _populate_public_holidays(self):
|
|
112
|
-
# Available post-Lao PDR proclamation on Dec 2, 1975.
|
|
113
|
-
if self._year <= 1975:
|
|
114
|
-
return None
|
|
115
|
-
|
|
116
111
|
# ວັນປີໃໝ່ສາກົນ
|
|
117
112
|
# Status: In-Use.
|
|
118
113
|
|
|
@@ -178,8 +173,6 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
|
|
|
178
173
|
# As such, no in lieu observance are in place for these holidays.
|
|
179
174
|
|
|
180
175
|
# Laotian Lunar Calendar Holidays only work from 1941 to 2157.
|
|
181
|
-
if self._year <= 1975:
|
|
182
|
-
return None
|
|
183
176
|
|
|
184
177
|
# ວັນບຸນມາຂະບູຊາ
|
|
185
178
|
# Status: In-Use.
|
|
@@ -253,10 +246,6 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
|
|
|
253
246
|
def _populate_workday_holidays(self):
|
|
254
247
|
# No Public Holidays are issued, though still observed by the government.
|
|
255
248
|
|
|
256
|
-
# Available post-Lao PDR proclamation on Dec 2, 1975.
|
|
257
|
-
if self._year <= 1975:
|
|
258
|
-
return None
|
|
259
|
-
|
|
260
249
|
# ວັນສ້າງຕັ້ງກອງທັບປະຊາຊົນລາວ
|
|
261
250
|
# Status: In-Use.
|
|
262
251
|
# Celebrated the creation of the independent Lao army on Jan 20, 1949.
|
holidays/countries/latvia.py
CHANGED
|
@@ -29,6 +29,7 @@ class Latvia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
29
29
|
# %s (observed).
|
|
30
30
|
observed_label = tr("%s (brīvdiena)")
|
|
31
31
|
supported_languages = ("en_US", "lv", "uk")
|
|
32
|
+
start_year = 1990
|
|
32
33
|
|
|
33
34
|
def __init__(self, *args, **kwargs):
|
|
34
35
|
ChristianHolidays.__init__(self)
|
|
@@ -38,9 +39,6 @@ class Latvia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
38
39
|
super().__init__(*args, **kwargs)
|
|
39
40
|
|
|
40
41
|
def _populate_public_holidays(self):
|
|
41
|
-
if self._year <= 1989:
|
|
42
|
-
return None
|
|
43
|
-
|
|
44
42
|
# New Year's Day.
|
|
45
43
|
self._add_new_years_day(tr("Jaunais Gads"))
|
|
46
44
|
|
holidays/countries/lesotho.py
CHANGED
|
@@ -24,6 +24,7 @@ class Lesotho(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
country = "LS"
|
|
27
|
+
start_year = 1996
|
|
27
28
|
|
|
28
29
|
def __init__(self, *args, **kwargs):
|
|
29
30
|
ChristianHolidays.__init__(self)
|
|
@@ -32,9 +33,6 @@ class Lesotho(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
32
33
|
super().__init__(*args, **kwargs)
|
|
33
34
|
|
|
34
35
|
def _populate_public_holidays(self):
|
|
35
|
-
if self._year <= 1995:
|
|
36
|
-
return None
|
|
37
|
-
|
|
38
36
|
# New Year's Day.
|
|
39
37
|
self._add_new_years_day("New Year's Day")
|
|
40
38
|
|
holidays/countries/lithuania.py
CHANGED
|
@@ -28,6 +28,7 @@ class Lithuania(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
28
28
|
country = "LT"
|
|
29
29
|
default_language = "lt"
|
|
30
30
|
supported_languages = ("en_US", "lt", "uk")
|
|
31
|
+
start_year = 1990
|
|
31
32
|
|
|
32
33
|
def __init__(self, *args, **kwargs) -> None:
|
|
33
34
|
ChristianHolidays.__init__(self)
|
|
@@ -35,9 +36,6 @@ class Lithuania(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
35
36
|
super().__init__(*args, **kwargs)
|
|
36
37
|
|
|
37
38
|
def _populate_public_holidays(self) -> None:
|
|
38
|
-
if self._year <= 1989:
|
|
39
|
-
return None
|
|
40
|
-
|
|
41
39
|
# New Year's Day.
|
|
42
40
|
self._add_new_years_day(tr("Naujųjų metų diena"))
|
|
43
41
|
|