holidays 0.81__py3-none-any.whl → 0.83__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 (141) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/burmese.py +319 -0
  3. holidays/calendars/hebrew.py +2 -2
  4. holidays/calendars/islamic.py +26 -6
  5. holidays/calendars/thai.py +49 -2
  6. holidays/countries/__init__.py +11 -0
  7. holidays/countries/afghanistan.py +7 -5
  8. holidays/countries/algeria.py +89 -24
  9. holidays/countries/antarctica.py +58 -0
  10. holidays/countries/azerbaijan.py +1 -1
  11. holidays/countries/bouvet_island.py +31 -0
  12. holidays/countries/brazil.py +1 -1
  13. holidays/countries/british_indian_ocean_territory.py +31 -0
  14. holidays/countries/bulgaria.py +6 -1
  15. holidays/countries/canada.py +27 -13
  16. holidays/countries/chile.py +9 -8
  17. holidays/countries/cuba.py +3 -4
  18. holidays/countries/denmark.py +18 -6
  19. holidays/countries/djibouti.py +1 -1
  20. holidays/countries/fiji.py +2 -3
  21. holidays/countries/finland.py +3 -6
  22. holidays/countries/guyana.py +24 -32
  23. holidays/countries/heard_island_and_mcdonald_islands.py +31 -0
  24. holidays/countries/hungary.py +4 -5
  25. holidays/countries/india.py +27 -78
  26. holidays/countries/iran.py +133 -269
  27. holidays/countries/ireland.py +1 -1
  28. holidays/countries/israel.py +1 -1
  29. holidays/countries/japan.py +22 -18
  30. holidays/countries/jordan.py +6 -3
  31. holidays/countries/kuwait.py +6 -3
  32. holidays/countries/macau.py +5 -8
  33. holidays/countries/malaysia.py +14 -3
  34. holidays/countries/mauritius.py +10 -9
  35. holidays/countries/montserrat.py +1 -1
  36. holidays/countries/myanmar.py +194 -0
  37. holidays/countries/nepal.py +11 -30
  38. holidays/countries/netherlands.py +28 -24
  39. holidays/countries/new_zealand.py +75 -31
  40. holidays/countries/nigeria.py +53 -75
  41. holidays/countries/north_korea.py +161 -0
  42. holidays/countries/norway.py +24 -9
  43. holidays/countries/oman.py +6 -2
  44. holidays/countries/paraguay.py +70 -23
  45. holidays/countries/portugal.py +5 -6
  46. holidays/countries/qatar.py +5 -2
  47. holidays/countries/rwanda.py +8 -3
  48. holidays/countries/saudi_arabia.py +6 -5
  49. holidays/countries/serbia.py +5 -0
  50. holidays/countries/slovakia.py +23 -4
  51. holidays/countries/south_africa.py +96 -53
  52. holidays/countries/south_korea.py +6 -1
  53. holidays/countries/spain.py +4 -4
  54. holidays/countries/sri_lanka.py +21 -58
  55. holidays/countries/sudan.py +6 -3
  56. holidays/countries/suriname.py +1 -2
  57. holidays/countries/sweden.py +1 -1
  58. holidays/countries/switzerland.py +255 -6
  59. holidays/countries/taiwan.py +23 -3
  60. holidays/countries/tanzania.py +25 -30
  61. holidays/countries/thailand.py +29 -7
  62. holidays/countries/tonga.py +6 -1
  63. holidays/countries/trinidad_and_tobago.py +7 -2
  64. holidays/countries/ukraine.py +1 -1
  65. holidays/countries/united_arab_emirates.py +9 -2
  66. holidays/countries/united_kingdom.py +1 -1
  67. holidays/countries/united_states.py +18 -2
  68. holidays/countries/uruguay.py +6 -1
  69. holidays/countries/vietnam.py +6 -1
  70. holidays/countries/western_sahara.py +92 -0
  71. holidays/countries/yemen.py +6 -3
  72. holidays/groups/__init__.py +1 -0
  73. holidays/groups/balinese_saka.py +1 -1
  74. holidays/groups/buddhist.py +3 -3
  75. holidays/groups/burmese.py +273 -0
  76. holidays/groups/chinese.py +30 -2
  77. holidays/groups/christian.py +10 -0
  78. holidays/groups/custom.py +8 -2
  79. holidays/groups/eastern.py +26 -0
  80. holidays/groups/hebrew.py +16 -14
  81. holidays/groups/hindu.py +23 -15
  82. holidays/groups/international.py +1 -1
  83. holidays/groups/islamic.py +52 -50
  84. holidays/groups/mongolian.py +6 -3
  85. holidays/groups/sinhala.py +9 -11
  86. holidays/groups/tibetan.py +8 -6
  87. holidays/holiday_base.py +26 -26
  88. holidays/ical.py +6 -4
  89. holidays/locale/ar/LC_MESSAGES/DZ.mo +0 -0
  90. holidays/locale/ar/LC_MESSAGES/EH.mo +0 -0
  91. holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
  92. holidays/locale/de/LC_MESSAGES/CH.mo +0 -0
  93. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  94. holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
  95. holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
  96. holidays/locale/en_US/LC_MESSAGES/DZ.mo +0 -0
  97. holidays/locale/en_US/LC_MESSAGES/EH.mo +0 -0
  98. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  99. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  100. holidays/locale/en_US/LC_MESSAGES/JP.mo +0 -0
  101. holidays/locale/en_US/LC_MESSAGES/KP.mo +0 -0
  102. holidays/locale/en_US/LC_MESSAGES/MM.mo +0 -0
  103. holidays/locale/en_US/LC_MESSAGES/NL.mo +0 -0
  104. holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
  105. holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
  106. holidays/locale/es/LC_MESSAGES/EH.mo +0 -0
  107. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  108. holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
  109. holidays/locale/fr/LC_MESSAGES/CH.mo +0 -0
  110. holidays/locale/fr/LC_MESSAGES/DZ.mo +0 -0
  111. holidays/locale/fr/LC_MESSAGES/EH.mo +0 -0
  112. holidays/locale/fy/LC_MESSAGES/NL.mo +0 -0
  113. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  114. holidays/locale/it/LC_MESSAGES/CH.mo +0 -0
  115. holidays/locale/ja/LC_MESSAGES/JP.mo +0 -0
  116. holidays/locale/ko_KP/LC_MESSAGES/KP.mo +0 -0
  117. holidays/locale/my/LC_MESSAGES/MM.mo +0 -0
  118. holidays/locale/nl/LC_MESSAGES/NL.mo +0 -0
  119. holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
  120. holidays/locale/th/LC_MESSAGES/CH.mo +0 -0
  121. holidays/locale/th/LC_MESSAGES/DK.mo +0 -0
  122. holidays/locale/th/LC_MESSAGES/JP.mo +0 -0
  123. holidays/locale/th/LC_MESSAGES/MM.mo +0 -0
  124. holidays/locale/th/LC_MESSAGES/NL.mo +0 -0
  125. holidays/locale/th/LC_MESSAGES/US.mo +0 -0
  126. holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
  127. holidays/locale/uk/LC_MESSAGES/CH.mo +0 -0
  128. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  129. holidays/locale/uk/LC_MESSAGES/NL.mo +0 -0
  130. holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
  131. holidays/no_holiday_base.py +21 -0
  132. holidays/observed_holiday_base.py +16 -4
  133. holidays/registry.py +8 -0
  134. holidays/utils.py +5 -5
  135. holidays/version.py +1 -1
  136. {holidays-0.81.dist-info → holidays-0.83.dist-info}/METADATA +63 -19
  137. {holidays-0.81.dist-info → holidays-0.83.dist-info}/RECORD +141 -118
  138. {holidays-0.81.dist-info → holidays-0.83.dist-info}/licenses/CONTRIBUTORS +2 -0
  139. {holidays-0.81.dist-info → holidays-0.83.dist-info}/WHEEL +0 -0
  140. {holidays-0.81.dist-info → holidays-0.83.dist-info}/licenses/LICENSE +0 -0
  141. {holidays-0.81.dist-info → holidays-0.83.dist-info}/top_level.txt +0 -0
@@ -166,24 +166,22 @@ class Macau(
166
166
  self._add_qingming_festival(tr("清明節"))
167
167
 
168
168
  # Regulamento Administrativo n.º 4/1999 - Name changed in Chinese for Good Friday.
169
- name = (
169
+ self._add_good_friday(
170
170
  # Good Friday.
171
171
  tr("耶穌受難日")
172
172
  if self._year >= 2000
173
173
  # Good Friday.
174
174
  else tr("聖周星期五")
175
175
  )
176
- self._add_good_friday(name)
177
176
 
178
177
  # Regulamento Administrativo n.º 4/1999 - Name changed to The Day before Easter.
179
- name = (
178
+ self._add_holy_saturday(
180
179
  # The Day before Easter.
181
180
  tr("復活節前日")
182
181
  if self._year >= 2000
183
182
  # Holy Saturday.
184
183
  else tr("聖周星期六")
185
184
  )
186
- self._add_holy_saturday(name)
187
185
 
188
186
  # Labor Day.
189
187
  self._add_labor_day(tr("勞動節"))
@@ -232,14 +230,13 @@ class Macau(
232
230
  self._add_christmas_eve(name)
233
231
 
234
232
  # Portaria n.º 242/98/M - Name changed in Chinese for Christmas Day.
235
- name = (
233
+ self._add_christmas_day(
236
234
  # Christmas Day.
237
235
  tr("聖誕節")
238
236
  if self._year >= 1999
239
237
  # Christmas Day.
240
238
  else tr("聖誕")
241
239
  )
242
- self._add_christmas_day(name)
243
240
 
244
241
  # Decreto-Lei n.º 38/87/M - Removed Assumption Day and All Saints' Day as Public Holiday.
245
242
  if self._year <= 1986:
@@ -371,10 +368,10 @@ class Macau(
371
368
  if self.observed:
372
369
  self.observed_label = (
373
370
  # Compensatory rest day for %s.
374
- self.tr("%s的補假")
371
+ tr("%s的補假")
375
372
  if self._year >= 2020
376
373
  # The first working day after %s.
377
- else self.tr("%s後首個工作日")
374
+ else tr("%s後首個工作日")
378
375
  )
379
376
  self.observed_estimated_label = (
380
377
  # Compensatory rest day for %s (estimated).
@@ -10,7 +10,10 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from __future__ import annotations
14
+
13
15
  from gettext import gettext as tr
16
+ from typing import TYPE_CHECKING
14
17
 
15
18
  from holidays.calendars import (
16
19
  _CustomBuddhistHolidays,
@@ -51,6 +54,9 @@ from holidays.observed_holiday_base import (
51
54
  SUN_TO_NEXT_WORKDAY,
52
55
  )
53
56
 
57
+ if TYPE_CHECKING:
58
+ from datetime import date
59
+
54
60
 
55
61
  class Malaysia(
56
62
  ObservedHolidayBase,
@@ -163,6 +169,14 @@ class Malaysia(
163
169
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_WORKDAY)
164
170
  super().__init__(*args, **kwargs)
165
171
 
172
+ def _get_weekend(self, dt: date) -> set[int]:
173
+ if (
174
+ self.subdiv == "01" and (dt.year <= 1994 or 2014 <= dt.year <= 2024)
175
+ ) or self.subdiv in {"02", "03", "11"}:
176
+ return {FRI, SAT}
177
+ else:
178
+ return {SAT, SUN}
179
+
166
180
  def _populate_public_holidays(self):
167
181
  self.dts_observed = set()
168
182
 
@@ -229,13 +243,10 @@ class Malaysia(
229
243
  self.subdiv == "01" and (self._year <= 1994 or 2014 <= self._year <= 2024)
230
244
  ) or self.subdiv == "02":
231
245
  self._observed_rule = FRI_TO_NEXT_WORKDAY
232
- self.weekend = {FRI, SAT}
233
246
  elif self.subdiv in {"03", "11"}:
234
247
  self._observed_rule = SAT_TO_NEXT_WORKDAY
235
- self.weekend = {FRI, SAT}
236
248
  else:
237
249
  self._observed_rule = SUN_TO_NEXT_WORKDAY
238
- self.weekend = {SAT, SUN}
239
250
 
240
251
  if self.observed:
241
252
  self._populate_observed(self.dts_observed)
@@ -13,7 +13,7 @@
13
13
  from gettext import gettext as tr
14
14
 
15
15
  from holidays.calendars import _CustomHinduHolidays, _CustomIslamicHolidays
16
- from holidays.calendars.gregorian import JAN, FEB, APR, MAY, JUN, JUL, AUG, SEP
16
+ from holidays.calendars.gregorian import JAN, FEB, APR, MAY, JUL, AUG, SEP
17
17
  from holidays.groups import (
18
18
  ChineseCalendarHolidays,
19
19
  ChristianHolidays,
@@ -65,13 +65,19 @@ class Mauritius(
65
65
  islamic_show_estimated:
66
66
  Whether to add "estimated" label to Islamic holidays name
67
67
  if holiday date is estimated.
68
+
69
+ In Mauritius, the dates of the Islamic calendar usually fall a day later than
70
+ the corresponding dates in the Umm al-Qura calendar.
68
71
  """
69
72
  ChineseCalendarHolidays.__init__(self)
70
73
  ChristianHolidays.__init__(self)
71
74
  HinduCalendarHolidays.__init__(self, cls=MauritiusHinduHolidays)
72
75
  InternationalHolidays.__init__(self)
73
76
  IslamicHolidays.__init__(
74
- self, cls=MauritiusIslamicHolidays, show_estimated=islamic_show_estimated
77
+ self,
78
+ cls=MauritiusIslamicHolidays,
79
+ show_estimated=islamic_show_estimated,
80
+ calendar_delta_days=+1,
75
81
  )
76
82
  StaticHolidays.__init__(self, cls=MauritiusStaticHolidays)
77
83
  super().__init__(*args, **kwargs)
@@ -167,13 +173,8 @@ class MauritiusIslamicHolidays(_CustomIslamicHolidays):
167
173
  # https://web.archive.org/web/20250420201326/https://www.timeanddate.com/holidays/mauritius/eid-al-fitr
168
174
  EID_AL_FITR_DATES_CONFIRMED_YEARS = (2016, 2025)
169
175
  EID_AL_FITR_DATES = {
170
- 2017: (JUN, 26),
171
- 2018: (JUN, 16),
172
- 2019: (JUN, 5),
173
- 2021: (MAY, 14),
174
- 2022: (MAY, 3),
175
- 2023: (APR, 22),
176
- 2024: (APR, 11),
176
+ 2016: (JUL, 6),
177
+ 2020: (MAY, 24),
177
178
  2025: (APR, 1),
178
179
  }
179
180
 
@@ -64,7 +64,7 @@ class Montserrat(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
64
64
  )
65
65
 
66
66
  # Saint Patrick's Day.
67
- self._add_observed(self._add_holiday_mar_17(tr("Saint Patrick's Day")))
67
+ self._add_observed(self._add_saint_patricks_day(tr("Saint Patrick's Day")))
68
68
 
69
69
  # Good Friday.
70
70
  self._add_good_friday(tr("Good Friday"))
@@ -0,0 +1,194 @@
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 import _CustomIslamicHolidays
16
+ from holidays.calendars.gregorian import JAN, MAR, NOV, DEC
17
+ from holidays.groups import (
18
+ BurmeseCalendarHolidays,
19
+ ChineseCalendarHolidays,
20
+ ChristianHolidays,
21
+ InternationalHolidays,
22
+ IslamicHolidays,
23
+ StaticHolidays,
24
+ )
25
+ from holidays.holiday_base import HolidayBase
26
+
27
+
28
+ class Myanmar(
29
+ HolidayBase,
30
+ BurmeseCalendarHolidays,
31
+ ChineseCalendarHolidays,
32
+ ChristianHolidays,
33
+ InternationalHolidays,
34
+ IslamicHolidays,
35
+ StaticHolidays,
36
+ ):
37
+ """Myanmar holidays.
38
+
39
+ References:
40
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Myanmar>
41
+ * <https://my.wikipedia.org/wiki/မြန်မာနိုင်ငံရှိ_အားလပ်ရက်များ>
42
+ * [Algorithm, Program and Calculation of Myanmar Calendar](https://web.archive.org/web/20250510011425/http://cool-emerald.blogspot.com/2013/06/algorithm-program-and-calculation-of.html)
43
+ * [2025 International and Chinese New Year](https://web.archive.org/web/20240709104600/https://www.moi.gov.mm/news/58594)
44
+ * [Armed Forces Day](https://web.archive.org/web/20250522010622/https://burma.irrawaddy.com/on-this-day/2019/03/27/187691.html)
45
+ * [2021-2024](https://web.archive.org/web/20241112125406/https://evisa.moip.gov.mm/home/publicholiday)
46
+ * [2013-2025 (Webarchive)](https://web.archive.org/web/20250711015428/http://www.myanmarembassy.sg/contact-us/holidays/)
47
+ """
48
+
49
+ country = "MM"
50
+ default_language = "my"
51
+ # %s (estimated).
52
+ estimated_label = tr("%s (ခန့်မှန်း)")
53
+ supported_languages = ("en_US", "my", "th")
54
+ # Myanmar gained its independence from British rule on January 4, 1948.
55
+ start_year = 1948
56
+
57
+ def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
58
+ """
59
+ Args:
60
+ islamic_show_estimated:
61
+ Whether to add "estimated" label to Islamic holidays name
62
+ if holiday date is estimated.
63
+
64
+ In Myanmar, the dates of the Islamic calendar usually fall a day later than
65
+ the corresponding dates in the Umm al-Qura calendar.
66
+ """
67
+ BurmeseCalendarHolidays.__init__(self)
68
+ ChineseCalendarHolidays.__init__(self)
69
+ ChristianHolidays.__init__(self)
70
+ InternationalHolidays.__init__(self)
71
+ IslamicHolidays.__init__(
72
+ self,
73
+ cls=MyanmarIslamicHolidays,
74
+ show_estimated=islamic_show_estimated,
75
+ calendar_delta_days=+1,
76
+ )
77
+ StaticHolidays.__init__(self, cls=MyanmarStaticHolidays)
78
+ super().__init__(*args, **kwargs)
79
+
80
+ def _populate_public_holidays(self):
81
+ if self._year >= 2025:
82
+ # New Year's Day.
83
+ self._add_new_years_day(tr("နိုင်ငံတကာနှစ်သစ်ကူးနေ့"))
84
+
85
+ # Independence Day.
86
+ self._add_holiday_jan_4(tr("လွတ်လပ်ရေးနေ့"))
87
+
88
+ # Union Day.
89
+ self._add_holiday_feb_12(tr("ပြည်ထောင်စုနေ့"))
90
+
91
+ # Peasants' Day.
92
+ name = tr("တောင်သူလယ်သမားနေ့")
93
+ if self._year >= 1965:
94
+ self._add_holiday_mar_2(name)
95
+ elif self._year >= 1963:
96
+ self._add_holiday_jan_1(name)
97
+
98
+ self._add_holiday_mar_27(
99
+ # Armed Forces Day.
100
+ tr("တပ်မတော်နေ့")
101
+ if self._year >= 1955
102
+ # Revolution Day.
103
+ else tr("တော်လှန်ရေးနေ့")
104
+ )
105
+
106
+ # May Day.
107
+ self._add_labor_day(tr("မေဒေးနေ့"))
108
+
109
+ # Martyrs' Day.
110
+ self._add_holiday_jul_19(tr("အာဇာနည်နေ့"))
111
+
112
+ # Christmas Day.
113
+ self._add_christmas_day(tr("ခရစ္စမတ်နေ့"))
114
+
115
+ # Eid al-Adha.
116
+ self._add_eid_al_adha_day(tr("အီဒုလ်အဿွဟာနေ့"))
117
+
118
+ if self._year >= 2025:
119
+ # Chinese New Year.
120
+ self._add_chinese_new_years_day(tr("တရုတ်နှစ်သစ်ကူးနေ့"))
121
+
122
+ # Myanmar New Year.
123
+ name = tr("မြန်မာနှစ်သစ်ကူး ရုံးပိတ်ရက်များ")
124
+ if self._year >= 2024:
125
+ self._add_myanmar_new_year(name, extra_days_after=8)
126
+ elif self._year >= 2022:
127
+ self._add_myanmar_new_year(name, extra_days_before=4)
128
+ elif 2007 <= self._year <= 2016:
129
+ self._add_myanmar_new_year(name, extra_days_before=1, extra_days_after=8)
130
+ else:
131
+ self._add_myanmar_new_year(name)
132
+
133
+ # Full Moon Day of Tabaung.
134
+ self._add_tabaung_full_moon_day(tr("တပေါင်းလပြည့်နေ့"))
135
+
136
+ # Full Moon Day of Kason.
137
+ self._add_kason_full_moon_day(tr("ကဆုန်လပြည့်နေ့"))
138
+
139
+ # Full Moon Day of Waso.
140
+ self._add_waso_full_moon_day(tr("ဝါဆိုလပြည့်နေ့"))
141
+
142
+ # Thadingyut Holidays.
143
+ name = tr("သီတင်းကျွတ်ပိတ်ရက်များ")
144
+ self._add_thadingyut_full_moon_eve(name)
145
+ self._add_thadingyut_full_moon_day(name)
146
+ self._add_thadingyut_full_moon_day_two(name)
147
+
148
+ # Diwali.
149
+ self._add_myanmar_diwali(tr("ဒီပါဝလီနေ့"))
150
+
151
+ # Full Moon Day of Tazaungmon.
152
+ self._add_tazaungmon_full_moon_day(tr("တန်ဆောင်တိုင်လပြည့်နေ့"))
153
+
154
+ # National Day.
155
+ self._add_myanmar_national_day(tr("အမျိုးသားနေ့"))
156
+
157
+ # Karen New Year.
158
+ self._add_karen_new_year(tr("ကရင်နှစ်သစ်ကူးနေ့"))
159
+
160
+
161
+ class MM(Myanmar):
162
+ pass
163
+
164
+
165
+ class MMR(Myanmar):
166
+ pass
167
+
168
+
169
+ class MyanmarIslamicHolidays(_CustomIslamicHolidays):
170
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
171
+
172
+
173
+ class MyanmarStaticHolidays:
174
+ """Myanmar special holidays.
175
+
176
+ References:
177
+ * [2025](https://web.archive.org/web/20241221214023/https://www.gnlm.com.mm/govt-designates-continuous-public-days-for-2024-2025-to-ease-travel-and-extend-leisure/)
178
+ """
179
+
180
+ # Substituted date format.
181
+ substituted_date_format = tr("%d-%m-%Y")
182
+
183
+ # Day off (substituted from %s).
184
+ substituted_label = tr("အလုပ်ပိတ်ရက် (%s မှ ပြန်လဲထားသည်)")
185
+
186
+ special_public_holidays = {
187
+ 2024: (DEC, 31, JAN, 11, 2025),
188
+ 2025: (
189
+ (MAR, 12, MAR, 22),
190
+ (MAR, 14, MAR, 29),
191
+ (NOV, 3, NOV, 8),
192
+ (DEC, 26, JAN, 3, 2026),
193
+ ),
194
+ }
@@ -11,7 +11,7 @@
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
13
  from holidays.calendars import _CustomIslamicHolidays, _CustomHinduHolidays
14
- from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
14
+ from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, AUG, SEP, OCT, NOV
15
15
  from holidays.constants import PUBLIC, WORKDAY
16
16
  from holidays.groups import (
17
17
  ChristianHolidays,
@@ -58,17 +58,23 @@ class Nepal(
58
58
  islamic_show_estimated:
59
59
  Whether to add "estimated" label to Islamic holidays name
60
60
  if holiday date is estimated.
61
+
62
+ In Nepal, the dates of the Islamic calendar usually fall a day later than
63
+ the corresponding dates in the Umm al-Qura calendar.
61
64
  """
62
65
  ChristianHolidays.__init__(self)
63
66
  HinduCalendarHolidays.__init__(self, cls=NepalHinduHolidays)
64
67
  InternationalHolidays.__init__(self)
65
68
  IslamicHolidays.__init__(
66
- self, cls=NepalIslamicHolidays, show_estimated=islamic_show_estimated
69
+ self,
70
+ cls=NepalIslamicHolidays,
71
+ show_estimated=islamic_show_estimated,
72
+ calendar_delta_days=+1,
67
73
  )
68
74
  StaticHolidays.__init__(self, cls=NepalStaticHolidays)
69
75
  super().__init__(*args, **kwargs)
70
76
 
71
- def _add_non_continuous_holidays(self, is_workday: bool = False):
77
+ def _add_non_continuous_holidays(self, *, is_workday: bool = False):
72
78
  """Holidays removed by MoHA between 2019-2020."""
73
79
  if (2019 <= self._year <= 2020) == is_workday:
74
80
  martyrs_day_dates = {
@@ -367,40 +373,15 @@ class NepalHinduHolidays(_CustomHinduHolidays):
367
373
  class NepalIslamicHolidays(_CustomIslamicHolidays):
368
374
  EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2010, 2025)
369
375
  EID_AL_ADHA_DATES = {
370
- 2010: (NOV, 17),
371
- 2011: (NOV, 7),
372
- 2012: (OCT, 27),
373
- 2013: (OCT, 16),
374
376
  2014: (OCT, 6),
375
377
  2015: (SEP, 25),
376
378
  2016: (SEP, 13),
377
- 2017: (SEP, 2),
378
- 2018: (AUG, 22),
379
- 2019: (AUG, 12),
380
- 2020: (AUG, 1),
381
- 2021: (JUL, 21),
382
- 2022: (JUL, 10),
383
- 2023: (JUN, 29),
384
- 2024: (JUN, 17),
385
- 2025: (JUN, 7),
386
379
  }
387
380
 
388
381
  EID_AL_FITR_DATES_CONFIRMED_YEARS = (2010, 2025)
389
382
  EID_AL_FITR_DATES = {
390
- 2011: (AUG, 31),
391
- 2012: (AUG, 20),
392
- 2014: (JUL, 29),
393
- 2015: (JUL, 18),
394
- 2016: (JUL, 7),
395
- 2017: (JUN, 26),
396
- 2018: (JUN, 16),
397
- 2019: (JUN, 5),
398
- 2020: (MAY, 25),
399
- 2021: (MAY, 14),
400
- 2022: (MAY, 3),
401
- 2023: (APR, 22),
402
- 2024: (APR, 11),
403
- 2025: (MAR, 31),
383
+ 2010: (SEP, 10),
384
+ 2013: (AUG, 8),
404
385
  }
405
386
 
406
387
 
@@ -20,17 +20,25 @@ from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_PREV_SAT,
20
20
  class Netherlands(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
21
21
  """Netherlands holidays.
22
22
 
23
+ Easter Sunday and Whit Sunday are always on Sunday and are therefore not mentioned separately
24
+ in the Algemene termijnenwet (Atw).
25
+
23
26
  References:
24
27
  * <https://en.wikipedia.org/wiki/Public_holidays_in_the_Netherlands>
25
28
  * <https://nl.wikipedia.org/wiki/Feestdagen_in_Nederland>
26
- * <https://web.archive.org/web/20250427131819/https://www.iamsterdam.com/en/plan-your-trip/practical-info/public-holidays>
29
+ * <https://nl.wikipedia.org/wiki/Algemene_termijnenwet>
30
+ * <https://web.archive.org/web/20251015082530/https://business.gov.nl/regulation/holiday-entitlement/>
31
+ * <https://web.archive.org/save/https://wetten.overheid.nl/BWBR0002448/2010-10-10>
32
+ * <https://web.archive.org/web/20250123145153/https://repository.overheid.nl/frbr/sgd/19811982/0000151909/1/pdf/SGD_19811982_0002862.pdf>
33
+ * <https://web.archive.org/web/20251015082056/https://www.facebook.com/photo.php?fbid=5357926707591435&id=190259871024837&set=a.342400825810740>
27
34
  """
28
35
 
29
36
  country = "NL"
30
37
  default_language = "nl"
31
38
  supported_categories = (OPTIONAL, PUBLIC)
32
- supported_languages = ("en_US", "fy", "nl", "uk")
33
- start_year = 1801
39
+ supported_languages = ("en_US", "fy", "nl", "th", "uk")
40
+ # Algemene termijnenwet (Atw) entered into force on April 1st, 1965.
41
+ start_year = 1966
34
42
 
35
43
  def __init__(self, *args, **kwargs):
36
44
  ChristianHolidays.__init__(self)
@@ -42,29 +50,28 @@ class Netherlands(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
42
50
  # New Year's Day.
43
51
  self._add_new_years_day(tr("Nieuwjaarsdag"))
44
52
 
53
+ # Good Friday.
54
+ self._add_good_friday(tr("Goede Vrijdag"))
55
+
45
56
  # Easter Sunday.
46
57
  self._add_easter_sunday(tr("Eerste paasdag"))
47
58
 
48
59
  # Easter Monday.
49
60
  self._add_easter_monday(tr("Tweede paasdag"))
50
61
 
51
- if self._year >= 1891:
52
- name = (
53
- # King's Day.
54
- tr("Koningsdag")
55
- if self._year >= 2014
56
- # Queen's Day.
57
- else tr("Koninginnedag")
58
- )
59
- if self._year >= 2014:
60
- dt = self._add_holiday_apr_27(name)
61
- elif self._year >= 1949:
62
- dt = self._add_holiday_apr_30(name)
63
- else:
64
- dt = self._add_holiday_aug_31(name)
65
- self._move_holiday(dt, rule=SUN_TO_PREV_SAT if self._year >= 1980 else SUN_TO_NEXT_MON)
66
-
67
- if self._year >= 1950 and self._year % 5 == 0:
62
+ self._move_holiday(
63
+ # King's Day.
64
+ self._add_holiday_apr_27(tr("Koningsdag"))
65
+ if self._year >= 2014
66
+ # Queen's Day.
67
+ else self._add_holiday_apr_30(tr("Koninginnedag")),
68
+ rule=SUN_TO_PREV_SAT if self._year >= 1980 else SUN_TO_NEXT_MON,
69
+ )
70
+
71
+ # Officially adopted as an annual national holiday in the Atw on January 5th, 1982.
72
+ # In practice, many collective labor agreements (CAOs) stipulate that May 5th is
73
+ # a day off only once every five years (e.g., 2030, 2035, etc.).
74
+ if self._year % 5 == 0:
68
75
  # Liberation Day.
69
76
  self._add_holiday_may_5(tr("Bevrijdingsdag"))
70
77
 
@@ -84,10 +91,7 @@ class Netherlands(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
84
91
  self._add_christmas_day_two(tr("Tweede Kerstdag"))
85
92
 
86
93
  def _populate_optional_holidays(self):
87
- # Good Friday.
88
- self._add_good_friday(tr("Goede Vrijdag"))
89
-
90
- if self._year >= 1990:
94
+ if self._year >= 1982:
91
95
  # Liberation Day.
92
96
  self._add_holiday_may_5(tr("Bevrijdingsdag"))
93
97