holidays 0.61__py3-none-any.whl → 0.63__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.
Files changed (128) hide show
  1. holidays/calendars/thai.py +25 -9
  2. holidays/constants.py +3 -0
  3. holidays/countries/__init__.py +1 -0
  4. holidays/countries/albania.py +2 -4
  5. holidays/countries/angola.py +24 -29
  6. holidays/countries/argentina.py +25 -4
  7. holidays/countries/armenia.py +1 -3
  8. holidays/countries/aruba.py +2 -4
  9. holidays/countries/australia.py +1 -0
  10. holidays/countries/azerbaijan.py +31 -8
  11. holidays/countries/bahamas.py +2 -4
  12. holidays/countries/barbados.py +2 -4
  13. holidays/countries/belarus.py +2 -4
  14. holidays/countries/belize.py +2 -4
  15. holidays/countries/bolivia.py +2 -4
  16. holidays/countries/bosnia_and_herzegovina.py +1 -1
  17. holidays/countries/botswana.py +1 -3
  18. holidays/countries/brazil.py +2 -7
  19. holidays/countries/brunei.py +2 -4
  20. holidays/countries/bulgaria.py +1 -6
  21. holidays/countries/burkina_faso.py +3 -5
  22. holidays/countries/burundi.py +1 -3
  23. holidays/countries/cambodia.py +8 -11
  24. holidays/countries/cameroon.py +2 -4
  25. holidays/countries/canada.py +8 -13
  26. holidays/countries/chad.py +2 -4
  27. holidays/countries/chile.py +11 -14
  28. holidays/countries/china.py +2 -7
  29. holidays/countries/congo.py +2 -4
  30. holidays/countries/costa_rica.py +1 -1
  31. holidays/countries/croatia.py +2 -5
  32. holidays/countries/cuba.py +2 -4
  33. holidays/countries/curacao.py +2 -7
  34. holidays/countries/cyprus.py +1 -9
  35. holidays/countries/czechia.py +1 -1
  36. holidays/countries/djibouti.py +2 -4
  37. holidays/countries/dominica.py +3 -6
  38. holidays/countries/dominican_republic.py +2 -4
  39. holidays/countries/eswatini.py +1 -4
  40. holidays/countries/ethiopia.py +1 -3
  41. holidays/countries/finland.py +5 -2
  42. holidays/countries/france.py +19 -3
  43. holidays/countries/gabon.py +2 -4
  44. holidays/countries/georgia.py +1 -3
  45. holidays/countries/germany.py +4 -56
  46. holidays/countries/ghana.py +1 -4
  47. holidays/countries/guernsey.py +328 -0
  48. holidays/countries/haiti.py +2 -8
  49. holidays/countries/hongkong.py +2 -3
  50. holidays/countries/hungary.py +2 -2
  51. holidays/countries/indonesia.py +1 -3
  52. holidays/countries/iran.py +1 -3
  53. holidays/countries/ireland.py +1 -3
  54. holidays/countries/israel.py +3 -21
  55. holidays/countries/japan.py +2 -6
  56. holidays/countries/jersey.py +2 -4
  57. holidays/countries/kazakhstan.py +8 -4
  58. holidays/countries/kenya.py +1 -3
  59. holidays/countries/laos.py +2 -13
  60. holidays/countries/latvia.py +3 -7
  61. holidays/countries/lesotho.py +1 -3
  62. holidays/countries/lithuania.py +2 -4
  63. holidays/countries/madagascar.py +1 -4
  64. holidays/countries/malawi.py +1 -4
  65. holidays/countries/malaysia.py +1 -6
  66. holidays/countries/malta.py +2 -4
  67. holidays/countries/moldova.py +1 -3
  68. holidays/countries/mozambique.py +1 -3
  69. holidays/countries/namibia.py +2 -4
  70. holidays/countries/netherlands.py +1 -0
  71. holidays/countries/new_zealand.py +4 -11
  72. holidays/countries/nigeria.py +1 -3
  73. holidays/countries/pakistan.py +1 -3
  74. holidays/countries/palau.py +5 -7
  75. holidays/countries/papua_new_guinea.py +2 -4
  76. holidays/countries/paraguay.py +32 -31
  77. holidays/countries/philippines.py +3 -5
  78. holidays/countries/poland.py +1 -3
  79. holidays/countries/portugal.py +1 -0
  80. holidays/countries/russia.py +1 -3
  81. holidays/countries/saint_kitts_and_nevis.py +2 -4
  82. holidays/countries/seychelles.py +2 -4
  83. holidays/countries/slovakia.py +2 -4
  84. holidays/countries/slovenia.py +1 -3
  85. holidays/countries/south_africa.py +2 -4
  86. holidays/countries/south_korea.py +5 -14
  87. holidays/countries/switzerland.py +1 -0
  88. holidays/countries/taiwan.py +1 -3
  89. holidays/countries/tanzania.py +2 -8
  90. holidays/countries/thailand.py +500 -216
  91. holidays/countries/timor_leste.py +4 -8
  92. holidays/countries/tonga.py +2 -4
  93. holidays/countries/turkey.py +4 -11
  94. holidays/countries/ukraine.py +2 -4
  95. holidays/countries/united_kingdom.py +2 -8
  96. holidays/countries/united_states.py +27 -23
  97. holidays/countries/uruguay.py +10 -14
  98. holidays/countries/uzbekistan.py +1 -2
  99. holidays/countries/vanuatu.py +2 -4
  100. holidays/countries/vatican_city.py +1 -3
  101. holidays/countries/venezuela.py +1 -0
  102. holidays/countries/zambia.py +1 -4
  103. holidays/countries/zimbabwe.py +1 -3
  104. holidays/financial/__init__.py +2 -2
  105. holidays/financial/brasil_bolsa_balcao.py +4 -6
  106. holidays/financial/european_central_bank.py +12 -8
  107. holidays/financial/ice_futures_europe.py +2 -5
  108. holidays/financial/ny_stock_exchange.py +21 -22
  109. holidays/holiday_base.py +10 -12
  110. holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
  111. holidays/locale/en_US/LC_MESSAGES/PY.po +18 -14
  112. holidays/locale/en_US/LC_MESSAGES/TH.mo +0 -0
  113. holidays/locale/en_US/LC_MESSAGES/TH.po +128 -24
  114. holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
  115. holidays/locale/es/LC_MESSAGES/PY.po +17 -13
  116. holidays/locale/th/LC_MESSAGES/TH.mo +0 -0
  117. holidays/locale/th/LC_MESSAGES/TH.po +127 -23
  118. holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
  119. holidays/locale/uk/LC_MESSAGES/PY.po +18 -14
  120. holidays/registry.py +3 -2
  121. holidays/utils.py +1 -5
  122. holidays/version.py +1 -1
  123. {holidays-0.61.dist-info → holidays-0.63.dist-info}/METADATA +14 -9
  124. {holidays-0.61.dist-info → holidays-0.63.dist-info}/RECORD +128 -127
  125. {holidays-0.61.dist-info → holidays-0.63.dist-info}/WHEEL +1 -1
  126. {holidays-0.61.dist-info → holidays-0.63.dist-info}/AUTHORS +0 -0
  127. {holidays-0.61.dist-info → holidays-0.63.dist-info}/LICENSE +0 -0
  128. {holidays-0.61.dist-info → holidays-0.63.dist-info}/top_level.txt +0 -0
@@ -26,6 +26,8 @@ class Gabon(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida
26
26
  """
27
27
 
28
28
  country = "GA"
29
+ # On 17 August 1960, Gabon gained independence from France.
30
+ start_year = 1961
29
31
 
30
32
  def __init__(self, *args, **kwargs) -> None:
31
33
  ChristianHolidays.__init__(self)
@@ -34,10 +36,6 @@ class Gabon(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida
34
36
  super().__init__(*args, **kwargs)
35
37
 
36
38
  def _populate_public_holidays(self):
37
- # On 17 August 1960, Gabon gained independence from France.
38
- if self._year <= 1960:
39
- return None
40
-
41
39
  # New Year's Day.
42
40
  self._add_new_years_day("New Year's Day")
43
41
 
@@ -32,6 +32,7 @@ class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
32
32
  supported_categories = (GOVERNMENT, PUBLIC)
33
33
  default_language = "ka"
34
34
  supported_languages = ("en_US", "ka", "uk")
35
+ start_year = 1991
35
36
 
36
37
  def __init__(self, *args, **kwargs):
37
38
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
@@ -40,9 +41,6 @@ class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
40
41
  super().__init__(*args, **kwargs)
41
42
 
42
43
  def _populate_public_holidays(self):
43
- if self._year <= 1990:
44
- return None
45
-
46
44
  # New Year's Day.
47
45
  name = tr("ახალი წელი")
48
46
  self._add_new_years_day(name)
@@ -95,6 +95,7 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
95
95
  "Thüringen": "TH",
96
96
  }
97
97
  _deprecated_subdivisions = ("BYP",)
98
+ start_year = 1990
98
99
 
99
100
  def __init__(self, *args, **kwargs) -> None:
100
101
  ChristianHolidays.__init__(self)
@@ -103,9 +104,6 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
103
104
  super().__init__(*args, **kwargs)
104
105
 
105
106
  def _populate_public_holidays(self):
106
- if self._year <= 1989:
107
- return None
108
-
109
107
  if self._year >= 1991:
110
108
  # New Year's Day.
111
109
  self._add_new_years_day(tr("Neujahr"))
@@ -142,9 +140,6 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
142
140
  self._populate_subdiv_by_public_holidays()
143
141
 
144
142
  def _populate_subdiv_bb_public_holidays(self):
145
- if self._year <= 1989:
146
- return None
147
-
148
143
  if self._year >= 1991:
149
144
  # Easter Sunday.
150
145
  self._add_easter_sunday(tr("Ostersonntag"))
@@ -156,17 +151,11 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
156
151
  self._add_holiday_oct_31(tr("Reformationstag"))
157
152
 
158
153
  def _populate_subdiv_be_public_holidays(self):
159
- if self._year <= 1989:
160
- return None
161
-
162
154
  if self._year >= 2019:
163
155
  # International Women's Day.
164
156
  self._add_womens_day(tr("Internationaler Frauentag"))
165
157
 
166
158
  def _populate_subdiv_bw_public_holidays(self):
167
- if self._year <= 1989:
168
- return None
169
-
170
159
  if self._year >= 1991:
171
160
  # Epiphany.
172
161
  self._add_epiphany_day(tr("Heilige Drei Könige"))
@@ -178,9 +167,6 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
178
167
  self._add_all_saints_day(tr("Allerheiligen"))
179
168
 
180
169
  def _populate_subdiv_by_public_holidays(self):
181
- if self._year <= 1989:
182
- return None
183
-
184
170
  if self._year >= 1991:
185
171
  self._add_epiphany_day(tr("Heilige Drei Könige"))
186
172
  self._add_corpus_christi_day(tr("Fronleichnam"))
@@ -188,78 +174,49 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
188
174
  self._add_all_saints_day(tr("Allerheiligen"))
189
175
 
190
176
  def _populate_subdiv_by_catholic_holidays(self):
191
- if self._year <= 1990:
192
- return None
193
-
194
- # Assumption Day.
195
- self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
177
+ if self._year >= 1991:
178
+ # Assumption Day.
179
+ self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
196
180
 
197
181
  def _populate_subdiv_hb_public_holidays(self):
198
- if self._year <= 1989:
199
- return None
200
-
201
182
  if self._year >= 2018:
202
183
  self._add_holiday_oct_31(tr("Reformationstag"))
203
184
 
204
185
  def _populate_subdiv_he_public_holidays(self):
205
- if self._year <= 1989:
206
- return None
207
-
208
186
  if self._year >= 1991:
209
187
  self._add_corpus_christi_day(tr("Fronleichnam"))
210
188
 
211
189
  def _populate_subdiv_hh_public_holidays(self):
212
- if self._year <= 1989:
213
- return None
214
-
215
190
  if self._year >= 2018:
216
191
  self._add_holiday_oct_31(tr("Reformationstag"))
217
192
 
218
193
  def _populate_subdiv_mv_public_holidays(self):
219
- if self._year <= 1989:
220
- return None
221
-
222
194
  if self._year >= 2023:
223
195
  self._add_womens_day(tr("Internationaler Frauentag"))
224
196
 
225
197
  self._add_holiday_oct_31(tr("Reformationstag"))
226
198
 
227
199
  def _populate_subdiv_ni_public_holidays(self):
228
- if self._year <= 1989:
229
- return None
230
-
231
200
  if self._year >= 2018:
232
201
  self._add_holiday_oct_31(tr("Reformationstag"))
233
202
 
234
203
  def _populate_subdiv_nw_public_holidays(self):
235
- if self._year <= 1989:
236
- return None
237
-
238
204
  if self._year >= 1991:
239
205
  self._add_corpus_christi_day(tr("Fronleichnam"))
240
206
 
241
207
  self._add_all_saints_day(tr("Allerheiligen"))
242
208
 
243
209
  def _populate_subdiv_rp_public_holidays(self):
244
- if self._year <= 1989:
245
- return None
246
-
247
210
  if self._year >= 1991:
248
211
  self._add_corpus_christi_day(tr("Fronleichnam"))
249
212
 
250
213
  self._add_all_saints_day(tr("Allerheiligen"))
251
214
 
252
215
  def _populate_subdiv_sh_public_holidays(self):
253
- if self._year <= 1989:
254
- return None
255
-
256
216
  if self._year >= 2018:
257
217
  self._add_holiday_oct_31(tr("Reformationstag"))
258
218
 
259
219
  def _populate_subdiv_sl_public_holidays(self):
260
- if self._year <= 1989:
261
- return None
262
-
263
220
  if self._year >= 1991:
264
221
  self._add_corpus_christi_day(tr("Fronleichnam"))
265
222
  self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
@@ -267,27 +224,18 @@ class Germany(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
267
224
  self._add_all_saints_day(tr("Allerheiligen"))
268
225
 
269
226
  def _populate_subdiv_sn_public_holidays(self):
270
- if self._year <= 1989:
271
- return None
272
-
273
227
  self._add_holiday_oct_31(tr("Reformationstag"))
274
228
 
275
229
  if self._year >= 1995:
276
230
  self._add_holiday_1st_wed_before_nov_22(tr("Buß- und Bettag"))
277
231
 
278
232
  def _populate_subdiv_st_public_holidays(self):
279
- if self._year <= 1989:
280
- return None
281
-
282
233
  if self._year >= 1991:
283
234
  self._add_epiphany_day(tr("Heilige Drei Könige"))
284
235
 
285
236
  self._add_holiday_oct_31(tr("Reformationstag"))
286
237
 
287
238
  def _populate_subdiv_th_public_holidays(self):
288
- if self._year <= 1989:
289
- return None
290
-
291
239
  if self._year >= 2019:
292
240
  # World Children's Day.
293
241
  self._add_holiday_sep_20(tr("Weltkindertag"))
@@ -28,6 +28,7 @@ class Ghana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Islam
28
28
  estimated_label = "%s (estimated)"
29
29
  observed_label = "%s (observed)"
30
30
  observed_estimated_label = "%s (observed, estimated)"
31
+ start_year = 1957
31
32
 
32
33
  def __init__(self, *args, **kwargs):
33
34
  ChristianHolidays.__init__(self)
@@ -37,10 +38,6 @@ class Ghana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Islam
37
38
  super().__init__(*args, **kwargs)
38
39
 
39
40
  def _populate_public_holidays(self):
40
- # Holidays observed since 1957
41
- if self._year <= 1956:
42
- return None
43
-
44
41
  # New Year's Day
45
42
  self._add_observed(self._add_new_years_day("New Year's Day"))
46
43
 
@@ -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
+ }
@@ -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
 
@@ -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.
@@ -54,7 +54,7 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
54
54
 
55
55
  def _populate_public_holidays(self):
56
56
  # New Year's Day.
57
- self._add_new_years_day(self.tr("Újév"))
57
+ self._add_new_years_day(tr("Újév"))
58
58
 
59
59
  if 1945 <= self._year <= 1950 or self._year >= 1989:
60
60
  # National Day.
@@ -90,7 +90,7 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
90
90
  tr("A kenyér ünnepe")
91
91
  if 1950 <= self._year <= 1989
92
92
  # State Foundation Day.
93
- else tr("Az államalapítás ünnepe"),
93
+ else tr("Az államalapítás ünnepe")
94
94
  )
95
95
 
96
96
  if self._year >= 1991:
@@ -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
 
@@ -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)
@@ -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")