holidays 0.54__py3-none-any.whl → 0.56__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 (115) hide show
  1. holidays/__init__.py +1 -1
  2. holidays/countries/__init__.py +3 -0
  3. holidays/countries/algeria.py +11 -0
  4. holidays/countries/australia.py +1 -1
  5. holidays/countries/austria.py +10 -10
  6. holidays/countries/bangladesh.py +2 -0
  7. holidays/countries/bosnia_and_herzegovina.py +8 -12
  8. holidays/countries/brunei.py +23 -1
  9. holidays/countries/cambodia.py +20 -3
  10. holidays/countries/canada.py +6 -6
  11. holidays/countries/croatia.py +1 -1
  12. holidays/countries/cyprus.py +1 -1
  13. holidays/countries/dominica.py +130 -0
  14. holidays/countries/dominican_republic.py +7 -12
  15. holidays/countries/egypt.py +2 -0
  16. holidays/countries/haiti.py +134 -0
  17. holidays/countries/hongkong.py +1 -1
  18. holidays/countries/hungary.py +6 -0
  19. holidays/countries/ireland.py +6 -6
  20. holidays/countries/isle_of_man.py +1 -0
  21. holidays/countries/israel.py +2 -1
  22. holidays/countries/italy.py +113 -5
  23. holidays/countries/jordan.py +5 -0
  24. holidays/countries/kuwait.py +5 -0
  25. holidays/countries/laos.py +24 -62
  26. holidays/countries/liechtenstein.py +1 -1
  27. holidays/countries/luxembourg.py +1 -1
  28. holidays/countries/malaysia.py +16 -38
  29. holidays/countries/malta.py +3 -3
  30. holidays/countries/new_zealand.py +68 -43
  31. holidays/countries/philippines.py +215 -26
  32. holidays/countries/portugal.py +7 -7
  33. holidays/countries/russia.py +382 -3
  34. holidays/countries/samoa.py +72 -0
  35. holidays/countries/singapore.py +8 -0
  36. holidays/countries/slovakia.py +1 -1
  37. holidays/countries/spain.py +8 -8
  38. holidays/countries/switzerland.py +3 -3
  39. holidays/countries/ukraine.py +48 -43
  40. holidays/countries/united_kingdom.py +12 -22
  41. holidays/countries/united_states.py +2 -2
  42. holidays/groups/christian.py +19 -0
  43. holidays/locale/ar/LC_MESSAGES/CA.mo +0 -0
  44. holidays/locale/ar/LC_MESSAGES/CA.po +6 -6
  45. holidays/locale/ar/LC_MESSAGES/UA.mo +0 -0
  46. holidays/locale/ar/LC_MESSAGES/UA.po +26 -19
  47. holidays/locale/de/LC_MESSAGES/AT.po +6 -6
  48. holidays/locale/de/LC_MESSAGES/CH.po +3 -3
  49. holidays/locale/de/LC_MESSAGES/LI.po +1 -1
  50. holidays/locale/de/LC_MESSAGES/LU.po +1 -1
  51. holidays/locale/en_CA/LC_MESSAGES/CA.po +6 -6
  52. holidays/locale/en_US/LC_MESSAGES/AT.mo +0 -0
  53. holidays/locale/en_US/LC_MESSAGES/AT.po +14 -14
  54. holidays/locale/en_US/LC_MESSAGES/BG.mo +0 -0
  55. holidays/locale/en_US/LC_MESSAGES/BG.po +3 -3
  56. holidays/locale/en_US/LC_MESSAGES/CA.mo +0 -0
  57. holidays/locale/en_US/LC_MESSAGES/CA.po +11 -11
  58. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  59. holidays/locale/en_US/LC_MESSAGES/CH.po +9 -8
  60. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  61. holidays/locale/en_US/LC_MESSAGES/ES.po +16 -16
  62. holidays/locale/en_US/LC_MESSAGES/HR.mo +0 -0
  63. holidays/locale/en_US/LC_MESSAGES/HR.po +4 -4
  64. holidays/locale/en_US/LC_MESSAGES/HT.mo +0 -0
  65. holidays/locale/en_US/LC_MESSAGES/HT.po +127 -0
  66. holidays/locale/en_US/LC_MESSAGES/LI.mo +0 -0
  67. holidays/locale/en_US/LC_MESSAGES/LI.po +4 -4
  68. holidays/locale/en_US/LC_MESSAGES/LU.mo +0 -0
  69. holidays/locale/en_US/LC_MESSAGES/LU.po +4 -4
  70. holidays/locale/en_US/LC_MESSAGES/MT.mo +0 -0
  71. holidays/locale/en_US/LC_MESSAGES/MT.po +8 -8
  72. holidays/locale/en_US/LC_MESSAGES/PT.mo +0 -0
  73. holidays/locale/en_US/LC_MESSAGES/PT.po +16 -16
  74. holidays/locale/en_US/LC_MESSAGES/SK.mo +0 -0
  75. holidays/locale/en_US/LC_MESSAGES/SK.po +4 -4
  76. holidays/locale/en_US/LC_MESSAGES/UA.mo +0 -0
  77. holidays/locale/en_US/LC_MESSAGES/UA.po +25 -19
  78. holidays/locale/es/LC_MESSAGES/ES.po +7 -7
  79. holidays/locale/es/LC_MESSAGES/HT.mo +0 -0
  80. holidays/locale/es/LC_MESSAGES/HT.po +127 -0
  81. holidays/locale/fr/LC_MESSAGES/CA.mo +0 -0
  82. holidays/locale/fr/LC_MESSAGES/CA.po +6 -6
  83. holidays/locale/fr/LC_MESSAGES/CH.po +3 -3
  84. holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
  85. holidays/locale/fr/LC_MESSAGES/LU.po +2 -2
  86. holidays/locale/fr_HT/LC_MESSAGES/HT.mo +0 -0
  87. holidays/locale/fr_HT/LC_MESSAGES/HT.po +127 -0
  88. holidays/locale/hr/LC_MESSAGES/HR.po +1 -1
  89. holidays/locale/ht/LC_MESSAGES/HT.mo +0 -0
  90. holidays/locale/ht/LC_MESSAGES/HT.po +127 -0
  91. holidays/locale/it/LC_MESSAGES/CH.po +3 -3
  92. holidays/locale/lb/LC_MESSAGES/LU.po +1 -1
  93. holidays/locale/mt/LC_MESSAGES/MT.po +3 -3
  94. holidays/locale/pt_PT/LC_MESSAGES/PT.po +7 -7
  95. holidays/locale/sk/LC_MESSAGES/SK.po +1 -1
  96. holidays/locale/th/LC_MESSAGES/CA.mo +0 -0
  97. holidays/locale/th/LC_MESSAGES/CA.po +6 -6
  98. holidays/locale/uk/LC_MESSAGES/AT.po +6 -6
  99. holidays/locale/uk/LC_MESSAGES/CH.po +3 -3
  100. holidays/locale/uk/LC_MESSAGES/ES.po +7 -7
  101. holidays/locale/uk/LC_MESSAGES/HR.po +1 -1
  102. holidays/locale/uk/LC_MESSAGES/LI.po +1 -1
  103. holidays/locale/uk/LC_MESSAGES/LU.po +1 -1
  104. holidays/locale/uk/LC_MESSAGES/PT.po +7 -7
  105. holidays/locale/uk/LC_MESSAGES/SK.po +1 -1
  106. holidays/locale/uk/LC_MESSAGES/UA.mo +0 -0
  107. holidays/locale/uk/LC_MESSAGES/UA.po +24 -18
  108. holidays/registry.py +3 -0
  109. holidays/utils.py +3 -3
  110. {holidays-0.54.dist-info → holidays-0.56.dist-info}/METADATA +24 -9
  111. {holidays-0.54.dist-info → holidays-0.56.dist-info}/RECORD +115 -104
  112. {holidays-0.54.dist-info → holidays-0.56.dist-info}/WHEEL +1 -1
  113. {holidays-0.54.dist-info → holidays-0.56.dist-info}/AUTHORS +0 -0
  114. {holidays-0.54.dist-info → holidays-0.56.dist-info}/LICENSE +0 -0
  115. {holidays-0.54.dist-info → holidays-0.56.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,134 @@
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/python-holidays
11
+ # License: MIT (see LICENSE file)
12
+
13
+ from gettext import gettext as tr
14
+
15
+ from holidays.constants import OPTIONAL, PUBLIC
16
+ from holidays.groups import ChristianHolidays, InternationalHolidays
17
+ from holidays.holiday_base import HolidayBase
18
+
19
+
20
+ class Haiti(HolidayBase, ChristianHolidays, InternationalHolidays):
21
+ """
22
+ References:
23
+ - https://www.wipo.int/wipolex/en/legislation/details/7837
24
+ - https://haitiwonderland.com/haiti/histoire/jours-feries-en-haiti/27
25
+ - https://www.haiti-reference.info/pages/plan/generalites/calendrier-dhaiti/
26
+ """
27
+
28
+ country = "HT"
29
+ supported_categories = (OPTIONAL, PUBLIC)
30
+ default_language = "fr_HT"
31
+ supported_languages = ("en_US", "es", "fr_HT", "ht")
32
+
33
+ def __init__(self, *args, **kwargs):
34
+ ChristianHolidays.__init__(self)
35
+ InternationalHolidays.__init__(self)
36
+ super().__init__(*args, **kwargs)
37
+
38
+ def _populate_public_holidays(self):
39
+ # 1987 Constitution.
40
+ if self._year <= 1986:
41
+ return None
42
+
43
+ # ARTICLE 275.1 : National Holidays.
44
+ # Both Battle of Vertieres Day and Armed Forces Day are on Nov 18, declared discretely.
45
+
46
+ # National Independence Day.
47
+ self._add_holiday_jan_1(tr("Fête de l'Indépendance Nationale"))
48
+
49
+ # Ancestry Day.
50
+ self._add_holiday_jan_2(tr("Jour des Aïeux"))
51
+
52
+ # Agriculture and Labor Day.
53
+ self._add_labor_day(tr("Fête de l'Agriculture et du Travail"))
54
+
55
+ # Flag Day and University Day.
56
+ self._add_holiday_may_18(tr("Fête du Drapeau et de l'Université"))
57
+
58
+ # Commemoration of the Battle of Vertieres.
59
+ self._add_holiday_nov_18(tr("Commémoration de la Bataille de Vertières"))
60
+
61
+ # Armed Forces Day.
62
+ self._add_holiday_nov_18(tr("Jour des Forces Armées"))
63
+
64
+ # Other Common Holidays.
65
+
66
+ # New Year's Day.
67
+ self._add_new_years_day(tr("Nouvel An"))
68
+
69
+ # Carnival.
70
+ self._add_carnival_sunday(tr("Carnaval"))
71
+
72
+ # Shrove Monday.
73
+ self._add_carnival_monday(tr("Lundi Gras"))
74
+
75
+ # Fat Tuesday.
76
+ self._add_carnival_tuesday(tr("Mardi Gras"))
77
+
78
+ # Good Friday.
79
+ self._add_good_friday(tr("Vendredi Saint"))
80
+
81
+ # Easter.
82
+ self._add_easter_sunday(tr("Pâques"))
83
+
84
+ # Corpus Christi.
85
+ self._add_corpus_christi_day(tr("Fête-Dieu"))
86
+
87
+ # Assumption of Mary.
88
+ self._add_assumption_of_mary_day(tr("Assomption de Marie"))
89
+
90
+ # Death of Dessalines.
91
+ self._add_holiday_oct_17(tr("Mort de Dessalines"))
92
+
93
+ # All Saints' Day.
94
+ self._add_all_saints_day(tr("La Toussaint"))
95
+
96
+ # Day of the Dead.
97
+ self._add_all_souls_day(tr("Fête des Morts"))
98
+
99
+ # Christmas Day.
100
+ self._add_christmas_day(tr("Noël"))
101
+
102
+ def _populate_optional_holidays(self):
103
+ # 1987 Constitution.
104
+ if self._year <= 1986:
105
+ return None
106
+
107
+ # Ash Wednesday.
108
+ self._add_ash_wednesday(tr("Mercredi des Cendres"))
109
+
110
+ # Maundy Thursday.
111
+ self._add_holy_thursday(tr("Jeudi Saint"))
112
+
113
+ # National Sovereignty Day.
114
+ self._add_holiday_may_23(tr("Fête de la Souveraineté Nationale"))
115
+
116
+ # Feast of Lady of Perpetual Help, Patroness of Haiti.
117
+ self._add_holiday_jun_27(tr("Fête de Notre-Dame du Perpétuel Secours, patronne d'Haiti"))
118
+
119
+ # Ascension.
120
+ self._add_ascension_thursday(tr("Ascension"))
121
+
122
+ # Birth Anniversary of Jean-Jacques Dessalines.
123
+ self._add_holiday_sep_20(tr("Anniversaire de Naissance de Jean-Jacques Dessalines"))
124
+
125
+ # Discovery Day.
126
+ self._add_holiday_dec_5(tr("Jour de la Découverte"))
127
+
128
+
129
+ class HT(Haiti):
130
+ pass
131
+
132
+
133
+ class HTI(Haiti):
134
+ pass
@@ -277,7 +277,7 @@ class HongKong(
277
277
  # Easter Monday.
278
278
  if self._year >= 1968 and dt_qingming == self._easter_sunday:
279
279
  # 復活節星期一翌日.
280
- self._add_holiday_2_days_past_easter("The day following Easter Monday")
280
+ self._add_easter_tuesday("The day following Easter Monday")
281
281
  else:
282
282
  # 復活節星期一.
283
283
  self._add_easter_monday("Easter Monday")
@@ -39,6 +39,7 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
39
39
  - `2021 <https://njt.hu/jogszabaly/2020-14-20-7Q>`_
40
40
  - `2022 <https://njt.hu/jogszabaly/2021-23-20-7Q>`_
41
41
  - `2024 <https://njt.hu/jogszabaly/2023-15-20-8P>`_
42
+ - `2025 <https://njt.hu/jogszabaly/2024-11-20-2X>`_
42
43
  """
43
44
 
44
45
  country = "HU"
@@ -193,4 +194,9 @@ class HungaryStaticHolidays:
193
194
  (DEC, 24, DEC, 7),
194
195
  (DEC, 27, DEC, 14),
195
196
  ),
197
+ 2025: (
198
+ (MAY, 2, MAY, 17),
199
+ (OCT, 24, OCT, 18),
200
+ (DEC, 24, DEC, 13),
201
+ ),
196
202
  }
@@ -38,17 +38,17 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
38
38
  if self._year >= 1975:
39
39
  self._add_new_years_day("New Year's Day")
40
40
 
41
- # St. Brigid's Day.
41
+ # Saint Brigid's Day.
42
42
  if self._year >= 2023:
43
- name = "St. Brigid's Day"
43
+ name = "Saint Brigid's Day"
44
44
  if self._is_friday(FEB, 1):
45
45
  self._add_holiday_feb_1(name)
46
46
  else:
47
47
  self._add_holiday_1st_mon_from_feb_1(name)
48
48
 
49
- # St. Patrick's Day.
49
+ # Saint Patrick's Day.
50
50
  if self._year >= 1903:
51
- self._add_holiday_mar_17("St. Patrick's Day")
51
+ self._add_holiday_mar_17("Saint Patrick's Day")
52
52
 
53
53
  # Easter Monday.
54
54
  self._add_easter_monday("Easter Monday")
@@ -78,8 +78,8 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
78
78
  # Christmas Day.
79
79
  self._add_christmas_day("Christmas Day")
80
80
 
81
- # St. Stephen's Day.
82
- self._add_christmas_day_two("St. Stephen's Day")
81
+ # Saint Stephen's Day.
82
+ self._add_christmas_day_two("Saint Stephen's Day")
83
83
 
84
84
 
85
85
  class IE(Ireland):
@@ -20,6 +20,7 @@ class IsleOfMan(UnitedKingdom):
20
20
 
21
21
  country = "IM"
22
22
  subdivisions = () # Override UnitedKingdom subdivisions.
23
+ subdivisions_aliases = {} # Override UnitedKingdom subdivisions aliases.
23
24
 
24
25
  def __init__(self, *args, **kwargs): # Override UnitedKingdom __init__().
25
26
  ChristianHolidays.__init__(self)
@@ -13,7 +13,7 @@
13
13
  from gettext import gettext as tr
14
14
 
15
15
  from holidays.calendars import _HebrewLunisolar
16
- from holidays.calendars.gregorian import _timedelta
16
+ from holidays.calendars.gregorian import _timedelta, FRI, SAT
17
17
  from holidays.calendars.hebrew import (
18
18
  HANUKKAH,
19
19
  INDEPENDENCE_DAY,
@@ -53,6 +53,7 @@ class Israel(ObservedHolidayBase):
53
53
  observed_label = tr("(נצפה) %s")
54
54
  supported_categories = (OPTIONAL, PUBLIC, SCHOOL)
55
55
  supported_languages = ("en_US", "he", "uk")
56
+ weekend = {FRI, SAT}
56
57
 
57
58
  def __init__(self, *args, **kwargs):
58
59
  kwargs.setdefault("observed_rule", FRI_TO_PREV_THU + SAT_TO_PREV_THU)
@@ -141,8 +141,119 @@ class Italy(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHoliday
141
141
  "Trani",
142
142
  "Urbino",
143
143
  )
144
-
145
- _deprecated_subdivisions = ("Forlì",)
144
+ subdivisions_aliases = {
145
+ # Provinces.
146
+ "Agrigento": "AG",
147
+ "Alessandria": "AL",
148
+ "Ancona": "AN",
149
+ "Aosta": "AO",
150
+ "Ascoli Piceno": "AP",
151
+ "L'Aquila": "AQ",
152
+ "Arezzo": "AR",
153
+ "Asti": "AT",
154
+ "Avellino": "AV",
155
+ "Bari": "BA",
156
+ "Bergamo": "BG",
157
+ "Biella": "BI",
158
+ "Belluno": "BL",
159
+ "Benevento": "BN",
160
+ "Bologna": "BO",
161
+ "Brindisi": "BR",
162
+ "Brescia": "BS",
163
+ "Barletta-Andria-Trani": "BT",
164
+ "Bolzano": "BZ",
165
+ "Cagliari": "CA",
166
+ "Campobasso": "CB",
167
+ "Caserta": "CE",
168
+ "Chieti": "CH",
169
+ "Caltanissetta": "CL",
170
+ "Cuneo": "CN",
171
+ "Como": "CO",
172
+ "Cremona": "CR",
173
+ "Cosenza": "CS",
174
+ "Catania": "CT",
175
+ "Catanzaro": "CZ",
176
+ "Enna": "EN",
177
+ "Forli-Cesena": "FC",
178
+ "Forlì-Cesena": "FC",
179
+ "Ferrara": "FE",
180
+ "Foggia": "FG",
181
+ "Firenze": "FI",
182
+ "Fermo": "FM",
183
+ "Frosinone": "FR",
184
+ "Genova": "GE",
185
+ "Gorizia": "GO",
186
+ "Grosseto": "GR",
187
+ "Imperia": "IM",
188
+ "Isernia": "IS",
189
+ "Crotone": "KR",
190
+ "Lecco": "LC",
191
+ "Lecce": "LE",
192
+ "Livorno": "LI",
193
+ "Lodi": "LO",
194
+ "Latina": "LT",
195
+ "Lucca": "LU",
196
+ "Monza e Brianza": "MB",
197
+ "Macerata": "MC",
198
+ "Messina": "ME",
199
+ "Milano": "MI",
200
+ "Mantova": "MN",
201
+ "Modena": "MO",
202
+ "Massa-Carrara": "MS",
203
+ "Matera": "MT",
204
+ "Napoli": "NA",
205
+ "Novara": "NO",
206
+ "Nuoro": "NU",
207
+ "Oristano": "OR",
208
+ "Palermo": "PA",
209
+ "Piacenza": "PC",
210
+ "Padova": "PD",
211
+ "Pescara": "PE",
212
+ "Perugia": "PG",
213
+ "Pisa": "PI",
214
+ "Pordenone": "PN",
215
+ "Prato": "PO",
216
+ "Parma": "PR",
217
+ "Pistoia": "PT",
218
+ "Pesaro e Urbino": "PU",
219
+ "Pavia": "PV",
220
+ "Potenza": "PZ",
221
+ "Ravenna": "RA",
222
+ "Reggio Calabria": "RC",
223
+ "Reggio Emilia": "RE",
224
+ "Ragusa": "RG",
225
+ "Rieti": "RI",
226
+ "Roma": "RM",
227
+ "Rimini": "RN",
228
+ "Rovigo": "RO",
229
+ "Salerno": "SA",
230
+ "Siena": "SI",
231
+ "Sondrio": "SO",
232
+ "La Spezia": "SP",
233
+ "Siracusa": "SR",
234
+ "Sassari": "SS",
235
+ "Sud Sardegna": "SU",
236
+ "Savona": "SV",
237
+ "Taranto": "TA",
238
+ "Teramo": "TE",
239
+ "Trento": "TN",
240
+ "Torino": "TO",
241
+ "Trapani": "TP",
242
+ "Terni": "TR",
243
+ "Trieste": "TS",
244
+ "Treviso": "TV",
245
+ "Udine": "UD",
246
+ "Varese": "VA",
247
+ "Verbano-Cusio-Ossola": "VB",
248
+ "Vercelli": "VC",
249
+ "Venezia": "VE",
250
+ "Vicenza": "VI",
251
+ "Verona": "VR",
252
+ "Viterbo": "VT",
253
+ "Vibo Valentia": "VV",
254
+ # Cities.
255
+ "Forlì": "Forli",
256
+ }
146
257
 
147
258
  def __init__(self, *args, **kwargs):
148
259
  ChristianHolidays.__init__(self)
@@ -208,9 +319,6 @@ class Italy(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHoliday
208
319
  # Saint Stephen's Day.
209
320
  self._add_christmas_day_two("Santo Stefano")
210
321
 
211
- if self.subdiv == "Forlì":
212
- self._populate_subdiv_forli_public_holidays()
213
-
214
322
  def _populate_subdiv_ag_public_holidays(self):
215
323
  self._add_holiday_feb_25("San Gerlando")
216
324
 
@@ -12,6 +12,7 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
+ from holidays.calendars.gregorian import THU, FRI, SAT
15
16
  from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
16
17
  from holidays.holiday_base import HolidayBase
17
18
 
@@ -36,6 +37,10 @@ class Jordan(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolid
36
37
  super().__init__(*args, **kwargs)
37
38
 
38
39
  def _populate_public_holidays(self):
40
+ # The resting days are Friday and Saturday since Jan 6, 2000.
41
+ # https://archive.wfn.org/2000/01/msg00078.html
42
+ self.weekend = {FRI, SAT} if self._year >= 2000 else {THU, FRI}
43
+
39
44
  # New Year's Day.
40
45
  self._add_new_years_day(tr("رأس السنة الميلادية"))
41
46
 
@@ -12,6 +12,7 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
+ from holidays.calendars.gregorian import THU, FRI, SAT
15
16
  from holidays.groups import InternationalHolidays, IslamicHolidays
16
17
  from holidays.holiday_base import HolidayBase
17
18
 
@@ -36,6 +37,10 @@ class Kuwait(HolidayBase, InternationalHolidays, IslamicHolidays):
36
37
  super().__init__(*args, **kwargs)
37
38
 
38
39
  def _populate_public_holidays(self):
40
+ # The resting days are Friday and Saturday since Sep 1, 2007.
41
+ # https://www.arabnews.com/node/298933
42
+ self.weekend = {FRI, SAT} if self._year >= 2007 else {THU, FRI}
43
+
39
44
  # New Year's Day.
40
45
  self._add_new_years_day(tr("رأس السنة الميلادية"))
41
46
 
@@ -12,18 +12,11 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
- from holidays.calendars.gregorian import JAN, MAR, APR, MAY, JUL, OCT, DEC
15
+ from holidays.calendars.gregorian import JAN, APR, JUL
16
16
  from holidays.calendars.thai import KHMER_CALENDAR
17
17
  from holidays.constants import BANK, PUBLIC, SCHOOL, WORKDAY
18
18
  from holidays.groups import InternationalHolidays, ThaiCalendarHolidays, StaticHolidays
19
- from holidays.observed_holiday_base import (
20
- ObservedHolidayBase,
21
- THU_FRI_TO_NEXT_MON,
22
- FRI_TO_NEXT_TUE,
23
- SAT_TO_NEXT_TUE,
24
- SAT_SUN_TO_NEXT_MON,
25
- SAT_SUN_TO_NEXT_WED,
26
- )
19
+ from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY
27
20
 
28
21
 
29
22
  class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalendarHolidays):
@@ -40,7 +33,8 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
40
33
  https://asean.org/wp-content/uploads/2022/12/ASEAN-Public-Holidays-2023.pdf
41
34
  https://www.timeanddate.com/holidays/laos/
42
35
  https://www.bcel.com.la/bcel/bcel-calendar.html?y=2022
43
- https://www.bcel.com.la/bcel/bcel-calendar.html?year=2023
36
+ https://www.bcel.com.la/bcel/bcel-calendar.html?y=2023
37
+ https://www.bcel.com.la/bcel/bcel-calendar.html?y=2024
44
38
  http://www.lsx.com.la/cal/getStockCalendar.do?lang=lo (from 2011 onwards)
45
39
 
46
40
  !!! If Public Holiday falls on weekends, (in lieu) on workday !!!
@@ -51,6 +45,8 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
51
45
  - Saturdays and Sundays shall be restdays each week.
52
46
  - In-Lieu holidays shall be given if it fall on the weekends.
53
47
 
48
+ Although in-lieus has been de facto observed since at least 2012.
49
+
54
50
  Limitations:
55
51
 
56
52
  - Laotian holidays only works from 1976 onwards, and are only 100% accurate from 2018 onwards.
@@ -75,8 +71,8 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
75
71
  InternationalHolidays.__init__(self)
76
72
  ThaiCalendarHolidays.__init__(self, KHMER_CALENDAR)
77
73
  StaticHolidays.__init__(self, cls=LaosStaticHolidays)
78
- kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
79
- kwargs.setdefault("observed_since", 2018)
74
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
75
+ kwargs.setdefault("observed_since", 2012)
80
76
  super().__init__(*args, **kwargs)
81
77
 
82
78
  def _populate_bank_holidays(self):
@@ -126,27 +122,31 @@ class Laos(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiCalen
126
122
  # ວັນແມ່ຍິງສາກົນ
127
123
  # Status: In-Use.
128
124
  # Only acts as day off for Women.
125
+ # No in-lieus are observed in 2014.
129
126
 
130
127
  # International Women's Rights Day.
131
- self._add_observed(self._add_womens_day(tr("ວັນແມ່ຍິງສາກົນ")))
128
+ womens_day = self._add_womens_day(tr("ວັນແມ່ຍິງສາກົນ"))
129
+ if self._year != 2014:
130
+ self._add_observed(womens_day)
132
131
 
133
132
  # ບຸນປີໃໝ່ລາວ
134
133
  # Status: In-Use.
135
134
  # Celebrated for 3 days from 14-16 April annualy.
136
135
  # Observed dates prior to 2018 are assigned manually.
137
- # - CASE 1: THU-FRI-SAT -> in lieu on MON.
138
- # - CASE 2: FRI-SAT-SUN -> in lieu on MON-TUE.
139
- # - CASE 3: SAT-SUN-MON -> in lieu on TUE-WED.
140
- # - CASE 4: SUN-MON-TUE -> in lieu on WED.
141
136
 
142
137
  # Lao New Year's Day.
143
138
  name = tr("ບຸນປີໃໝ່ລາວ")
144
- dt = self._add_holiday_apr_14(name)
145
- self._add_holiday_apr_15(name)
146
- self._add_holiday_apr_16(name)
147
-
148
- self._add_observed(dt, rule=THU_FRI_TO_NEXT_MON + SAT_TO_NEXT_TUE)
149
- self._add_observed(dt, rule=FRI_TO_NEXT_TUE + SAT_SUN_TO_NEXT_WED)
139
+ songkran_years_apr_13_15 = {2012, 2017}
140
+ songkran_years_apr_13_16 = {2016, 2020, 2024}
141
+ dts_observed = set()
142
+ if self._year in songkran_years_apr_13_15.union(songkran_years_apr_13_16):
143
+ dts_observed.add(self._add_holiday_apr_13(name))
144
+ dts_observed.add(self._add_holiday_apr_14(name))
145
+ dts_observed.add(self._add_holiday_apr_15(name))
146
+ if self._year not in songkran_years_apr_13_15:
147
+ dts_observed.add(self._add_holiday_apr_16(name))
148
+ for dt in dts_observed:
149
+ self._add_observed(dt)
150
150
 
151
151
  # ວັນກຳມະກອນສາກົນ
152
152
  # Status: In-Use.
@@ -377,9 +377,6 @@ class LaosStaticHolidays:
377
377
  # Special Bank Holiday.
378
378
  special_bank_day_off = tr("ມື້ປິດການໃຫ້ບໍລິການຂອງທະນາຄານຕົວແທນ")
379
379
 
380
- # New Year's Day.
381
- new_year_day = tr("ວັນປີໃໝ່ສາກົນ")
382
-
383
380
  # International Women's Rights Day.
384
381
  international_womens_rights_day = tr("ວັນແມ່ຍິງສາກົນ")
385
382
 
@@ -389,55 +386,20 @@ class LaosStaticHolidays:
389
386
  # Lao New Year's Day (Special).
390
387
  lao_new_year_special = tr("ພັກບຸນປີໃໝ່ລາວ")
391
388
 
392
- # International Labor Day.
393
- international_labor_day = tr("ວັນກຳມະກອນສາກົນ")
394
-
395
389
  # Establishment Day of the Lao Women's Union.
396
390
  lao_womens_union = tr("ວັນສ້າງຕັ້ງສະຫະພັນແມ່ຍິງລາວ")
397
391
 
398
- # Establishment Day of the BOL.
399
- establishment_day_of_bol = tr("ວັນສ້າງຕັ້ງທະນາຄານແຫ່ງ ສປປ ລາວ")
400
-
401
- # Lao National Day.
402
- lao_national_day = tr("ວັນຊາດ")
403
-
404
392
  special_bank_holidays = {
405
393
  2015: (JAN, 2, special_bank_day_off),
406
394
  }
407
395
 
408
- special_bank_holidays_observed = {
409
- 2017: (OCT, 9, establishment_day_of_bol),
410
- }
411
-
412
396
  special_public_holidays = {
413
397
  2015: (APR, 17, lao_new_year_special),
414
- 2016: (
415
- (APR, 13, lao_new_year_special),
416
- (APR, 18, lao_new_year_special),
417
- ),
418
- 2020: (
419
- (APR, 13, lao_new_year_special),
420
- (APR, 17, lao_new_year_special),
421
- ),
422
398
  }
423
399
 
424
400
  special_public_holidays_observed = {
425
401
  2011: (APR, 13, lao_new_year),
426
- 2012: (
427
- (JAN, 2, new_year_day),
428
- (APR, 13, lao_new_year),
429
- (APR, 17, lao_new_year),
430
- (DEC, 3, lao_national_day),
431
- ),
432
- 2013: (APR, 17, lao_new_year),
433
- 2015: (MAR, 9, international_womens_rights_day),
434
- 2016: (MAY, 2, international_labor_day),
435
- 2017: (
436
- (JAN, 2, new_year_day),
437
- (APR, 13, lao_new_year),
438
- (APR, 17, lao_new_year),
439
- (DEC, 4, lao_national_day),
440
- ),
402
+ 2020: (APR, 17, lao_new_year),
441
403
  }
442
404
 
443
405
  special_workday_holidays_observed = {
@@ -84,7 +84,7 @@ class Liechtenstein(HolidayBase, ChristianHolidays, InternationalHolidays):
84
84
  # Christmas Day.
85
85
  self._add_christmas_day(tr("Weihnachten"))
86
86
 
87
- # St. Stephen's Day.
87
+ # Saint Stephen's Day.
88
88
  self._add_christmas_day_two(tr("Stephanstag"))
89
89
 
90
90
  def _populate_bank_holidays(self):
@@ -62,7 +62,7 @@ class Luxembourg(HolidayBase, ChristianHolidays, InternationalHolidays):
62
62
  # Christmas Day.
63
63
  self._add_christmas_day(tr("Chrëschtdag"))
64
64
 
65
- # St. Stephen's Day.
65
+ # Saint Stephen's Day.
66
66
  self._add_christmas_day_two(tr("Stiefesdag"))
67
67
 
68
68
 
@@ -87,41 +87,39 @@ class Malaysia(
87
87
  "15",
88
88
  "16",
89
89
  )
90
- _deprecated_subdivisions = (
91
- "JHR",
92
- "KDH",
93
- "KTN",
94
- "KUL",
95
- "LBN",
96
- "MLK",
97
- "NSN",
98
- "PHG",
99
- "PJY",
100
- "PLS",
101
- "PNG",
102
- "PRK",
103
- "SBH",
104
- "SGR",
105
- "SWK",
106
- "TRG",
107
- )
108
90
  subdivisions_aliases = {
109
91
  "Johor": "01",
92
+ "JHR": "01",
110
93
  "Kedah": "02",
94
+ "KDH": "02",
111
95
  "Kelantan": "03",
96
+ "KTN": "03",
112
97
  "Melaka": "04",
98
+ "MLK": "04",
113
99
  "Negeri Sembilan": "05",
100
+ "NSN": "05",
114
101
  "Pahang": "06",
102
+ "PHG": "06",
115
103
  "Pulau Pinang": "07",
104
+ "PNG": "07",
116
105
  "Perak": "08",
106
+ "PRK": "08",
117
107
  "Perlis": "09",
108
+ "PLS": "09",
118
109
  "Selangor": "10",
110
+ "SGR": "10",
119
111
  "Terengganu": "11",
112
+ "TRG": "11",
120
113
  "Sabah": "12",
114
+ "SBH": "12",
121
115
  "Sarawak": "13",
116
+ "SWK": "13",
122
117
  "WP Kuala Lumpur": "14",
118
+ "KUL": "14",
123
119
  "WP Labuan": "15",
120
+ "LBN": "15",
124
121
  "WP Putrajaya": "16",
122
+ "PJY": "16",
125
123
  }
126
124
  supported_languages = ("en_US", "ms_MY")
127
125
 
@@ -216,26 +214,6 @@ class Malaysia(
216
214
  if self._year <= 1951:
217
215
  return None
218
216
 
219
- deprecated_mapping = {
220
- "JHR": "01",
221
- "KDH": "02",
222
- "KTN": "03",
223
- "KUL": "14",
224
- "LBN": "15",
225
- "MLK": "04",
226
- "NSN": "05",
227
- "PHG": "06",
228
- "PJY": "16",
229
- "PLS": "09",
230
- "PNG": "07",
231
- "PRK": "08",
232
- "SBH": "12",
233
- "SGR": "10",
234
- "SWK": "13",
235
- "TRG": "11",
236
- }
237
- self.subdiv = deprecated_mapping.get(self.subdiv, self.subdiv)
238
-
239
217
  if self.subdiv and self.subdiv not in {"13", "15"}:
240
218
  # Deepavali.
241
219
  self.dts_observed.add(self._add_diwali(tr("Hari Deepavali")))