holidays 0.70__py3-none-any.whl → 0.72__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 (254) hide show
  1. holidays/__init__.py +1 -2
  2. holidays/calendars/__init__.py +1 -1
  3. holidays/calendars/balinese_saka.py +1 -1
  4. holidays/calendars/buddhist.py +5 -3
  5. holidays/calendars/chinese.py +101 -13
  6. holidays/calendars/custom.py +1 -1
  7. holidays/calendars/gregorian.py +1 -1
  8. holidays/calendars/hebrew.py +1 -1
  9. holidays/calendars/hindu.py +47 -3
  10. holidays/calendars/islamic.py +1 -1
  11. holidays/calendars/julian.py +1 -1
  12. holidays/calendars/julian_revised.py +1 -1
  13. holidays/calendars/persian.py +1 -1
  14. holidays/calendars/sinhala.py +1 -1
  15. holidays/calendars/thai.py +1 -1
  16. holidays/constants.py +1 -1
  17. holidays/countries/__init__.py +7 -1
  18. holidays/countries/afghanistan.py +1 -1
  19. holidays/countries/albania.py +2 -2
  20. holidays/countries/algeria.py +1 -1
  21. holidays/countries/american_samoa.py +2 -1
  22. holidays/countries/andorra.py +10 -1
  23. holidays/countries/angola.py +1 -1
  24. holidays/countries/antigua_and_barbuda.py +1 -1
  25. holidays/countries/argentina.py +5 -5
  26. holidays/countries/armenia.py +1 -1
  27. holidays/countries/aruba.py +1 -1
  28. holidays/countries/australia.py +16 -5
  29. holidays/countries/austria.py +3 -3
  30. holidays/countries/azerbaijan.py +1 -1
  31. holidays/countries/bahamas.py +1 -1
  32. holidays/countries/bahrain.py +1 -1
  33. holidays/countries/bangladesh.py +1 -1
  34. holidays/countries/barbados.py +1 -1
  35. holidays/countries/belarus.py +1 -1
  36. holidays/countries/belgium.py +1 -1
  37. holidays/countries/belize.py +1 -1
  38. holidays/countries/bolivia.py +23 -12
  39. holidays/countries/bosnia_and_herzegovina.py +5 -5
  40. holidays/countries/botswana.py +1 -1
  41. holidays/countries/brazil.py +3 -4
  42. holidays/countries/brunei.py +1 -1
  43. holidays/countries/bulgaria.py +1 -1
  44. holidays/countries/burkina_faso.py +1 -1
  45. holidays/countries/burundi.py +1 -1
  46. holidays/countries/cambodia.py +22 -22
  47. holidays/countries/cameroon.py +1 -1
  48. holidays/countries/canada.py +91 -57
  49. holidays/countries/chad.py +1 -1
  50. holidays/countries/chile.py +36 -18
  51. holidays/countries/china.py +1 -1
  52. holidays/countries/colombia.py +1 -1
  53. holidays/countries/congo.py +1 -1
  54. holidays/countries/costa_rica.py +1 -1
  55. holidays/countries/croatia.py +1 -1
  56. holidays/countries/cuba.py +1 -1
  57. holidays/countries/curacao.py +1 -1
  58. holidays/countries/cyprus.py +1 -1
  59. holidays/countries/czechia.py +1 -1
  60. holidays/countries/denmark.py +1 -1
  61. holidays/countries/djibouti.py +1 -1
  62. holidays/countries/dominica.py +1 -1
  63. holidays/countries/dominican_republic.py +1 -1
  64. holidays/countries/ecuador.py +1 -1
  65. holidays/countries/egypt.py +1 -1
  66. holidays/countries/el_salvador.py +18 -18
  67. holidays/countries/estonia.py +1 -1
  68. holidays/countries/eswatini.py +1 -1
  69. holidays/countries/ethiopia.py +43 -24
  70. holidays/countries/fiji.py +1 -1
  71. holidays/countries/finland.py +1 -1
  72. holidays/countries/france.py +4 -5
  73. holidays/countries/french_southern_territories.py +53 -0
  74. holidays/countries/gabon.py +1 -1
  75. holidays/countries/georgia.py +1 -1
  76. holidays/countries/germany.py +20 -21
  77. holidays/countries/ghana.py +1 -1
  78. holidays/countries/greece.py +1 -1
  79. holidays/countries/greenland.py +1 -1
  80. holidays/countries/guam.py +2 -1
  81. holidays/countries/guatemala.py +1 -1
  82. holidays/countries/guernsey.py +1 -1
  83. holidays/countries/guinea.py +1 -1
  84. holidays/countries/haiti.py +1 -1
  85. holidays/countries/honduras.py +1 -1
  86. holidays/countries/hongkong.py +2 -2
  87. holidays/countries/hungary.py +1 -1
  88. holidays/countries/iceland.py +1 -1
  89. holidays/countries/india.py +17 -11
  90. holidays/countries/indonesia.py +1 -1
  91. holidays/countries/iran.py +1 -1
  92. holidays/countries/ireland.py +1 -1
  93. holidays/countries/isle_of_man.py +1 -1
  94. holidays/countries/israel.py +1 -1
  95. holidays/countries/italy.py +1 -1
  96. holidays/countries/ivory_coast.py +5 -5
  97. holidays/countries/jamaica.py +1 -1
  98. holidays/countries/japan.py +1 -1
  99. holidays/countries/jersey.py +1 -1
  100. holidays/countries/jordan.py +1 -1
  101. holidays/countries/kazakhstan.py +1 -1
  102. holidays/countries/kenya.py +1 -1
  103. holidays/countries/kuwait.py +1 -1
  104. holidays/countries/kyrgyzstan.py +1 -1
  105. holidays/countries/laos.py +1 -1
  106. holidays/countries/latvia.py +1 -1
  107. holidays/countries/lesotho.py +1 -1
  108. holidays/countries/liechtenstein.py +1 -1
  109. holidays/countries/lithuania.py +1 -1
  110. holidays/countries/luxembourg.py +1 -1
  111. holidays/countries/macau.py +5 -5
  112. holidays/countries/madagascar.py +1 -1
  113. holidays/countries/malawi.py +1 -1
  114. holidays/countries/malaysia.py +26 -22
  115. holidays/countries/maldives.py +1 -1
  116. holidays/countries/malta.py +1 -1
  117. holidays/countries/marshall_islands.py +1 -1
  118. holidays/countries/mauritania.py +1 -1
  119. holidays/countries/mexico.py +1 -1
  120. holidays/countries/moldova.py +1 -1
  121. holidays/countries/monaco.py +1 -1
  122. holidays/countries/montenegro.py +1 -1
  123. holidays/countries/morocco.py +1 -1
  124. holidays/countries/mozambique.py +1 -1
  125. holidays/countries/namibia.py +1 -1
  126. holidays/countries/netherlands.py +1 -1
  127. holidays/countries/new_zealand.py +19 -19
  128. holidays/countries/nicaragua.py +19 -19
  129. holidays/countries/nigeria.py +1 -1
  130. holidays/countries/north_macedonia.py +1 -1
  131. holidays/countries/northern_mariana_islands.py +2 -1
  132. holidays/countries/norway.py +1 -1
  133. holidays/countries/oman.py +185 -0
  134. holidays/countries/pakistan.py +8 -1
  135. holidays/countries/palau.py +1 -1
  136. holidays/countries/panama.py +1 -1
  137. holidays/countries/papua_new_guinea.py +1 -1
  138. holidays/countries/paraguay.py +1 -1
  139. holidays/countries/peru.py +1 -1
  140. holidays/countries/philippines.py +1 -1
  141. holidays/countries/poland.py +1 -1
  142. holidays/countries/portugal.py +23 -25
  143. holidays/countries/puerto_rico.py +2 -1
  144. holidays/countries/qatar.py +1 -1
  145. holidays/countries/romania.py +1 -1
  146. holidays/countries/russia.py +1 -1
  147. holidays/countries/saint_kitts_and_nevis.py +1 -1
  148. holidays/countries/saint_lucia.py +1 -1
  149. holidays/countries/samoa.py +1 -1
  150. holidays/countries/san_marino.py +1 -1
  151. holidays/countries/sao_tome_and_principe.py +112 -0
  152. holidays/countries/saudi_arabia.py +1 -1
  153. holidays/countries/serbia.py +1 -1
  154. holidays/countries/seychelles.py +1 -1
  155. holidays/countries/sierra_leone.py +149 -0
  156. holidays/countries/singapore.py +5 -2
  157. holidays/countries/slovakia.py +1 -1
  158. holidays/countries/slovenia.py +1 -1
  159. holidays/countries/south_africa.py +1 -1
  160. holidays/countries/south_korea.py +17 -46
  161. holidays/countries/spain.py +43 -20
  162. holidays/countries/sri_lanka.py +1 -1
  163. holidays/countries/suriname.py +227 -0
  164. holidays/countries/sweden.py +1 -1
  165. holidays/countries/switzerland.py +61 -28
  166. holidays/countries/taiwan.py +3 -2
  167. holidays/countries/tanzania.py +1 -1
  168. holidays/countries/thailand.py +3 -3
  169. holidays/countries/timor_leste.py +1 -1
  170. holidays/countries/tonga.py +1 -1
  171. holidays/countries/trinidad_and_tobago.py +197 -0
  172. holidays/countries/tunisia.py +1 -1
  173. holidays/countries/turkey.py +1 -1
  174. holidays/countries/tuvalu.py +6 -6
  175. holidays/countries/ukraine.py +1 -1
  176. holidays/countries/united_arab_emirates.py +1 -1
  177. holidays/countries/united_kingdom.py +1 -1
  178. holidays/countries/united_states.py +62 -4
  179. holidays/countries/united_states_minor_outlying_islands.py +2 -1
  180. holidays/countries/united_states_virgin_islands.py +2 -1
  181. holidays/countries/uruguay.py +1 -1
  182. holidays/countries/uzbekistan.py +1 -1
  183. holidays/countries/vanuatu.py +1 -1
  184. holidays/countries/vatican_city.py +1 -1
  185. holidays/countries/venezuela.py +1 -1
  186. holidays/countries/vietnam.py +3 -2
  187. holidays/countries/zambia.py +1 -1
  188. holidays/countries/zimbabwe.py +1 -1
  189. holidays/deprecations/v1_incompatibility.py +1 -1
  190. holidays/financial/__init__.py +1 -1
  191. holidays/financial/brasil_bolsa_balcao.py +1 -1
  192. holidays/financial/european_central_bank.py +1 -1
  193. holidays/financial/ice_futures_europe.py +1 -1
  194. holidays/financial/ny_stock_exchange.py +1 -1
  195. holidays/groups/__init__.py +1 -1
  196. holidays/groups/balinese_saka.py +1 -1
  197. holidays/groups/buddhist.py +1 -1
  198. holidays/groups/chinese.py +6 -4
  199. holidays/groups/christian.py +1 -1
  200. holidays/groups/custom.py +1 -1
  201. holidays/groups/eastern.py +1 -1
  202. holidays/groups/hebrew.py +1 -1
  203. holidays/groups/hindu.py +45 -3
  204. holidays/groups/international.py +1 -1
  205. holidays/groups/islamic.py +11 -1
  206. holidays/groups/persian.py +1 -1
  207. holidays/groups/sinhala.py +1 -1
  208. holidays/groups/thai.py +6 -6
  209. holidays/helpers.py +1 -1
  210. holidays/holiday_base.py +32 -6
  211. holidays/ical.py +2 -2
  212. holidays/locale/am/LC_MESSAGES/ET.mo +0 -0
  213. holidays/locale/ar/LC_MESSAGES/CA.mo +0 -0
  214. holidays/locale/ar/LC_MESSAGES/ET.mo +0 -0
  215. holidays/locale/ar/LC_MESSAGES/OM.mo +0 -0
  216. holidays/locale/en_CA/LC_MESSAGES/CA.mo +0 -0
  217. holidays/locale/en_CI/LC_MESSAGES/CI.mo +0 -0
  218. holidays/locale/en_ET/LC_MESSAGES/ET.mo +0 -0
  219. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  220. holidays/locale/en_SL/LC_MESSAGES/SL.mo +0 -0
  221. holidays/locale/en_TT/LC_MESSAGES/TT.mo +0 -0
  222. holidays/locale/en_US/LC_MESSAGES/CA.mo +0 -0
  223. holidays/locale/en_US/LC_MESSAGES/CI.mo +0 -0
  224. holidays/locale/en_US/LC_MESSAGES/ET.mo +0 -0
  225. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  226. holidays/locale/en_US/LC_MESSAGES/KH.mo +0 -0
  227. holidays/locale/en_US/LC_MESSAGES/OM.mo +0 -0
  228. holidays/locale/en_US/LC_MESSAGES/PK.mo +0 -0
  229. holidays/locale/en_US/LC_MESSAGES/SL.mo +0 -0
  230. holidays/locale/en_US/LC_MESSAGES/SR.mo +0 -0
  231. holidays/locale/en_US/LC_MESSAGES/ST.mo +0 -0
  232. holidays/locale/en_US/LC_MESSAGES/TF.mo +0 -0
  233. holidays/locale/en_US/LC_MESSAGES/TT.mo +0 -0
  234. holidays/locale/fr/LC_MESSAGES/CA.mo +0 -0
  235. holidays/locale/fr/LC_MESSAGES/TF.mo +0 -0
  236. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  237. holidays/locale/km/LC_MESSAGES/KH.mo +0 -0
  238. holidays/locale/nl/LC_MESSAGES/SR.mo +0 -0
  239. holidays/locale/pt_ST/LC_MESSAGES/ST.mo +0 -0
  240. holidays/locale/th/LC_MESSAGES/CA.mo +0 -0
  241. holidays/locale/th/LC_MESSAGES/KH.mo +0 -0
  242. holidays/locale/uk/LC_MESSAGES/TF.mo +0 -0
  243. holidays/locale/ur_PK/LC_MESSAGES/PK.mo +0 -0
  244. holidays/mixins.py +1 -1
  245. holidays/observed_holiday_base.py +6 -2
  246. holidays/registry.py +7 -1
  247. holidays/utils.py +61 -9
  248. holidays/version.py +2 -2
  249. {holidays-0.70.dist-info → holidays-0.72.dist-info}/METADATA +64 -16
  250. {holidays-0.70.dist-info → holidays-0.72.dist-info}/RECORD +254 -234
  251. {holidays-0.70.dist-info → holidays-0.72.dist-info}/WHEEL +1 -1
  252. holidays-0.70.dist-info/licenses/AUTHORS.md → holidays-0.72.dist-info/licenses/CONTRIBUTORS +4 -2
  253. {holidays-0.70.dist-info → holidays-0.72.dist-info}/licenses/LICENSE +1 -1
  254. {holidays-0.70.dist-info → holidays-0.72.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,149 @@
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 CONTRIBUTORS 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.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
16
+ from holidays.calendars.islamic import _CustomIslamicHolidays
17
+ from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
18
+ from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY
19
+
20
+
21
+ class SierraLeone(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
22
+ """Sierra Leone holidays.
23
+
24
+ References:
25
+ * <https://www.officeholidays.com/countries/sierra-leone>
26
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Sierra_Leone>
27
+ * <https://www.timeanddate.com/holidays/sierra-leone/>
28
+ * <https://salpost.gov.sl/opening-time-national-holidays>
29
+ """
30
+
31
+ country = "SL"
32
+ default_language = "en_SL"
33
+ # %s (estimated).
34
+ estimated_label = tr("%s (estimated)")
35
+ # %s (observed).
36
+ observed_label = tr("%s (observed)")
37
+ # %s (observed, estimated).
38
+ observed_estimated_label = tr("%s (observed, estimated)")
39
+ supported_languages = ("en_SL", "en_US")
40
+ # Sierra Leone gained independence on April 27, 1961.
41
+ start_year = 1962
42
+
43
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
44
+ """
45
+ Args:
46
+ islamic_show_estimated:
47
+ Whether to add "estimated" label to Islamic holidays name
48
+ if holiday date is estimated.
49
+ """
50
+ ChristianHolidays.__init__(self)
51
+ InternationalHolidays.__init__(self)
52
+ IslamicHolidays.__init__(
53
+ self, cls=SierraLeoneIslamicHolidays, show_estimated=islamic_show_estimated
54
+ )
55
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
56
+ super().__init__(*args, **kwargs)
57
+
58
+ def _populate_public_holidays(self):
59
+ dts_observed = set()
60
+
61
+ # New Year's Day.
62
+ dts_observed.add(self._add_new_years_day(tr("New Year's Day")))
63
+
64
+ if self._year >= 2002:
65
+ # Armed Forces Day.
66
+ dts_observed.add(self._add_holiday_feb_18(tr("Armed Forces Day")))
67
+
68
+ if self._year >= 2018:
69
+ # International Women's Day.
70
+ dts_observed.add(self._add_womens_day(tr("International Women's Day")))
71
+
72
+ # Good Friday.
73
+ self._add_good_friday(tr("Good Friday"))
74
+
75
+ # Easter Monday.
76
+ self._add_easter_monday(tr("Easter Monday"))
77
+
78
+ # Independence Day.
79
+ dts_observed.add(self._add_holiday_apr_27(tr("Independence Day")))
80
+
81
+ # International Worker's Day.
82
+ dts_observed.add(self._add_labor_day(tr("International Worker's Day")))
83
+
84
+ # Christmas Day.
85
+ dts_observed.add(self._add_christmas_day(tr("Christmas Day")))
86
+
87
+ # Boxing Day.
88
+ dts_observed.add(self._add_christmas_day_two(tr("Boxing Day")))
89
+
90
+ # Prophet's Birthday.
91
+ dts_observed.update(self._add_mawlid_day(tr("Prophet's Birthday")))
92
+
93
+ # Eid al-Fitr.
94
+ dts_observed.update(self._add_eid_al_fitr_day(tr("Eid al-Fitr")))
95
+
96
+ # Eid al-Adha.
97
+ dts_observed.update(self._add_eid_al_adha_day(tr("Eid al-Adha")))
98
+
99
+ if self.observed:
100
+ self._populate_observed(dts_observed)
101
+
102
+
103
+ class SL(SierraLeone):
104
+ pass
105
+
106
+
107
+ class SLE(SierraLeone):
108
+ pass
109
+
110
+
111
+ class SierraLeoneIslamicHolidays(_CustomIslamicHolidays):
112
+ """Sierra Leone Islamic holidays exact dates.
113
+
114
+ References:
115
+ * <https://www.timeanddate.com/holidays/sierra-leone/>
116
+ """
117
+
118
+ # Prophet's Birthday
119
+ MAWLID_DATES = {
120
+ 2018: (NOV, 21),
121
+ 2019: (NOV, 10),
122
+ 2020: (OCT, 29),
123
+ 2021: (OCT, 18),
124
+ 2022: (OCT, 8),
125
+ 2023: (SEP, 27),
126
+ 2024: (SEP, 15),
127
+ }
128
+
129
+ # Eid al-Fitr
130
+ EID_AL_FITR_DATES = {
131
+ 2018: (JUN, 15),
132
+ 2019: (JUN, 5),
133
+ 2020: (MAY, 24),
134
+ 2021: (MAY, 13),
135
+ 2022: (MAY, 2),
136
+ 2023: (APR, 21),
137
+ 2024: (APR, 10),
138
+ }
139
+
140
+ # Eid al-Adha
141
+ EID_AL_ADHA_DATES = {
142
+ 2018: (AUG, 22),
143
+ 2019: (AUG, 12),
144
+ 2020: (JUL, 31),
145
+ 2021: (JUL, 20),
146
+ 2022: (JUL, 9),
147
+ 2023: (JUN, 28),
148
+ 2024: (JUN, 16),
149
+ }
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -307,7 +307,9 @@ class SingaporeStaticHolidays:
307
307
 
308
308
  References:
309
309
  * <https://www.mom.gov.sg/newsroom/press-releases/2015/sg50-public-holiday-on-7-august-2015>
310
- * <https://www.straitstimes.com/singapore/politics/singapore-presidential-election-2023-polling-day-on-sept-1-nomination-day-on-aug-22>
310
+ * <https://www.mom.gov.sg/newsroom/press-releases/2020/0624-public-holiday-on-polling-day---10-july-2020>
311
+ * <https://www.mom.gov.sg/newsroom/press-releases/2023/0822-public-holiday-on-polling-day---1-sep-2023>
312
+ * <https://www.mom.gov.sg/newsroom/press-releases/2025/0415-public-holiday-on-polling-day_3-may-2025>
311
313
  """
312
314
 
313
315
  # Polling Day.
@@ -324,6 +326,7 @@ class SingaporeStaticHolidays:
324
326
  ),
325
327
  2020: (JUL, 10, polling_day_name),
326
328
  2023: (SEP, 1, polling_day_name),
329
+ 2025: (MAY, 3, polling_day_name),
327
330
  }
328
331
 
329
332
  special_public_holidays_observed = {
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -14,7 +14,7 @@ import warnings
14
14
  from datetime import date
15
15
  from gettext import gettext as tr
16
16
 
17
- from holidays.calendars import _CustomChineseHolidays
17
+ from holidays.calendars.chinese import KOREAN_CALENDAR
18
18
  from holidays.calendars.gregorian import (
19
19
  JAN,
20
20
  FEB,
@@ -87,7 +87,7 @@ class SouthKorea(
87
87
  start_year = 1948
88
88
 
89
89
  def __init__(self, *args, **kwargs):
90
- ChineseCalendarHolidays.__init__(self, cls=SouthKoreaLunisolarHolidays)
90
+ ChineseCalendarHolidays.__init__(self, calendar=KOREAN_CALENDAR)
91
91
  ChristianHolidays.__init__(self)
92
92
  InternationalHolidays.__init__(self)
93
93
  StaticHolidays.__init__(self, cls=SouthKoreaStaticHolidays)
@@ -213,7 +213,7 @@ class SouthKorea(
213
213
  # Christmas Day.
214
214
  append_observed(self._add_christmas_day(tr("기독탄신일")), 2023)
215
215
 
216
- # Election Days since Sep 2006; excluding the 2017 Special Presidential Election Day.
216
+ # Election Days since Sep 2006; excluding the 2017, 2025 Special Presidential Election Day.
217
217
 
218
218
  # Based on Article 34 of the Public Official Election Act.
219
219
  # (1) The election day for each election to be held at the expiration of the term shall
@@ -238,23 +238,18 @@ class SouthKorea(
238
238
  elif self._year >= 2007 and (self._year - 2008) % 4 == 0:
239
239
  self._add_holiday_2nd_wed_of_apr(name)
240
240
 
241
- if self._year >= 2007 and (self._year - 2007) % 5 == 0:
241
+ if self._year >= 2007:
242
242
  # Presidential Election Day.
243
243
  name = tr("대통령 선거일")
244
-
245
- if self._year <= 2012:
246
- self._add_holiday_3rd_wed_of_dec(name)
247
- elif self._year >= 2022:
248
- if (
249
- self._is_tuesday(mar_1)
250
- or self._is_wednesday(mar_1)
251
- or self._is_thursday(mar_1)
252
- ):
244
+ if self._year <= 2024 and (self._year - 2007) % 5 == 0:
245
+ if self._year <= 2012:
246
+ self._add_holiday_3rd_wed_of_dec(name)
247
+ elif self._year >= 2022:
253
248
  # Moved as per Paragraph 2 of Article 34 due to conflict with
254
249
  # Independence Movement Day (MAR, 1).
255
250
  self._add_holiday_2nd_wed_of_mar(name)
256
- else:
257
- self._add_holiday_1st_wed_of_mar(name)
251
+ elif self._year >= 2030 and (self._year - 2030) % 5 == 0:
252
+ self._add_holiday_1st_wed_of_apr(name)
258
253
 
259
254
  if self._year >= 2007 and (self._year - 2010) % 4 == 0:
260
255
  # Local Election Day.
@@ -294,34 +289,6 @@ class KOR(SouthKorea):
294
289
  pass
295
290
 
296
291
 
297
- class SouthKoreaLunisolarHolidays(_CustomChineseHolidays):
298
- BUDDHA_BIRTHDAY_DATES = {
299
- 1931: (MAY, 25),
300
- 1968: (MAY, 5),
301
- 2001: (MAY, 1),
302
- 2012: (MAY, 28),
303
- 2023: (MAY, 27),
304
- 2025: (MAY, 5),
305
- }
306
-
307
- LUNAR_NEW_YEAR_DATES = {
308
- 1916: (FEB, 4),
309
- 1944: (JAN, 26),
310
- 1954: (FEB, 4),
311
- 1958: (FEB, 19),
312
- 1966: (JAN, 22),
313
- 1988: (FEB, 18),
314
- 1997: (FEB, 8),
315
- 2027: (FEB, 7),
316
- 2028: (JAN, 27),
317
- }
318
-
319
- MID_AUTUMN_DATES = {
320
- 1942: (SEP, 25),
321
- 2040: (SEP, 21),
322
- }
323
-
324
-
325
292
  class SouthKoreaStaticHolidays:
326
293
  """South Korea special holidays.
327
294
 
@@ -610,8 +577,12 @@ class SouthKoreaStaticHolidays:
610
577
  2023: (OCT, 2, temporary_public_holiday),
611
578
  # 76th Anniversary of the Armed Forces of Korea.
612
579
  2024: (OCT, 1, armed_forces_day),
613
- # Added to create a 6-day long holiday period.
614
- 2025: (JAN, 27, temporary_public_holiday),
580
+ 2025: (
581
+ # Added to create a 6-day long holiday period.
582
+ (JAN, 27, temporary_public_holiday),
583
+ # Special Presidential Election (21st) due to Yoon Seok-yeol's impeachment.
584
+ (JUN, 3, presidential_election_day),
585
+ ),
615
586
  }
616
587
  # Pre-2014 Alternate Holidays
617
588
  # https://namu.wiki/w/대체%20휴일%20제도#s-4.2.1
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -55,26 +55,49 @@ class Spain(
55
55
  # Monday following %s.
56
56
  observed_label = tr("Lunes siguiente a %s")
57
57
  subdivisions = (
58
- "AN", # Andalucía
59
- "AR", # Aragón
60
- "AS", # Asturias
61
- "CB", # Cantabria
62
- "CE", # Ceuta
63
- "CL", # Castilla y León
64
- "CM", # Castilla-La Mancha
65
- "CN", # Canarias
66
- "CT", # Cataluña
67
- "EX", # Extremadura
68
- "GA", # Galicia
69
- "IB", # Islas Baleares
70
- "MC", # Murcia
71
- "MD", # Madrid
72
- "ML", # Melilla
73
- "NC", # Navarra
74
- "PV", # País Vasco
75
- "RI", # La Rioja
76
- "VC", # Valenciana
58
+ "AN", # Andalucía.
59
+ "AR", # Aragón.
60
+ "AS", # Asturias.
61
+ "CB", # Cantabria.
62
+ "CE", # Ceuta.
63
+ "CL", # Castilla y León.
64
+ "CM", # Castilla-La Mancha.
65
+ "CN", # Canarias.
66
+ "CT", # Cataluña (Catalunya).
67
+ "EX", # Extremadura.
68
+ "GA", # Galicia.
69
+ "IB", # Islas Baleares (Illes Balears).
70
+ "MC", # Murcia.
71
+ "MD", # Madrid.
72
+ "ML", # Melilla.
73
+ "NC", # Navarra.
74
+ "PV", # País Vasco.
75
+ "RI", # La Rioja.
76
+ "VC", # Valenciana.
77
77
  )
78
+ subdivisions_aliases = {
79
+ "Andalucía": "AN",
80
+ "Aragón": "AR",
81
+ "Asturias": "AS",
82
+ "Cantabria": "CB",
83
+ "Ceuta": "CE",
84
+ "Castilla y León": "CL",
85
+ "Castilla-La Mancha": "CM",
86
+ "Canarias": "CN",
87
+ "Cataluña": "CT",
88
+ "Catalunya": "CT",
89
+ "Extremadura": "EX",
90
+ "Galicia": "GA",
91
+ "Islas Baleares": "IB",
92
+ "Illes Balears": "IB",
93
+ "Murcia": "MC",
94
+ "Madrid": "MD",
95
+ "Melilla": "ML",
96
+ "Navarra": "NC",
97
+ "País Vasco": "PV",
98
+ "La Rioja": "RI",
99
+ "Valenciana": "VC",
100
+ }
78
101
  supported_languages = ("en_US", "es", "uk")
79
102
 
80
103
  def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays
@@ -0,0 +1,227 @@
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 CONTRIBUTORS 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 import HolidayBase
16
+ from holidays.calendars import _CustomHinduHolidays, _CustomIslamicHolidays
17
+ from holidays.calendars.gregorian import MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
18
+ from holidays.groups import (
19
+ ChineseCalendarHolidays,
20
+ ChristianHolidays,
21
+ HinduCalendarHolidays,
22
+ InternationalHolidays,
23
+ IslamicHolidays,
24
+ )
25
+
26
+
27
+ class Suriname(
28
+ HolidayBase,
29
+ ChineseCalendarHolidays,
30
+ ChristianHolidays,
31
+ HinduCalendarHolidays,
32
+ InternationalHolidays,
33
+ IslamicHolidays,
34
+ ):
35
+ """Suriname holidays.
36
+
37
+ References:
38
+ * [Besluit Vrije Dagen 1971](https://web.archive.org/web/20250411201210/https://www.sris.sr/wp-content/uploads/2022/10/Besluit-Vrije-dagen-GB-1971-no-78.pdf)
39
+ * https://web.archive.org/web/20240416223555/https://gov.sr/wp-content/uploads/2022/09/arbeidswet.pdf
40
+ * [S.B. 2007 no. 98](https://web.archive.org/web/20250411204836/https://www.sris.sr/wp-content/uploads/2021/10/SB-2007-no-98-besluit-vrije-dagen.pdf)
41
+ * [S.B. 2012 no. 21](https://web.archive.org/web/20250411204754/https://www.sris.sr/wp-content/uploads/2021/10/SB-2012-no-21-besluit-vrije-dagen.pdf)
42
+ * [S.B. 2021 no. 27](https://web.archive.org/web/20250411210516/https://www.sris.sr/wp-content/uploads/2021/03/S.B.-2021-no.-27-houdende-nadere-wijziging-van-het-Besluit-Vrije-Dagen-1971.pdf)
43
+ * [S.B. 2024 no. 167](https://web.archive.org/web/20250411211129/https://www.sris.sr/wp-content/uploads/2025/01/S.B.-2024-no.-167-Algemene-termijnenwet.pdf)
44
+
45
+ Note:
46
+ The oldest decree available online that underpins the public holidays defined here
47
+ for Suriname is Besluit Vrije Dagen 1971 of April 22, 1971.
48
+
49
+ The S.B. 2024 no. 167 law only applies to prolongations of terms specified in contracts
50
+ and other similar legal documents, and does not apply to labor agreements (and days off).
51
+ """
52
+
53
+ country = "SR"
54
+ default_language = "nl"
55
+ # %s (estimated).
56
+ estimated_label = tr("%s (geschat)")
57
+ start_year = 1972
58
+ supported_languages = ("en_US", "nl")
59
+
60
+ def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
61
+ """
62
+ Args:
63
+ islamic_show_estimated:
64
+ Whether to add "estimated" label to Islamic holidays name
65
+ if holiday date is estimated.
66
+ """
67
+ ChineseCalendarHolidays.__init__(self)
68
+ ChristianHolidays.__init__(self)
69
+ HinduCalendarHolidays.__init__(self, cls=SurinameHinduHolidays)
70
+ InternationalHolidays.__init__(self)
71
+ IslamicHolidays.__init__(
72
+ self, cls=SurinameIslamicHolidays, show_estimated=islamic_show_estimated
73
+ )
74
+ super().__init__(*args, **kwargs)
75
+
76
+ def _populate_public_holidays(self):
77
+ # New Year's Day.
78
+ self._add_new_years_day(tr("Nieuwjaarsdag"))
79
+
80
+ if 1981 <= self._year <= 1992 or 2012 <= self._year <= 2020:
81
+ # Day of Liberation and Renewal.
82
+ self._add_holiday_feb_25(tr("Dag van Bevrijding en Vernieuwing"))
83
+
84
+ # Good Friday.
85
+ self._add_good_friday(tr("Goede Vrijdag"))
86
+
87
+ # Easter Monday.
88
+ self._add_easter_monday(tr("Tweede Paasdag"))
89
+
90
+ if self._year <= 1975:
91
+ # Birthday of H.M. the Queen.
92
+ self._add_holiday_apr_30(tr("Verjaardag van H.M. de Koningin"))
93
+
94
+ # Labor Day.
95
+ self._add_labor_day(tr("Dag van de Arbeid"))
96
+
97
+ self._add_holiday_jul_1(
98
+ # Day of Freedoms.
99
+ tr("Keti Koti Dey") if 2008 <= self._year <= 2024 else tr("Dag der Vrijheden")
100
+ )
101
+
102
+ if self._year >= 2007:
103
+ # Indigenous People Day.
104
+ self._add_holiday_aug_9(tr("Dag der Inheemsen"))
105
+
106
+ if self._year >= 2012:
107
+ # Day of the Maroons.
108
+ self._add_holiday_oct_10(tr("Dag der Marrons"))
109
+
110
+ if self._year >= 1976:
111
+ name = (
112
+ # Independence Day.
113
+ tr("Onafhankelijkheidsdag")
114
+ if self._year >= 2008
115
+ # Republic Day.
116
+ else tr("Dag van de Republiek")
117
+ )
118
+ self._add_holiday_nov_25(name)
119
+
120
+ # Christmas Day.
121
+ self._add_christmas_day(tr("Eerste Kerstdag"))
122
+
123
+ # Second Day of Christmas.
124
+ self._add_christmas_day_two(tr("Tweede Kerstdag"))
125
+
126
+ # Holi.
127
+ self._add_holi(tr("Holi-Phagwa"))
128
+
129
+ if self._year >= 2012:
130
+ # Diwali.
131
+ self._add_diwali(tr("Divali"))
132
+
133
+ # Eid al-Fitr.
134
+ self._add_eid_al_fitr_day(tr("Ied-Ul-Fitre"))
135
+
136
+ if self._year >= 2012:
137
+ # Eid al-Adha.
138
+ self._add_eid_al_adha_day(tr("Ied-Ul-Adha"))
139
+
140
+ if self._year >= 2022:
141
+ # Chinese New Year.
142
+ self._add_chinese_new_years_day(tr("Chinees Nieuwjaar"))
143
+
144
+
145
+ class SurinameHinduHolidays(_CustomHinduHolidays):
146
+ # https://www.timeanddate.com/holidays/suriname/holi-phagwa
147
+ HOLI_DATES = {
148
+ 2015: (MAR, 6),
149
+ 2016: (MAR, 23),
150
+ 2017: (MAR, 12),
151
+ 2018: (MAR, 2),
152
+ 2019: (MAR, 21),
153
+ 2020: (MAR, 9),
154
+ 2021: (MAR, 28),
155
+ 2022: (MAR, 18),
156
+ 2023: (MAR, 7),
157
+ 2024: (MAR, 25),
158
+ 2025: (MAR, 14),
159
+ 2026: (MAR, 3),
160
+ 2027: (MAR, 22),
161
+ 2028: (MAR, 11),
162
+ 2029: (MAR, 28),
163
+ 2030: (MAR, 19),
164
+ }
165
+
166
+ # https://www.timeanddate.com/holidays/suriname/diwali
167
+ DIWALI_DATES = {
168
+ 2014: (OCT, 23),
169
+ 2015: (NOV, 11),
170
+ 2016: (OCT, 30),
171
+ 2017: (OCT, 19),
172
+ 2018: (NOV, 7),
173
+ 2019: (OCT, 27),
174
+ 2020: (NOV, 14),
175
+ 2021: (NOV, 4),
176
+ 2022: (OCT, 24),
177
+ 2023: (NOV, 12),
178
+ 2024: (OCT, 31),
179
+ 2025: (OCT, 20),
180
+ 2026: (NOV, 8),
181
+ 2027: (OCT, 28),
182
+ 2028: (OCT, 17),
183
+ 2029: (NOV, 5),
184
+ 2030: (OCT, 25),
185
+ }
186
+
187
+
188
+ class SurinameIslamicHolidays(_CustomIslamicHolidays):
189
+ # https://www.timeanddate.com/holidays/suriname/eid-al-fitr
190
+ EID_AL_FITR_DATES = {
191
+ 2014: (JUL, 29),
192
+ 2015: (JUL, 18),
193
+ 2016: (JUL, 7),
194
+ 2017: (JUN, 26),
195
+ 2018: (JUN, 15),
196
+ 2019: (JUN, 5),
197
+ 2020: (MAY, 24),
198
+ 2021: (MAY, 13),
199
+ 2022: (MAY, 2),
200
+ 2023: (APR, 22),
201
+ 2024: (APR, 10),
202
+ 2025: (MAR, 31),
203
+ }
204
+
205
+ # https://www.timeanddate.com/holidays/suriname/eid-al-adha
206
+ EID_AL_ADHA_DATES = {
207
+ 2014: (OCT, 5),
208
+ 2015: (SEP, 24),
209
+ 2016: (SEP, 13),
210
+ 2017: (SEP, 2),
211
+ 2018: (AUG, 21),
212
+ 2019: (AUG, 12),
213
+ 2020: (JUL, 31),
214
+ 2021: (JUL, 20),
215
+ 2022: (JUL, 9),
216
+ 2023: (JUN, 29),
217
+ 2024: (JUN, 16),
218
+ 2025: (JUN, 7),
219
+ }
220
+
221
+
222
+ class SR(Suriname):
223
+ pass
224
+
225
+
226
+ class SUR(Suriname):
227
+ pass
@@ -4,7 +4,7 @@
4
4
  # specific sets of holidays on the fly. It aims to make determining whether a
5
5
  # specific date is a holiday as fast and flexible as possible.
6
6
  #
7
- # Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
7
+ # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
8
8
  # dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
9
9
  # ryanss <ryanssdev@icloud.com> (c) 2014-2017
10
10
  # Website: https://github.com/vacanza/holidays