holidays 0.60__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.
Files changed (156) hide show
  1. holidays/constants.py +3 -0
  2. holidays/countries/__init__.py +1 -0
  3. holidays/countries/albania.py +2 -4
  4. holidays/countries/angola.py +2 -4
  5. holidays/countries/argentina.py +23 -1
  6. holidays/countries/armenia.py +1 -3
  7. holidays/countries/aruba.py +2 -4
  8. holidays/countries/australia.py +1 -0
  9. holidays/countries/azerbaijan.py +31 -8
  10. holidays/countries/bahamas.py +2 -4
  11. holidays/countries/barbados.py +2 -4
  12. holidays/countries/belarus.py +2 -4
  13. holidays/countries/belize.py +2 -4
  14. holidays/countries/bolivia.py +1 -3
  15. holidays/countries/botswana.py +1 -3
  16. holidays/countries/brazil.py +151 -116
  17. holidays/countries/brunei.py +159 -72
  18. holidays/countries/bulgaria.py +1 -6
  19. holidays/countries/burkina_faso.py +3 -5
  20. holidays/countries/burundi.py +1 -3
  21. holidays/countries/cambodia.py +13 -4
  22. holidays/countries/cameroon.py +2 -4
  23. holidays/countries/canada.py +7 -11
  24. holidays/countries/chad.py +2 -4
  25. holidays/countries/chile.py +1 -3
  26. holidays/countries/china.py +23 -12
  27. holidays/countries/congo.py +2 -4
  28. holidays/countries/croatia.py +1 -3
  29. holidays/countries/cuba.py +2 -4
  30. holidays/countries/curacao.py +2 -7
  31. holidays/countries/cyprus.py +1 -9
  32. holidays/countries/djibouti.py +2 -4
  33. holidays/countries/dominica.py +2 -4
  34. holidays/countries/dominican_republic.py +2 -4
  35. holidays/countries/eswatini.py +1 -4
  36. holidays/countries/ethiopia.py +1 -3
  37. holidays/countries/finland.py +6 -3
  38. holidays/countries/france.py +1 -0
  39. holidays/countries/gabon.py +2 -4
  40. holidays/countries/georgia.py +1 -3
  41. holidays/countries/germany.py +4 -56
  42. holidays/countries/ghana.py +1 -4
  43. holidays/countries/guernsey.py +328 -0
  44. holidays/countries/haiti.py +2 -8
  45. holidays/countries/hongkong.py +2 -3
  46. holidays/countries/indonesia.py +1 -3
  47. holidays/countries/iran.py +1 -3
  48. holidays/countries/ireland.py +1 -3
  49. holidays/countries/israel.py +1 -18
  50. holidays/countries/japan.py +2 -6
  51. holidays/countries/jersey.py +2 -4
  52. holidays/countries/kazakhstan.py +2 -4
  53. holidays/countries/kenya.py +1 -3
  54. holidays/countries/laos.py +2 -13
  55. holidays/countries/latvia.py +1 -3
  56. holidays/countries/lesotho.py +1 -3
  57. holidays/countries/lithuania.py +1 -3
  58. holidays/countries/luxembourg.py +1 -1
  59. holidays/countries/madagascar.py +1 -4
  60. holidays/countries/malawi.py +1 -4
  61. holidays/countries/malaysia.py +1 -6
  62. holidays/countries/malta.py +2 -4
  63. holidays/countries/moldova.py +2 -4
  64. holidays/countries/mozambique.py +1 -3
  65. holidays/countries/namibia.py +1 -3
  66. holidays/countries/netherlands.py +1 -0
  67. holidays/countries/new_zealand.py +1 -3
  68. holidays/countries/nigeria.py +1 -3
  69. holidays/countries/pakistan.py +1 -3
  70. holidays/countries/palau.py +5 -7
  71. holidays/countries/papua_new_guinea.py +2 -4
  72. holidays/countries/paraguay.py +32 -31
  73. holidays/countries/philippines.py +1 -3
  74. holidays/countries/poland.py +1 -3
  75. holidays/countries/portugal.py +23 -0
  76. holidays/countries/russia.py +1 -3
  77. holidays/countries/saint_kitts_and_nevis.py +2 -4
  78. holidays/countries/seychelles.py +2 -4
  79. holidays/countries/slovakia.py +2 -4
  80. holidays/countries/slovenia.py +1 -3
  81. holidays/countries/south_africa.py +2 -4
  82. holidays/countries/south_korea.py +1 -6
  83. holidays/countries/switzerland.py +2 -1
  84. holidays/countries/taiwan.py +1 -3
  85. holidays/countries/tanzania.py +2 -8
  86. holidays/countries/thailand.py +12 -8
  87. holidays/countries/timor_leste.py +4 -8
  88. holidays/countries/tonga.py +2 -4
  89. holidays/countries/turkey.py +2 -7
  90. holidays/countries/ukraine.py +2 -4
  91. holidays/countries/united_kingdom.py +2 -8
  92. holidays/countries/united_states.py +20 -23
  93. holidays/countries/uruguay.py +2 -7
  94. holidays/countries/uzbekistan.py +1 -2
  95. holidays/countries/vanuatu.py +2 -4
  96. holidays/countries/vatican_city.py +1 -3
  97. holidays/countries/venezuela.py +1 -0
  98. holidays/countries/zambia.py +1 -4
  99. holidays/countries/zimbabwe.py +1 -3
  100. holidays/financial/__init__.py +1 -0
  101. holidays/financial/brasil_bolsa_balcao.py +108 -0
  102. holidays/financial/european_central_bank.py +2 -5
  103. holidays/financial/ice_futures_europe.py +2 -5
  104. holidays/financial/ny_stock_exchange.py +20 -21
  105. holidays/groups/international.py +11 -0
  106. holidays/helpers.py +4 -4
  107. holidays/holiday_base.py +10 -4
  108. holidays/locale/de/LC_MESSAGES/CH.po +1 -1
  109. holidays/locale/en_US/LC_MESSAGES/BN.mo +0 -0
  110. holidays/locale/en_US/LC_MESSAGES/BN.po +29 -18
  111. holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
  112. holidays/locale/en_US/LC_MESSAGES/BR.po +263 -0
  113. holidays/locale/en_US/LC_MESSAGES/BVMF.mo +0 -0
  114. holidays/locale/en_US/LC_MESSAGES/BVMF.po +79 -0
  115. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  116. holidays/locale/en_US/LC_MESSAGES/CH.po +1 -1
  117. holidays/locale/en_US/LC_MESSAGES/KH.mo +0 -0
  118. holidays/locale/en_US/LC_MESSAGES/KH.po +7 -3
  119. holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
  120. holidays/locale/en_US/LC_MESSAGES/PY.po +18 -14
  121. holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
  122. holidays/locale/es/LC_MESSAGES/PY.po +17 -13
  123. holidays/locale/fr/LC_MESSAGES/CH.mo +0 -0
  124. holidays/locale/fr/LC_MESSAGES/CH.po +1 -1
  125. holidays/locale/it/LC_MESSAGES/CH.mo +0 -0
  126. holidays/locale/it/LC_MESSAGES/CH.po +1 -1
  127. holidays/locale/km/LC_MESSAGES/KH.mo +0 -0
  128. holidays/locale/km/LC_MESSAGES/KH.po +7 -3
  129. holidays/locale/ms/LC_MESSAGES/BN.mo +0 -0
  130. holidays/locale/ms/LC_MESSAGES/BN.po +26 -17
  131. holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
  132. holidays/locale/pt_BR/LC_MESSAGES/BR.po +263 -0
  133. holidays/locale/pt_BR/LC_MESSAGES/BVMF.mo +0 -0
  134. holidays/locale/pt_BR/LC_MESSAGES/BVMF.po +79 -0
  135. holidays/locale/th/LC_MESSAGES/BN.mo +0 -0
  136. holidays/locale/th/LC_MESSAGES/BN.po +28 -17
  137. holidays/locale/th/LC_MESSAGES/KH.mo +0 -0
  138. holidays/locale/th/LC_MESSAGES/KH.po +7 -3
  139. holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
  140. holidays/locale/uk/LC_MESSAGES/BR.po +263 -0
  141. holidays/locale/uk/LC_MESSAGES/BVMF.mo +0 -0
  142. holidays/locale/uk/LC_MESSAGES/BVMF.po +79 -0
  143. holidays/locale/uk/LC_MESSAGES/CH.mo +0 -0
  144. holidays/locale/uk/LC_MESSAGES/CH.po +1 -1
  145. holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
  146. holidays/locale/uk/LC_MESSAGES/PY.po +18 -14
  147. holidays/observed_holiday_base.py +2 -1
  148. holidays/registry.py +2 -0
  149. holidays/utils.py +1 -1
  150. holidays/version.py +1 -1
  151. {holidays-0.60.dist-info → holidays-0.62.dist-info}/AUTHORS +1 -0
  152. {holidays-0.60.dist-info → holidays-0.62.dist-info}/METADATA +20 -7
  153. {holidays-0.60.dist-info → holidays-0.62.dist-info}/RECORD +156 -142
  154. {holidays-0.60.dist-info → holidays-0.62.dist-info}/WHEEL +1 -1
  155. {holidays-0.60.dist-info → holidays-0.62.dist-info}/LICENSE +0 -0
  156. {holidays-0.60.dist-info → holidays-0.62.dist-info}/top_level.txt +0 -0
@@ -64,6 +64,8 @@ class Tanzania(
64
64
  # %s (estimated).
65
65
  estimated_label = tr("%s (makisio)")
66
66
  supported_languages = ("en_US", "sw")
67
+ # Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
68
+ start_year = 1994
67
69
 
68
70
  def __init__(self, *args, **kwargs):
69
71
  ChristianHolidays.__init__(self)
@@ -73,10 +75,6 @@ class Tanzania(
73
75
  super().__init__(*args, **kwargs)
74
76
 
75
77
  def _populate_bank_holidays(self):
76
- # Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
77
- if self._year <= 1993:
78
- return None
79
-
80
78
  # Sikukuu ya Pasaka.
81
79
  # Status: In-Use.
82
80
  # Only observed by financial institutions.
@@ -85,10 +83,6 @@ class Tanzania(
85
83
  self._add_easter_sunday(tr("Sikukuu ya Pasaka"))
86
84
 
87
85
  def _populate_public_holidays(self):
88
- # Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
89
- if self._year <= 1993:
90
- return None
91
-
92
86
  # In-lieus ("Badala ya %s") are observed on Monday should it fall on the weekends.
93
87
  # Abrogated in Public Holidays Ordinance No. 28 of 1966.
94
88
  # Reinstituted in Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
@@ -40,6 +40,7 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC
40
40
  - https://resolution.soc.go.th/?prep_id=196007
41
41
  - https://github.com/vacanza/holidays/pull/929
42
42
  - https://www.thairath.co.th/lifestyle/life/2812118
43
+ - https://www.thaipbs.or.th/news/content/346216
43
44
  - [New Year's Day]
44
45
  `wikisource.org <http://tiny.cc/wa_wiki_thai_newyear_2483>`_
45
46
  - [National Children's Day]
@@ -142,6 +143,9 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC
142
143
  # %s (in lieu).
143
144
  observed_label = tr("ชดเชย%s")
144
145
  supported_languages = ("en_US", "th")
146
+ # Due to Thai Calendar Migration, this is capped off at 1941.
147
+ # But certain holidays were implemented before 1941.
148
+ start_year = 1941
145
149
 
146
150
  def __init__(self, *args, **kwargs):
147
151
  InternationalHolidays.__init__(self)
@@ -154,11 +158,6 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC
154
158
  return 1961 <= self._year <= 1973 or 1995 <= self._year <= 1997 or self._year >= 2001
155
159
 
156
160
  def _populate_public_holidays(self):
157
- # Due to Thai Calendar Migration, this is capped off at 1941.
158
- # But certain holidays were implemented before 1941.
159
- if self._year <= 1940:
160
- return None
161
-
162
161
  # Fixed Date Holidays
163
162
 
164
163
  # วันขึ้นปีใหม่
@@ -681,10 +680,10 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC
681
680
 
682
681
  # วันลอยกระทง
683
682
  # Status: In-Use.
683
+ # Started in 1941.
684
684
 
685
- if self._year >= 1941:
686
- # Loy Krathong
687
- self._add_loy_krathong(tr("วันลอยกระทง"))
685
+ # Loy Krathong
686
+ self._add_loy_krathong(tr("วันลอยกระทง"))
688
687
 
689
688
 
690
689
  class TH(Thailand):
@@ -832,6 +831,11 @@ class ThailandStaticHolidays:
832
831
  (APR, 12, thai_bridge_public_holiday),
833
832
  (DEC, 30, thai_bridge_public_holiday),
834
833
  ),
834
+ 2025: (
835
+ (JUN, 2, thai_bridge_public_holiday),
836
+ (AUG, 11, thai_bridge_public_holiday),
837
+ ),
838
+ 2026: (JAN, 2, thai_bridge_public_holiday),
835
839
  }
836
840
  special_workday_holidays = {1999: (MAY, 14, tr("วันพืชมงคล"))}
837
841
 
@@ -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,10 +45,6 @@ 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
 
@@ -103,9 +101,6 @@ class Turkey(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays
103
101
  self._add_eid_al_adha_day_four(name)
104
102
 
105
103
  def _populate_half_day_holidays(self):
106
- if self._year <= 1935:
107
- return None
108
-
109
104
  # %s (from 1pm).
110
105
  begin_time_label = self.tr("%s (saat 13.00'ten)")
111
106
 
@@ -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,29 +214,25 @@ 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 (
217
- self.subdiv is None
218
- or self.subdiv
219
- in {
220
- "AS",
221
- "AZ",
222
- "CT",
223
- "GA",
224
- "ID",
225
- "IL",
226
- "IN",
227
- "MA",
228
- "MD",
229
- "MO",
230
- "MT",
231
- "NJ",
232
- "NY",
233
- "OH",
234
- "PA",
235
- "UT",
236
- "WV",
237
- }
238
- ):
217
+ if self._year >= 1937 and self.subdiv in {
218
+ "AS",
219
+ "AZ",
220
+ "CT",
221
+ "GA",
222
+ "ID",
223
+ "IL",
224
+ "IN",
225
+ "MA",
226
+ "MD",
227
+ "MO",
228
+ "MT",
229
+ "NJ",
230
+ "NY",
231
+ "OH",
232
+ "PA",
233
+ "UT",
234
+ "WV",
235
+ }:
239
236
  name = "Columbus Day"
240
237
  if self._year >= 1971:
241
238
  self._add_holiday_2nd_mon_of_oct(name)
@@ -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
 
@@ -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
 
@@ -12,6 +12,7 @@
12
12
 
13
13
  # flake8: noqa: F401
14
14
 
15
+ from .brasil_bolsa_balcao import BrasilBolsaBalcao, BVMF, B3
15
16
  from .european_central_bank import EuropeanCentralBank, ECB, TAR
16
17
  from .ice_futures_europe import ICEFuturesEurope, IFEU
17
18
  from .ny_stock_exchange import NewYorkStockExchange, NYSE, XNYS
@@ -0,0 +1,108 @@
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 gettext import gettext as tr
14
+
15
+ from holidays.groups import ChristianHolidays, InternationalHolidays
16
+ from holidays.holiday_base import HolidayBase
17
+
18
+
19
+ class BrasilBolsaBalcao(HolidayBase, ChristianHolidays, InternationalHolidays):
20
+ """
21
+ Official regulations:
22
+ - `Decreto n. 155-B, de 14.01.1890 <https://www2.camara.leg.br/legin/fed/decret/1824-1899/decreto-155-b-14-janeiro-1890-517534-publicacaooriginal-1-pe.html>`_
23
+ - `Decreto n. 19.488, de 15.12.1930 <https://www2.camara.leg.br/legin/fed/decret/1930-1939/decreto-19488-15-dezembro-1930-508040-republicacao-85201-pe.html>`_
24
+ - `Lei n. 14.759, de 21.12.2023 <https://www2.camara.leg.br/legin/fed/lei/2023/lei-14759-21-dezembro-2023-795091-publicacaooriginal-170522-pl.html>`_
25
+ - `Resolução n. 2.516, de 29.06.1998 <https://www.bcb.gov.br/pre/normativos/res/1998/pdf/res_2516_v2_P.pdf>`_
26
+ - `Lei n. 662, de 6.04.1949 <https://www2.camara.leg.br/legin/fed/lei/1940-1949/lei-662-6-abril-1949-347136-publicacaooriginal-1-pl.html>`_
27
+ - `Lei n. 6.802, de 30.06.1980 <https://www.planalto.gov.br/ccivil_03/leis/l6802.htm>`_
28
+ - `Decreto n. 19.488, de 15.12.1930 <https://www2.camara.leg.br/legin/fed/decret/1930-1939/decreto-19488-15-dezembro-1930-508040-republicacao-85201-pe.html>`_
29
+ - `Decreto n. 22.647, de 17.04.1933 <https://www2.camara.leg.br/legin/fed/decret/1930-1939/decreto-22647-17-abril-1933-558774-publicacaooriginal-80337-pe.html>`_
30
+ Historical data:
31
+ - `Feriados ANBIMA 2001-2099 <https://www.anbima.com.br/feriados>`_
32
+ - `Calendario de negociação B3 <https://www.b3.com.br/pt_br/solucoes/plataformas/puma-trading-system/para-participantes-e-traders/calendario-de-negociacao/feriados>`_
33
+ """
34
+
35
+ market = "BVMF"
36
+ default_language = "pt_BR"
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
42
+
43
+ def __init__(self, *args, **kwargs) -> None:
44
+ ChristianHolidays.__init__(self)
45
+ InternationalHolidays.__init__(self)
46
+ super().__init__(*args, **kwargs)
47
+
48
+ def _populate_public_holidays(self):
49
+ # Universal Fraternization Day.
50
+ self._add_new_years_day(tr("Confraternização Universal"))
51
+
52
+ # Carnival.
53
+ carnival_name = tr("Carnaval")
54
+ self._add_carnival_monday(carnival_name)
55
+ self._add_carnival_tuesday(carnival_name)
56
+
57
+ # Resolução n. 2.516, de 29.06.1998
58
+ if self._year <= 1999:
59
+ # Holy Thursday.
60
+ self._add_holy_thursday(tr("Quinta-feira Santa"))
61
+
62
+ # Good Friday.
63
+ self._add_good_friday(tr("Sexta-feira Santa"))
64
+
65
+ # Tiradentes' Day was revoked by president Getúlio Vargas in
66
+ # december of 1930, through Decreto n. 19.488, but reinstated
67
+ # by the same president in 1933, through Decreto n. 22.647.
68
+ if self._year not in {1931, 1932}:
69
+ # Tiradentes' Day.
70
+ self._add_holiday_apr_21(tr("Tiradentes"))
71
+
72
+ if self._year >= 1925:
73
+ # Workers' Day.
74
+ self._add_labor_day(tr("Dia do Trabalhador"))
75
+
76
+ # Corpus Christi.
77
+ self._add_corpus_christi_day(tr("Corpus Christi"))
78
+
79
+ # Independence Day.
80
+ self._add_holiday_sep_7(tr("Independência do Brasil"))
81
+
82
+ # Lei n. 6.802, de 30.06.1980
83
+ if self._year >= 1980:
84
+ # Our Lady of Aparecida.
85
+ self._add_holiday_oct_12(tr("Nossa Senhora Aparecida"))
86
+
87
+ # All Souls' Day.
88
+ self._add_all_souls_day(tr("Finados"))
89
+
90
+ # Republic Proclamation Day.
91
+ self._add_holiday_nov_15(tr("Proclamação da República"))
92
+
93
+ # Lei n. 14.759, de 21.12.2023
94
+ if self._year >= 2024:
95
+ # National Day of Zumbi and Black Awareness.
96
+ self._add_holiday_nov_20(tr("Dia Nacional de Zumbi e da Consciência Negra"))
97
+
98
+ if self._year >= 1922:
99
+ # Christmas Day.
100
+ self._add_christmas_day(tr("Natal"))
101
+
102
+
103
+ class BVMF(BrasilBolsaBalcao):
104
+ pass
105
+
106
+
107
+ class B3(BrasilBolsaBalcao):
108
+ pass
@@ -24,6 +24,7 @@ class EuropeanCentralBank(HolidayBase, ChristianHolidays, InternationalHolidays)
24
24
  """
25
25
 
26
26
  market = "ECB"
27
+ start_year = 2000
27
28
 
28
29
  def __init__(self, *args, **kwargs):
29
30
  ChristianHolidays.__init__(self)
@@ -31,11 +32,7 @@ class EuropeanCentralBank(HolidayBase, ChristianHolidays, InternationalHolidays)
31
32
  StaticHolidays.__init__(self, EuropeanCentralBankStaticHolidays)
32
33
  super().__init__(*args, **kwargs)
33
34
 
34
- def _populate(self, year):
35
- if year <= 1999:
36
- return None
37
- super()._populate(year)
38
-
35
+ def _populate_public_holidays(self):
39
36
  self._add_new_years_day("New Year's Day")
40
37
 
41
38
  self._add_good_friday("Good Friday")
@@ -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")