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
@@ -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)
@@ -78,10 +73,9 @@ class Israel(ObservedHolidayBase):
78
73
  # Yom Kippur (Day of Atonement).
79
74
  self._add_holiday(tr("יום כיפור"), self._get_holiday(YOM_KIPPUR))
80
75
 
81
- # Sukkot (Feast of Tabernacles).
82
- name = tr("סוכות")
83
76
  sukkot_dt = self._get_holiday(SUKKOT)
84
- self._add_holiday(name, sukkot_dt)
77
+ # Sukkot (Feast of Tabernacles).
78
+ self._add_holiday(tr("סוכות"), sukkot_dt)
85
79
  # Simchat Torah / Shemini Atzeret.
86
80
  self._add_holiday(tr("שמחת תורה/שמיני עצרת"), _timedelta(sukkot_dt, +7))
87
81
 
@@ -105,12 +99,6 @@ class Israel(ObservedHolidayBase):
105
99
  self._add_holiday(tr("שבועות"), self._get_holiday(SHAVUOT))
106
100
 
107
101
  def _populate_optional_holidays(self):
108
- if self._year <= 1947:
109
- return None
110
-
111
- if self._year >= 2101:
112
- raise NotImplementedError
113
-
114
102
  sukkot_dt = self._get_holiday(SUKKOT)
115
103
  for offset in range(1, 6):
116
104
  # Chol HaMoed Sukkot (Feast of Tabernacles holiday).
@@ -151,12 +139,6 @@ class Israel(ObservedHolidayBase):
151
139
  self._add_holiday(name, tisha_bav_dt)
152
140
 
153
141
  def _populate_school_holidays(self):
154
- if self._year <= 1947:
155
- return None
156
-
157
- if self._year >= 2101:
158
- raise NotImplementedError
159
-
160
142
  sukkot_dt = self._get_holiday(SUKKOT)
161
143
  for offset in range(1, 6):
162
144
  # Chol HaMoed Sukkot (Feast of Tabernacles holiday).
@@ -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)
@@ -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.
@@ -74,6 +74,10 @@ class Kazakhstan(
74
74
  - `2022 <https://adilet.zan.kz/kaz/docs/P2200000796>`_
75
75
  - `2023 <https://adilet.zan.kz/kaz/docs/P2300000326>`_
76
76
  - `2024 <https://adilet.zan.kz/kaz/docs/G24G0000109>`_
77
+ - `2025 <https://adilet.zan.kz/kaz/docs/G24G0000436>`_
78
+
79
+ Islamic holidays:
80
+ - 2025: `<https://en.inform.kz/news/first-day-of-ramadan-to-fall-on-march-1-2025-ca393f/>`_
77
81
  """
78
82
 
79
83
  country = "KZ"
@@ -85,6 +89,8 @@ class Kazakhstan(
85
89
  # %s (observed, estimated).
86
90
  observed_estimated_label = tr("%s (қайта белгіленген демалыс, бағаланған)")
87
91
  supported_languages = ("en_US", "kk", "uk")
92
+ # Kazakhstan declared its sovereignty on 25 October 1990.
93
+ start_year = 1991
88
94
 
89
95
  def __init__(self, *args, **kwargs):
90
96
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
@@ -96,10 +102,6 @@ class Kazakhstan(
96
102
  super().__init__(*args, **kwargs)
97
103
 
98
104
  def _populate_public_holidays(self):
99
- # Kazakhstan declared its sovereignty on 25 October 1990
100
- if self._year <= 1990:
101
- return None
102
-
103
105
  dts_observed = set()
104
106
 
105
107
  # New Year's Day.
@@ -197,6 +199,7 @@ class KazakhstanIslamicHolidays(_CustomIslamicHolidays):
197
199
  2022: (JUL, 9),
198
200
  2023: (JUN, 28),
199
201
  2024: (JUN, 16),
202
+ 2025: (JUN, 6),
200
203
  }
201
204
 
202
205
 
@@ -286,6 +289,7 @@ class KazakhstanStaticHolidays:
286
289
  ),
287
290
  2023: (JUL, 7, JUL, 1),
288
291
  2024: (MAY, 8, MAY, 4),
292
+ 2025: (JAN, 3, JAN, 5),
289
293
  }
290
294
 
291
295
  special_public_holidays_observed = {
@@ -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
 
@@ -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.
@@ -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
 
@@ -57,10 +55,8 @@ class Latvia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
57
55
  self._add_labor_day(tr("Darba svētki"))
58
56
 
59
57
  if self._year >= 2002:
60
- dt = self._add_holiday_may_4(
61
- # Restoration of Independence Day.
62
- tr("Latvijas Republikas Neatkarības atjaunošanas diena")
63
- )
58
+ # Restoration of Independence Day.
59
+ dt = self._add_holiday_may_4(tr("Latvijas Republikas Neatkarības atjaunošanas diena"))
64
60
  if self._year >= 2008:
65
61
  self._add_observed(dt)
66
62
 
@@ -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
 
@@ -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
 
@@ -72,7 +70,7 @@ class Lithuania(HolidayBase, ChristianHolidays, InternationalHolidays):
72
70
  tr(
73
71
  "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) "
74
72
  "ir Tautiškos giesmės diena"
75
- ),
73
+ )
76
74
  )
77
75
 
78
76
  # Assumption Day.
@@ -27,6 +27,7 @@ class Madagascar(HolidayBase, ChristianHolidays, InternationalHolidays):
27
27
  country = "MG"
28
28
  default_language = "mg"
29
29
  supported_languages = ("en_US", "mg", "uk")
30
+ start_year = 1947
30
31
 
31
32
  def __init__(self, *args, **kwargs):
32
33
  ChristianHolidays.__init__(self)
@@ -34,10 +35,6 @@ class Madagascar(HolidayBase, ChristianHolidays, InternationalHolidays):
34
35
  super().__init__(*args, **kwargs)
35
36
 
36
37
  def _populate_public_holidays(self):
37
- # Observed since 1947
38
- if self._year <= 1946:
39
- return None
40
-
41
38
  # New Year's Day.
42
39
  self._add_new_years_day(tr("Taom-baovao"))
43
40
 
@@ -26,6 +26,7 @@ class Malawi(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
26
26
 
27
27
  country = "MW"
28
28
  observed_label = "%s (observed)"
29
+ start_year = 2000
29
30
 
30
31
  def __init__(self, *args, **kwargs):
31
32
  ChristianHolidays.__init__(self)
@@ -34,10 +35,6 @@ class Malawi(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
34
35
  super().__init__(*args, **kwargs)
35
36
 
36
37
  def _populate_public_holidays(self):
37
- # Observed since 2000
38
- if self._year <= 1999:
39
- return None
40
-
41
38
  self._add_observed(self._add_new_years_day("New Year's Day"))
42
39
 
43
40
  self._add_observed(self._add_holiday_jan_15("John Chilembwe Day"))
@@ -123,6 +123,7 @@ class Malaysia(
123
123
  "PJY": "16",
124
124
  }
125
125
  supported_languages = ("en_US", "ms_MY", "th")
126
+ start_year = 1952
126
127
 
127
128
  def __init__(self, *args, **kwargs):
128
129
  """
@@ -152,9 +153,6 @@ class Malaysia(
152
153
  self.dts_observed = set()
153
154
 
154
155
  def _populate_public_holidays(self):
155
- if self._year <= 1951:
156
- return None
157
-
158
156
  # This must be done for every `_populate_public_holidays()` call.
159
157
  # Otherwise, 2006/2007 Eid al-Adha observance would be miscalculated.
160
158
  self.dts_observed = set()
@@ -212,9 +210,6 @@ class Malaysia(
212
210
  self.dts_observed.update(self._add_eid_al_adha_day(tr("Hari Raya Qurban")))
213
211
 
214
212
  def _populate_subdiv_holidays(self):
215
- if self._year <= 1951:
216
- return None
217
-
218
213
  if self.subdiv and self.subdiv not in {"13", "15"}:
219
214
  # Deepavali.
220
215
  self.dts_observed.add(self._add_diwali(tr("Hari Deepavali")))
@@ -40,6 +40,8 @@ class Malta(HolidayBase, ChristianHolidays, InternationalHolidays):
40
40
  country = "MT"
41
41
  default_language = "mt"
42
42
  supported_languages = ("en_US", "mt")
43
+ # Earliest available source is 1980.
44
+ start_year = 1980
43
45
 
44
46
  def __init__(self, *args, **kwargs):
45
47
  ChristianHolidays.__init__(self)
@@ -47,10 +49,6 @@ class Malta(HolidayBase, ChristianHolidays, InternationalHolidays):
47
49
  super().__init__(*args, **kwargs)
48
50
 
49
51
  def _populate_public_holidays(self):
50
- # Earliest available source is 1980
51
- if self._year <= 1979:
52
- return None
53
-
54
52
  # L-Ewwel tas-Sena
55
53
  # Status: In-Use.
56
54
 
@@ -27,6 +27,7 @@ class Moldova(HolidayBase, ChristianHolidays, InternationalHolidays):
27
27
  country = "MD"
28
28
  default_language = "ro"
29
29
  supported_languages = ("en_US", "ro", "uk")
30
+ start_year = 1991
30
31
 
31
32
  def __init__(self, *args, **kwargs):
32
33
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
@@ -34,9 +35,6 @@ class Moldova(HolidayBase, ChristianHolidays, InternationalHolidays):
34
35
  super().__init__(*args, **kwargs)
35
36
 
36
37
  def _populate_public_holidays(self):
37
- if self._year <= 1990:
38
- return None
39
-
40
38
  # New Year's Day.
41
39
  self._add_new_years_day(tr("Anul Nou"))
42
40
 
@@ -22,6 +22,7 @@ class Mozambique(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
22
22
  # %s (observed).
23
23
  observed_label = tr("%s (ponte)")
24
24
  supported_languages = ("en_US", "pt_MZ", "uk")
25
+ start_year = 1975
25
26
 
26
27
  def __init__(self, *args, **kwargs):
27
28
  ChristianHolidays.__init__(self)
@@ -30,9 +31,6 @@ class Mozambique(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
30
31
  super().__init__(*args, **kwargs)
31
32
 
32
33
  def _populate_public_holidays(self):
33
- if self._year <= 1974:
34
- return None
35
-
36
34
  # International Fraternalism Day.
37
35
  self._add_observed(self._add_new_years_day(tr("Dia da Fraternidade universal")))
38
36
 
@@ -30,6 +30,7 @@ class Namibia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
30
30
  country = "NA"
31
31
  # %s (observed).
32
32
  observed_label = "%s (observed)"
33
+ start_year = 1990
33
34
 
34
35
  def __init__(self, *args, **kwargs):
35
36
  ChristianHolidays.__init__(self)
@@ -40,9 +41,6 @@ class Namibia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
40
41
  super().__init__(*args, **kwargs)
41
42
 
42
43
  def _populate_public_holidays(self):
43
- if self._year <= 1989:
44
- return None
45
-
46
44
  # New Year's Day.
47
45
  self._add_observed(self._add_new_years_day("New Year's Day"))
48
46
 
@@ -75,7 +73,7 @@ class Namibia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
75
73
  self._add_holiday_sep_10(
76
74
  "Day of the Namibian Women and International Human Rights Day"
77
75
  if self._year >= 2005
78
- else "International Human Rights Day",
76
+ else "International Human Rights Day"
79
77
  )
80
78
  )
81
79
 
@@ -32,6 +32,7 @@ class Netherlands(HolidayBase, ChristianHolidays, InternationalHolidays):
32
32
  default_language = "nl"
33
33
  supported_categories = (OPTIONAL, PUBLIC)
34
34
  supported_languages = ("en_US", "nl", "uk")
35
+ start_year = 1801
35
36
 
36
37
  def __init__(self, *args, **kwargs):
37
38
  ChristianHolidays.__init__(self)
@@ -112,6 +112,7 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
112
112
  "STC", # For 'South Canterbury' Subregional Holidays.
113
113
  "WTL", # Westland, Correct code is WTC (for West Coast).
114
114
  )
115
+ start_year = 1894
115
116
 
116
117
  def __init__(self, *args, **kwargs):
117
118
  ChristianHolidays.__init__(self)
@@ -121,9 +122,7 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
121
122
  super().__init__(*args, **kwargs)
122
123
 
123
124
  def _get_nearest_monday(self, *args) -> Optional[date]:
124
- dt = args if len(args) > 1 else args[0]
125
- dt = dt if isinstance(dt, date) else date(self._year, *dt)
126
- return self._get_observed_date(dt, rule=ALL_TO_NEAREST_MON)
125
+ return self._get_observed_date(date(self._year, *args), rule=ALL_TO_NEAREST_MON)
127
126
 
128
127
  def _populate_public_holidays(self):
129
128
  # Bank Holidays Act 1873
@@ -137,9 +136,6 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
137
136
  # Sovereign's Birthday Observance Act 1937, 1952
138
137
  # Holidays Act 1981, 2003
139
138
 
140
- if self._year <= 1893:
141
- return None
142
-
143
139
  # New Year's Day
144
140
  self._add_observed(self._add_new_years_day("New Year's Day"), rule=SAT_SUN_TO_NEXT_MON_TUE)
145
141
  self._add_observed(
@@ -258,12 +254,9 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
258
254
 
259
255
  def _populate_subdiv_ntl_public_holidays(self):
260
256
  if 1964 <= self._year <= 1973:
261
- name = "Waitangi Day"
262
- dt = (FEB, 6)
257
+ self._add_holiday("Waitangi Day", self._get_nearest_monday(FEB, 6))
263
258
  else:
264
- name = "Auckland Anniversary Day"
265
- dt = (JAN, 29)
266
- self._add_holiday(name, self._get_nearest_monday(dt))
259
+ self._add_holiday("Auckland Anniversary Day", self._get_nearest_monday(JAN, 29))
267
260
 
268
261
  def _populate_subdiv_ota_public_holidays(self):
269
262
  # there is no easily determined single day of local observance?!?!
@@ -29,6 +29,7 @@ class Nigeria(
29
29
 
30
30
  country = "NG"
31
31
  observed_label = "%s (observed)"
32
+ start_year = 1979
32
33
 
33
34
  def __init__(self, *args, **kwargs):
34
35
  ChristianHolidays.__init__(self)
@@ -40,9 +41,6 @@ class Nigeria(
40
41
  super().__init__(*args, **kwargs)
41
42
 
42
43
  def _populate_public_holidays(self):
43
- if self._year <= 1978:
44
- return None
45
-
46
44
  dts_observed = set()
47
45
 
48
46
  # New Year's Day.
@@ -18,6 +18,7 @@ from holidays.holiday_base import HolidayBase
18
18
 
19
19
  class Pakistan(HolidayBase, InternationalHolidays, IslamicHolidays):
20
20
  country = "PK"
21
+ start_year = 1948
21
22
 
22
23
  def __init__(self, *args, **kwargs):
23
24
  InternationalHolidays.__init__(self)
@@ -25,9 +26,6 @@ class Pakistan(HolidayBase, InternationalHolidays, IslamicHolidays):
25
26
  super().__init__(*args, **kwargs)
26
27
 
27
28
  def _populate_public_holidays(self):
28
- if self._year <= 1947:
29
- return None
30
-
31
29
  # Kashmir Solidarity Day.
32
30
  if self._year >= 1990:
33
31
  self._add_holiday_feb_5("Kashmir Solidarity Day")
@@ -37,6 +37,11 @@ class Palau(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
37
37
  country = "PW"
38
38
  supported_categories = (ARMED_FORCES, HALF_DAY, PUBLIC)
39
39
  observed_label = "%s (observed)"
40
+ # Republic of Palau Public Law No. 2-15.
41
+ # The legislation was first adopted by the 2nd Olbiil Era Kelulau (1984-1988),
42
+ # but since we cannot find any info on its actual adoption date, we may as
43
+ # well use the formation date of the country as the placeholder cut-off date.
44
+ start_year = 1981
40
45
 
41
46
  def __init__(self, *args, **kwargs):
42
47
  ChristianHolidays.__init__(self)
@@ -46,13 +51,6 @@ class Palau(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
46
51
  super().__init__(*args, **kwargs)
47
52
 
48
53
  def _populate_public_holidays(self):
49
- # Republic of Palau Public Law No. 2-15.
50
- # The legislation was first adopted by the 2nd Olbiil Era Kelulau (1984-1988),
51
- # but since we cannot find any info on its actual adoption date, we may as
52
- # well use the formation date of the country as the placeholder cut-off date.
53
- if self._year <= 1980:
54
- return None
55
-
56
54
  # Fixed Date Public Holidays.
57
55
 
58
56
  # New Year's Day.
@@ -42,6 +42,8 @@ class PapuaNewGuinea(
42
42
 
43
43
  country = "PG"
44
44
  observed_label = "%s (observed)"
45
+ # Public Holidays Law 1953 (No. 38 of 1953).
46
+ start_year = 1953
45
47
 
46
48
  def __init__(self, *args, **kwargs):
47
49
  ChristianHolidays.__init__(self)
@@ -51,10 +53,6 @@ class PapuaNewGuinea(
51
53
  super().__init__(*args, **kwargs)
52
54
 
53
55
  def _populate_public_holidays(self):
54
- # Public Holidays Law 1953 (No. 38 of 1953).
55
- if self._year <= 1952:
56
- return None
57
-
58
56
  # Section 1: Public Holidays.
59
57
  # - Easter Saturday is currently not gazetted as a Public Holiday in 2024.
60
58
  # - While Easter Sunday itself is not listed, this is de facto always a day-off.