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
@@ -48,6 +48,8 @@ class TimorLeste(
48
48
  # %s (estimated).
49
49
  estimated_label = tr("%s (aproximada)")
50
50
  supported_languages = ("en_US", "pt_TL", "tet")
51
+ # Law No. 10/2005 Of 10 August, Public Holidays and Official Commemorative Dates.
52
+ start_year = 2006
51
53
 
52
54
  def __init__(self, *args, **kwargs):
53
55
  ChristianHolidays.__init__(self)
@@ -57,10 +59,6 @@ class TimorLeste(
57
59
  super().__init__(*args, **kwargs)
58
60
 
59
61
  def _populate_public_holidays(self):
60
- # Law No. 10/2005 Of 10 August, Public Holidays and Official Commemorative Dates.
61
- if self._year <= 2005:
62
- return None
63
-
64
62
  # Fixed Date Public Holidays.
65
63
 
66
64
  # New Year's Day.
@@ -141,10 +139,6 @@ class TimorLeste(
141
139
  self._add_eid_al_adha_day(tr("Idul Adha"))
142
140
 
143
141
  def _populate_workday_holidays(self):
144
- # Law No. 10/2005 Of 10 August, Public Holidays and Official Commemorative Dates.
145
- if self._year <= 2005:
146
- return None
147
-
148
142
  # Fixed Date Government Holidays.
149
143
 
150
144
  # World Children's Day.
@@ -486,5 +480,7 @@ class TimorLesteStaticHolidays:
486
480
  (SEP, 11, pope_francis_visit),
487
481
  # https://timor-leste.gov.tl/?p=40592&lang=en
488
482
  (OCT, 31, special_national_holidays),
483
+ # https://timor-leste.gov.tl/?p=40955&lang=en
484
+ (NOV, 29, special_national_holidays),
489
485
  ),
490
486
  }
@@ -75,6 +75,8 @@ class Tonga(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
75
75
  # %s (observed).
76
76
  observed_label = tr("%s (fakatokanga'i)")
77
77
  supported_languages = ("en_US", "to")
78
+ # Public Holidays Act, 1988 Revision.
79
+ start_year = 1989
78
80
 
79
81
  def __init__(self, *args, **kwargs):
80
82
  ChristianHolidays.__init__(self)
@@ -89,10 +91,6 @@ class Tonga(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
89
91
  return super()._add_observed(dt, **kwargs)
90
92
 
91
93
  def _populate_public_holidays(self):
92
- # Public Holidays Act, 1988 Revision.
93
- if self._year <= 1988:
94
- return None
95
-
96
94
  # New Year's Day.
97
95
  jan_1 = self._add_new_years_day(tr("'Uluaki 'Aho 'o e Ta'u Fo'ou"))
98
96
  if self._year <= 2016:
@@ -35,6 +35,8 @@ class Turkey(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays
35
35
  estimated_label = tr("%s (tahmini)")
36
36
  supported_categories = (HALF_DAY, PUBLIC)
37
37
  supported_languages = ("en_US", "tr", "uk")
38
+ # Law 2739 of 27 May 1935.
39
+ start_year = 1936
38
40
 
39
41
  def __init__(self, *args, **kwargs):
40
42
  InternationalHolidays.__init__(self)
@@ -43,34 +45,28 @@ class Turkey(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays
43
45
  super().__init__(*args, **kwargs)
44
46
 
45
47
  def _populate_public_holidays(self):
46
- # Law 2739 of 27 May 1935.
47
- if self._year <= 1935:
48
- return None
49
-
50
48
  # New Year's Day.
51
49
  self._add_new_years_day(tr("Yılbaşı"))
52
50
 
53
- name = (
51
+ self._add_holiday_apr_23(
54
52
  # National Sovereignty and Children's Day.
55
53
  tr("Ulusal Egemenlik ve Çocuk Bayramı")
56
54
  if self._year >= 1981
57
55
  # National Sovereignty Day.
58
56
  else tr("Ulusal Egemenlik Bayramı")
59
57
  )
60
- self._add_holiday_apr_23(name)
61
58
 
62
59
  if self._year >= 2009:
63
60
  # Labour and Solidarity Day.
64
61
  self._add_labor_day(tr("Emek ve Dayanışma Günü"))
65
62
 
66
- name = (
63
+ self._add_holiday_may_19(
67
64
  # Commemoration of Atatürk, Youth and Sports Day.
68
65
  tr("Atatürk'ü Anma, Gençlik ve Spor Bayramı")
69
66
  if self._year >= 1981
70
67
  # Youth and Sports Day.
71
68
  else tr("Gençlik ve Spor Bayramı")
72
69
  )
73
- self._add_holiday_may_19(name)
74
70
 
75
71
  if 1963 <= self._year <= 1980:
76
72
  # Freedom and Constitution Day.
@@ -103,9 +99,6 @@ class Turkey(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays
103
99
  self._add_eid_al_adha_day_four(name)
104
100
 
105
101
  def _populate_half_day_holidays(self):
106
- if self._year <= 1935:
107
- return None
108
-
109
102
  # %s (from 1pm).
110
103
  begin_time_label = self.tr("%s (saat 13.00'ten)")
111
104
 
@@ -35,6 +35,8 @@ class Ukraine(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
35
35
  observed_label = tr("%s (вихідний)")
36
36
  supported_categories = (PUBLIC, WORKDAY)
37
37
  supported_languages = ("ar", "en_US", "uk")
38
+ # The current set of holidays came into force in 1991.
39
+ start_year = 1991
38
40
 
39
41
  def __init__(self, *args, **kwargs):
40
42
  ChristianHolidays.__init__(self, JULIAN_REVISED_CALENDAR)
@@ -53,10 +55,6 @@ class Ukraine(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
53
55
  return date(1995, JAN, 27) <= dt <= date(1998, JAN, 9) or dt >= date(1999, APR, 23)
54
56
 
55
57
  def _populate_common(self, is_martial_law: bool = False):
56
- # The current set of holidays came into force in 1991
57
- if self._year <= 1990:
58
- return None
59
-
60
58
  # There is no public holidays in Ukraine during the period of martial law
61
59
  # https://zakon.rada.gov.ua/laws/show/2136-20#n26
62
60
  # law is in force from March 15, 2022
@@ -51,6 +51,8 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
51
51
  "Wales": "WLS",
52
52
  }
53
53
  _deprecated_subdivisions = ("UK",)
54
+ # Bank Holidays Act 1871
55
+ start_year = 1872
54
56
 
55
57
  def __init__(self, *args, **kwargs):
56
58
  ChristianHolidays.__init__(self)
@@ -62,10 +64,6 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
62
64
  super().__init__(*args, **kwargs)
63
65
 
64
66
  def _populate_public_holidays(self) -> None:
65
- # Bank Holidays Act 1871
66
- if self._year <= 1871:
67
- return None
68
-
69
67
  # Good Friday
70
68
  self._add_good_friday("Good Friday")
71
69
 
@@ -91,10 +89,6 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
91
89
  self._add_holiday_last_mon_of_may(name)
92
90
 
93
91
  def _populate_subdiv_holidays(self):
94
- # Bank Holidays Act 1871
95
- if self._year <= 1871:
96
- return None
97
-
98
92
  if self.subdiv != "SCT":
99
93
  # New Year's Day
100
94
  if self._year >= 1975:
@@ -127,6 +127,7 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
127
127
  "MH",
128
128
  "PW",
129
129
  )
130
+ start_year = 1777
130
131
 
131
132
  def __init__(self, *args, **kwargs):
132
133
  ChristianHolidays.__init__(self)
@@ -213,25 +214,29 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
213
214
  self._add_holiday_feb_22(name)
214
215
 
215
216
  # Columbus Day
216
- if self._year >= 1937 and self.subdiv in {
217
- "AS",
218
- "AZ",
219
- "CT",
220
- "GA",
221
- "ID",
222
- "IL",
223
- "IN",
224
- "MA",
225
- "MD",
226
- "MO",
227
- "MT",
228
- "NJ",
229
- "NY",
230
- "OH",
231
- "PA",
232
- "UT",
233
- "WV",
234
- }:
217
+ if self._year >= 1937 and (
218
+ self.subdiv is None
219
+ or self.subdiv
220
+ in {
221
+ "AS",
222
+ "AZ",
223
+ "CT",
224
+ "GA",
225
+ "ID",
226
+ "IL",
227
+ "IN",
228
+ "MA",
229
+ "MD",
230
+ "MO",
231
+ "MT",
232
+ "NJ",
233
+ "NY",
234
+ "OH",
235
+ "PA",
236
+ "UT",
237
+ "WV",
238
+ }
239
+ ):
235
240
  name = "Columbus Day"
236
241
  if self._year >= 1971:
237
242
  self._add_holiday_2nd_mon_of_oct(name)
@@ -292,12 +297,11 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
292
297
  def _populate_subdiv_ar_public_holidays(self):
293
298
  # Martin Luther King Jr. Day
294
299
  if self._year >= 1986:
295
- name = (
300
+ self._add_holiday_3rd_mon_of_jan(
296
301
  "Martin Luther King Jr. Day"
297
302
  if self._year >= 2018
298
303
  else "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays"
299
304
  )
300
- self._add_holiday_3rd_mon_of_jan(name)
301
305
 
302
306
  # Washington's Birthday
303
307
  name = "George Washington's Birthday and Daisy Gatson Bates Day"
@@ -478,7 +482,7 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
478
482
  self._add_holiday_3rd_mon_of_jan(
479
483
  "Martin Luther King Jr. / Idaho Human Rights Day"
480
484
  if self._year >= 2006
481
- else "Martin Luther King Jr. Day",
485
+ else "Martin Luther King Jr. Day"
482
486
  )
483
487
 
484
488
  def _populate_subdiv_il_public_holidays(self):
@@ -636,7 +640,7 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
636
640
  # Martin Luther King Jr. Day
637
641
  if self._year >= 1986:
638
642
  self._add_holiday_3rd_mon_of_jan(
639
- "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays",
643
+ "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays"
640
644
  )
641
645
 
642
646
  # Confederate Memorial Day
@@ -39,6 +39,8 @@ class Uruguay(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
39
39
  default_language = "es"
40
40
  supported_categories = (BANK, PUBLIC)
41
41
  supported_languages = ("en_US", "es", "uk")
42
+ # Law # 6997.
43
+ start_year = 1920
42
44
 
43
45
  def __init__(self, *args, **kwargs):
44
46
  ChristianHolidays.__init__(self)
@@ -52,10 +54,6 @@ class Uruguay(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
52
54
  return 1980 <= self._year <= 1983 or self._year >= 1997
53
55
 
54
56
  def _populate_public_holidays(self):
55
- # Law # 6997.
56
- if self._year <= 1919:
57
- return None
58
-
59
57
  # New Year's Day.
60
58
  self._add_new_years_day(tr("Año Nuevo"))
61
59
 
@@ -105,9 +103,6 @@ class Uruguay(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
105
103
  # These holidays are generally observed by schools, public sector offices, banks,
106
104
  # and a few private companies.
107
105
 
108
- if self._year <= 1919:
109
- return None
110
-
111
106
  # Children's Day.
112
107
  self._add_holiday_jan_6(tr("Día de los Niños"))
113
108
 
@@ -139,14 +134,15 @@ class Uruguay(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
139
134
  self._move_holiday(dt)
140
135
 
141
136
  if self._year <= 1932 or self._year >= 1937:
142
- name = (
143
- # Cultural Diversity Day.
144
- tr("Día de la Diversidad Cultural")
145
- if self._year >= 2014
146
- # Columbus Day.
147
- else tr("Día de la Raza")
137
+ self._move_holiday(
138
+ self._add_columbus_day(
139
+ # Cultural Diversity Day.
140
+ tr("Día de la Diversidad Cultural")
141
+ if self._year >= 2014
142
+ # Columbus Day.
143
+ else tr("Día de la Raza")
144
+ )
148
145
  )
149
- self._move_holiday(self._add_columbus_day(name))
150
146
 
151
147
  if self._year <= 1932 or self._year >= 1938:
152
148
  # All Souls' Day.
@@ -36,6 +36,7 @@ class Uzbekistan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, St
36
36
  # %s (observed, estimated).
37
37
  observed_estimated_label = tr("%s (ko‘chirilgan, taxminiy)")
38
38
  supported_languages = ("en_US", "uk", "uz")
39
+ start_year = 1992
39
40
 
40
41
  def __init__(self, *args, **kwargs):
41
42
  InternationalHolidays.__init__(self)
@@ -49,8 +50,6 @@ class Uzbekistan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, St
49
50
  return dt >= date(2023, APR, 30)
50
51
 
51
52
  def _populate_public_holidays(self):
52
- if self._year <= 1991:
53
- return None
54
53
  dts_observed = set()
55
54
 
56
55
  # New Year's Day.
@@ -24,6 +24,8 @@ class Vanuatu(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
24
24
 
25
25
  country = "VU"
26
26
  observed_label = "%s (observed)"
27
+ # On 30 July 1980, Vanuatu gained independence from Britain and France.
28
+ start_year = 1981
27
29
 
28
30
  def __init__(self, *args, **kwargs):
29
31
  ChristianHolidays.__init__(self)
@@ -33,10 +35,6 @@ class Vanuatu(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
33
35
  super().__init__(*args, **kwargs)
34
36
 
35
37
  def _populate_public_holidays(self):
36
- # On 30 July 1980, Vanuatu gained independence from Britain and France.
37
- if self._year <= 1980:
38
- return None
39
-
40
38
  # New Years Day.
41
39
  self._add_observed(self._add_new_years_day("New Year's Day"))
42
40
 
@@ -23,15 +23,13 @@ class VaticanCity(HolidayBase, ChristianHolidays):
23
23
  """
24
24
 
25
25
  country = "VA"
26
+ start_year = 1929
26
27
 
27
28
  def __init__(self, *args, **kwargs) -> None:
28
29
  ChristianHolidays.__init__(self)
29
30
  super().__init__(*args, **kwargs)
30
31
 
31
32
  def _populate_public_holidays(self) -> None:
32
- if self._year <= 1928:
33
- return None
34
-
35
33
  # Solemnity of Mary Day.
36
34
  # This is supposedly the same as International New Year.
37
35
  # Modern adoption across the entire Latin Church in 1931 though this
@@ -24,6 +24,7 @@ class Venezuela(HolidayBase, ChristianHolidays, InternationalHolidays):
24
24
  country = "VE"
25
25
  default_language = "es"
26
26
  supported_languages = ("en_US", "es", "uk")
27
+ start_year = 1801
27
28
 
28
29
  def __init__(self, *args, **kwargs) -> None:
29
30
  ChristianHolidays.__init__(self)
@@ -25,6 +25,7 @@ class Zambia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
25
25
 
26
26
  country = "ZM"
27
27
  observed_label = "%s (observed)"
28
+ start_year = 1965
28
29
 
29
30
  def __init__(self, *args, **kwargs):
30
31
  ChristianHolidays.__init__(self)
@@ -34,10 +35,6 @@ class Zambia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
34
35
  super().__init__(*args, **kwargs)
35
36
 
36
37
  def _populate_public_holidays(self):
37
- # Observed since 1965
38
- if self._year <= 1964:
39
- return None
40
-
41
38
  # New Year's Day.
42
39
  self._add_observed(self._add_new_years_day("New Year's Day"))
43
40
 
@@ -22,6 +22,7 @@ class Zimbabwe(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
22
22
 
23
23
  country = "ZW"
24
24
  observed_label = "%s (observed)"
25
+ start_year = 1988
25
26
 
26
27
  def __init__(self, *args, **kwargs):
27
28
  ChristianHolidays.__init__(self)
@@ -30,9 +31,6 @@ class Zimbabwe(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
30
31
  super().__init__(*args, **kwargs)
31
32
 
32
33
  def _populate_public_holidays(self):
33
- if self._year <= 1987:
34
- return None
35
-
36
34
  # New Year's Day.
37
35
  self._add_observed(self._add_new_years_day("New Year's Day"))
38
36
 
@@ -13,6 +13,6 @@
13
13
  # flake8: noqa: F401
14
14
 
15
15
  from .brasil_bolsa_balcao import BrasilBolsaBalcao, BVMF, B3
16
- from .european_central_bank import EuropeanCentralBank, ECB, TAR
16
+ from .european_central_bank import EuropeanCentralBank, XECB, ECB, TAR
17
17
  from .ice_futures_europe import ICEFuturesEurope, IFEU
18
- from .ny_stock_exchange import NewYorkStockExchange, NYSE, XNYS
18
+ from .ny_stock_exchange import NewYorkStockExchange, XNYS, NYSE
@@ -35,6 +35,10 @@ class BrasilBolsaBalcao(HolidayBase, ChristianHolidays, InternationalHolidays):
35
35
  market = "BVMF"
36
36
  default_language = "pt_BR"
37
37
  supported_languages = ("en_US", "pt_BR", "uk")
38
+ # Decreto n. 155-B, de 14.01.1890
39
+ # Curiously enough, 1890 is also the year of foundation of the
40
+ # São Paulo Stock Exchange, which would later become the B3.
41
+ start_year = 1890
38
42
 
39
43
  def __init__(self, *args, **kwargs) -> None:
40
44
  ChristianHolidays.__init__(self)
@@ -42,12 +46,6 @@ class BrasilBolsaBalcao(HolidayBase, ChristianHolidays, InternationalHolidays):
42
46
  super().__init__(*args, **kwargs)
43
47
 
44
48
  def _populate_public_holidays(self):
45
- # Decreto n. 155-B, de 14.01.1890
46
- # Curiously enough, 1890 is also the year of foundation of the
47
- # São Paulo Stock Exchange, which would later become the B3.
48
- if self._year <= 1889:
49
- return None
50
-
51
49
  # Universal Fraternization Day.
52
50
  self._add_new_years_day(tr("Confraternização Universal"))
53
51
 
@@ -19,11 +19,13 @@ class EuropeanCentralBank(HolidayBase, ChristianHolidays, InternationalHolidays)
19
19
  """
20
20
  References:
21
21
  - https://en.wikipedia.org/wiki/TARGET2
22
+ - https://www.ecb.europa.eu/ecb/contacts/working-hours/html/index.en.html
22
23
  - https://www.ecb.europa.eu/press/pr/date/1999/html/pr990715_1.en.html
23
24
  - https://www.ecb.europa.eu/press/pr/date/2000/html/pr001214_4.en.html
24
25
  """
25
26
 
26
- market = "ECB"
27
+ market = "XECB"
28
+ start_year = 2000
27
29
 
28
30
  def __init__(self, *args, **kwargs):
29
31
  ChristianHolidays.__init__(self)
@@ -31,20 +33,22 @@ class EuropeanCentralBank(HolidayBase, ChristianHolidays, InternationalHolidays)
31
33
  StaticHolidays.__init__(self, EuropeanCentralBankStaticHolidays)
32
34
  super().__init__(*args, **kwargs)
33
35
 
34
- def _populate(self, year):
35
- if year <= 1999:
36
- return None
37
- super()._populate(year)
38
-
36
+ def _populate_public_holidays(self):
39
37
  self._add_new_years_day("New Year's Day")
40
38
 
41
39
  self._add_good_friday("Good Friday")
40
+
42
41
  self._add_easter_monday("Easter Monday")
43
42
 
44
- self._add_labor_day("1 May (Labour Day)")
43
+ self._add_labor_day("Labour Day")
45
44
 
46
45
  self._add_christmas_day("Christmas Day")
47
- self._add_christmas_day_two("26 December")
46
+
47
+ self._add_christmas_day_two("Christmas Holiday")
48
+
49
+
50
+ class XECB(EuropeanCentralBank):
51
+ pass
48
52
 
49
53
 
50
54
  class ECB(EuropeanCentralBank):
@@ -24,6 +24,7 @@ class ICEFuturesEurope(ObservedHolidayBase, ChristianHolidays, InternationalHoli
24
24
  """
25
25
 
26
26
  market = "IFEU"
27
+ start_year = 2014
27
28
 
28
29
  def __init__(self, *args, **kwargs):
29
30
  ChristianHolidays.__init__(self)
@@ -31,11 +32,7 @@ class ICEFuturesEurope(ObservedHolidayBase, ChristianHolidays, InternationalHoli
31
32
  kwargs.setdefault("observed_rule", SAT_TO_NONE + SUN_TO_NEXT_MON)
32
33
  super().__init__(*args, **kwargs)
33
34
 
34
- def _populate(self, year):
35
- if year <= 2013:
36
- return None
37
- super()._populate(year)
38
-
35
+ def _populate_public_holidays(self):
39
36
  self._move_holiday(self._add_new_years_day("New Year's Day"))
40
37
 
41
38
  self._add_good_friday("Good Friday")
@@ -43,8 +43,9 @@ class NewYorkStockExchange(
43
43
  - https://web.archive.org/web/20211101162021/https://www.nyse.com/markets/hours-calendars
44
44
  """
45
45
 
46
- market = "NYSE"
46
+ market = "XNYS"
47
47
  observed_label = "%s (observed)"
48
+ start_year = 1863
48
49
 
49
50
  def __init__(self, *args, **kwargs):
50
51
  ChristianHolidays.__init__(self)
@@ -53,67 +54,65 @@ class NewYorkStockExchange(
53
54
  kwargs.setdefault("observed_rule", SAT_TO_PREV_FRI + SUN_TO_NEXT_MON)
54
55
  super().__init__(*args, **kwargs)
55
56
 
56
- def _populate(self, year):
57
- super()._populate(year)
58
-
57
+ def _populate_public_holidays(self):
59
58
  # New Year's Day.
60
59
  name = "New Year's Day"
61
60
  self._move_holiday(self._add_new_years_day(name))
62
61
 
63
62
  # MLK, 3rd Monday of January.
64
- if year >= 1998:
63
+ if self._year >= 1998:
65
64
  self._add_holiday_3rd_mon_of_jan("Martin Luther King Jr. Day")
66
65
 
67
66
  # LINCOLN BIRTHDAY: observed 1896 - 1953 and 1968, Feb 12 (observed)
68
- if 1896 <= year <= 1953 or year == 1968:
67
+ if 1896 <= self._year <= 1953 or self._year == 1968:
69
68
  self._move_holiday(self._add_holiday_feb_12("Lincoln's Birthday"))
70
69
 
71
70
  # WASHINGTON'S BIRTHDAY: Feb 22 (obs) until 1971, then 3rd Mon of Feb
72
71
  name = "Washington's Birthday"
73
- if year <= 1970:
72
+ if self._year <= 1970:
74
73
  self._move_holiday(self._add_holiday_feb_22(name))
75
74
  else:
76
75
  self._add_holiday_3rd_mon_of_feb(name)
77
76
 
78
77
  # GOOD FRIDAY - closed every year except 1898, 1906, and 1907
79
- if year not in {1898, 1906, 1907}:
78
+ if self._year not in {1898, 1906, 1907}:
80
79
  self._add_good_friday("Good Friday")
81
80
 
82
81
  # MEM DAY (May 30) - closed every year since 1873
83
82
  # last Mon in May since 1971
84
- if year >= 1873:
83
+ if self._year >= 1873:
85
84
  name = "Memorial Day"
86
- if year <= 1970:
85
+ if self._year <= 1970:
87
86
  self._move_holiday(self._add_holiday_may_30(name))
88
87
  else:
89
88
  self._add_holiday_last_mon_of_may(name)
90
89
 
91
90
  # FLAG DAY: June 14th 1916 - 1953
92
- if 1916 <= year <= 1953:
91
+ if 1916 <= self._year <= 1953:
93
92
  self._move_holiday(self._add_holiday_jun_14("Flag Day"))
94
93
 
95
94
  # JUNETEENTH: since 2022
96
- if year >= 2022:
95
+ if self._year >= 2022:
97
96
  self._move_holiday(self._add_holiday_jun_19("Juneteenth National Independence Day"))
98
97
 
99
98
  # INDEPENDENCE DAY (July 4) - history suggests closed every year
100
99
  self._move_holiday(self._add_holiday_jul_4("Independence Day"))
101
100
 
102
101
  # LABOR DAY - first mon in Sept, since 1887
103
- if year >= 1887:
102
+ if self._year >= 1887:
104
103
  self._add_holiday_1st_mon_of_sep("Labor Day")
105
104
 
106
105
  # COLUMBUS DAY/INDIGENOUS PPL DAY: Oct 12 - closed 1909-1953
107
- if 1909 <= year <= 1953:
106
+ if 1909 <= self._year <= 1953:
108
107
  self._move_holiday(self._add_columbus_day("Columbus Day"))
109
108
 
110
109
  # ELECTION DAY: Tuesday after first Monday in November (2 U.S. Code §7)
111
110
  # closed until 1969, then closed pres years 1972-80
112
- if year <= 1968 or year in {1972, 1976, 1980}:
111
+ if self._year <= 1968 or self._year in {1972, 1976, 1980}:
113
112
  self._add_holiday_1_day_past_1st_mon_of_nov("Election Day")
114
113
 
115
114
  # VETERAN'S DAY: Nov 11 - closed 1918, 1921, 1934-1953
116
- if year in {1918, 1921} or 1934 <= year <= 1953:
115
+ if self._year in {1918, 1921} or 1934 <= self._year <= 1953:
117
116
  self._move_holiday(self._add_remembrance_day("Veteran's Day"))
118
117
 
119
118
  # THXGIVING DAY: 4th Thurs in Nov - closed every year
@@ -123,17 +122,17 @@ class NewYorkStockExchange(
123
122
  self._move_holiday(self._add_christmas_day("Christmas Day"))
124
123
 
125
124
  # Special holidays.
126
- if year == 1914:
125
+ if self._year == 1914:
127
126
  # Beginning of WWI.
128
- begin = date(year, JUL, 31)
129
- end = date(year, NOV, 27)
127
+ begin = date(self._year, JUL, 31)
128
+ end = date(self._year, NOV, 27)
130
129
  for dt in (_timedelta(begin, n) for n in range((end - begin).days + 1)):
131
130
  if self._is_weekend(dt) or dt in self:
132
131
  continue
133
132
  self._add_holiday("World War I", dt)
134
- elif year == 1968:
135
- begin = date(year, JUN, 12)
136
- end = date(year, DEC, 24)
133
+ elif self._year == 1968:
134
+ begin = date(self._year, JUN, 12)
135
+ end = date(self._year, DEC, 24)
137
136
  # Wednesday special holiday.
138
137
  for dt in (_timedelta(begin, n) for n in range(0, (end - begin).days + 1, 7)):
139
138
  self._add_holiday("Paper Crisis", dt)