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
@@ -10,9 +10,11 @@
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
  import warnings
14
- from datetime import date
15
16
  from gettext import gettext as tr
17
+ from typing import TYPE_CHECKING
16
18
 
17
19
  from holidays.calendars.chinese import KOREAN_CALENDAR
18
20
  from holidays.calendars.gregorian import (
@@ -43,6 +45,9 @@ from holidays.observed_holiday_base import (
43
45
  SUN_TO_NEXT_WORKDAY,
44
46
  )
45
47
 
48
+ if TYPE_CHECKING:
49
+ from datetime import date
50
+
46
51
 
47
52
  class SouthKorea(
48
53
  ObservedHolidayBase,
@@ -121,7 +121,7 @@ class Spain(
121
121
  "La Rioja": "RI",
122
122
  "Valenciana": "VC",
123
123
  }
124
- supported_languages = ("en_US", "es", "uk")
124
+ supported_languages = ("ca", "en_US", "es", "uk")
125
125
 
126
126
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
127
127
  """
@@ -186,7 +186,7 @@ class Spain(
186
186
  self._move_holiday(self._add_epiphany_day(tr("Epifanía del Señor")))
187
187
 
188
188
  # Andalusia Day.
189
- self._move_holiday(self._add_holiday_feb_28(tr("Día de Andalucia")))
189
+ self._move_holiday(self._add_holiday_feb_28(tr("Día de Andalucía")))
190
190
 
191
191
  # Maundy Thursday.
192
192
  self._add_holy_thursday(tr("Jueves Santo"))
@@ -260,7 +260,7 @@ class Spain(
260
260
  if self._year in {2010, 2021}:
261
261
  self._move_holiday(self._add_assumption_of_mary_day(tr("Asunción de la Virgen")))
262
262
 
263
- # Asturia Day.
263
+ # Asturias Day.
264
264
  self._move_holiday(self._add_holiday_sep_8(tr("Día de Asturias")))
265
265
 
266
266
  if self._year in {2014, 2025}:
@@ -301,7 +301,7 @@ class Spain(
301
301
  self._add_holiday_jul_28(tr("Día de las Instituciones de Cantabria"))
302
302
 
303
303
  if self._year not in {2013, 2019, 2024}:
304
- # Our Lady of the Bien Aparecida.
304
+ # Our Lady of Bien Aparecida.
305
305
  self._add_holiday_sep_15(tr("La Bien Aparecida"))
306
306
 
307
307
  if self._year == 2015:
@@ -94,12 +94,18 @@ class SriLanka(
94
94
  islamic_show_estimated:
95
95
  Whether to add "estimated" label to Islamic holidays name
96
96
  if holiday date is estimated.
97
+
98
+ In Sri Lanka, the dates of the Islamic calendar usually fall a day later than
99
+ the corresponding dates in the Umm al-Qura calendar.
97
100
  """
98
101
  ChristianHolidays.__init__(self)
99
102
  HinduCalendarHolidays.__init__(self, SriLankaHinduHolidays)
100
103
  InternationalHolidays.__init__(self)
101
104
  IslamicHolidays.__init__(
102
- self, cls=SriLankaIslamicHolidays, show_estimated=islamic_show_estimated
105
+ self,
106
+ cls=SriLankaIslamicHolidays,
107
+ show_estimated=islamic_show_estimated,
108
+ calendar_delta_days=+1,
103
109
  )
104
110
  SinhalaCalendarHolidays.__init__(self)
105
111
  StaticHolidays.__init__(self, cls=SriLankaStaticHolidays)
@@ -289,75 +295,32 @@ class SriLankaHinduHolidays(_CustomHinduHolidays):
289
295
 
290
296
 
291
297
  class SriLankaIslamicHolidays(_CustomIslamicHolidays):
298
+ # https://web.archive.org/web/20111103102902/http://www.adaderana.lk:80/news.php?nid=15606
299
+ # https://web.archive.org/web/20121029024049/http://www.adaderana.lk:80/news.php?nid=20136
292
300
  EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2003, 2025)
293
301
  EID_AL_ADHA_DATES = {
294
- 2003: (FEB, 12),
302
+ 2004: (FEB, 1),
303
+ 2005: (JAN, 21),
295
304
  2006: ((JAN, 11), (DEC, 31)),
296
- 2007: (DEC, 21),
297
- 2008: (DEC, 9),
298
- 2009: (NOV, 28),
299
- 2010: (NOV, 17),
300
- # https://web.archive.org/web/20111103102902/http://www.adaderana.lk:80/news.php?nid=15606
301
- 2011: (NOV, 7),
302
- # https://web.archive.org/web/20121029024049/http://www.adaderana.lk:80/news.php?nid=20136
303
- 2012: (OCT, 27),
304
- 2013: (OCT, 16),
305
- 2014: (OCT, 5),
306
- 2015: (SEP, 24),
307
- 2016: (SEP, 12),
308
- 2018: (AUG, 22),
309
- 2019: (AUG, 12),
310
- 2020: (AUG, 1),
311
- 2021: (JUL, 21),
312
- 2022: (JUL, 10),
313
- 2023: (JUN, 29),
314
- 2024: (JUN, 17),
315
- 2025: (JUN, 7),
305
+ 2017: (SEP, 1),
316
306
  }
317
307
 
318
308
  EID_AL_FITR_DATES_CONFIRMED_YEARS = (2003, 2025)
319
309
  EID_AL_FITR_DATES = {
320
- 2003: (NOV, 26),
321
- 2005: (NOV, 4),
322
- 2006: (OCT, 24),
323
- 2009: (SEP, 21),
324
- 2011: (AUG, 31),
325
- 2013: (AUG, 9),
326
- 2014: (JUL, 29),
327
- 2015: (JUL, 18),
328
- 2017: (JUN, 26),
329
- 2019: (JUN, 5),
330
- 2020: (MAY, 25),
331
- 2021: (MAY, 14),
332
- 2022: (MAY, 3),
333
- 2023: (APR, 22),
334
- 2024: (APR, 11),
335
- 2025: (MAR, 31),
310
+ 2004: (NOV, 14),
311
+ 2007: (OCT, 13),
312
+ 2008: (OCT, 1),
313
+ 2010: (SEP, 10),
314
+ 2012: (AUG, 19),
315
+ 2016: (JUL, 6),
316
+ 2018: (JUN, 15),
336
317
  }
337
318
 
338
319
  MAWLID_DATES_CONFIRMED_YEARS = (2003, 2025)
339
320
  MAWLID_DATES = {
340
- 2003: (MAY, 14),
341
- 2004: (MAY, 2),
342
- 2005: (APR, 22),
343
- 2006: (APR, 11),
344
- 2007: (APR, 1),
345
- 2009: (MAR, 10),
346
- 2010: (FEB, 27),
347
- 2011: (FEB, 16),
348
- 2012: (FEB, 5),
349
- 2013: (JAN, 25),
350
- 2014: (JAN, 14),
321
+ 2008: (MAR, 20),
351
322
  2015: (JAN, 4),
352
- 2016: (DEC, 12),
353
- 2017: (DEC, 1),
354
- 2019: (NOV, 10),
355
- 2020: (OCT, 30),
356
- 2021: (OCT, 19),
357
- 2022: (OCT, 9),
358
- 2023: (SEP, 28),
359
- 2024: (SEP, 16),
360
- 2025: (SEP, 5),
323
+ 2018: (NOV, 20),
361
324
  }
362
325
 
363
326
 
@@ -10,10 +10,11 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from datetime import date
13
14
  from gettext import gettext as tr
14
15
 
15
16
  from holidays.calendars import _CustomIslamicHolidays
16
- from holidays.calendars.gregorian import MAY, JUL, AUG, SEP, FRI, SAT
17
+ from holidays.calendars.gregorian import JAN, MAY, JUL, AUG, SEP, FRI, SAT
17
18
  from holidays.calendars.julian import JULIAN_CALENDAR
18
19
  from holidays.groups import ChristianHolidays, IslamicHolidays
19
20
  from holidays.holiday_base import HolidayBase
@@ -34,6 +35,7 @@ class Sudan(HolidayBase, ChristianHolidays, IslamicHolidays):
34
35
  estimated_label = tr("%s (المقدرة)")
35
36
  supported_languages = ("ar_SD", "en_US")
36
37
  start_year = 1985
38
+ weekend = {FRI, SAT}
37
39
 
38
40
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
39
41
  ChristianHolidays.__init__(self)
@@ -42,11 +44,12 @@ class Sudan(HolidayBase, ChristianHolidays, IslamicHolidays):
42
44
  )
43
45
  super().__init__(*args, **kwargs)
44
46
 
45
- def _populate_public_holidays(self):
47
+ def _get_weekend(self, dt: date) -> set[int]:
46
48
  # The resting days are Friday and Saturday since January 26th, 2008.
47
49
  # https://sudantribune.com/article25544/
48
- self.weekend = {FRI, SAT} if self._year >= 2008 else {FRI}
50
+ return {FRI, SAT} if dt >= date(2008, JAN, 26) else {FRI}
49
51
 
52
+ def _populate_public_holidays(self):
50
53
  # Independence Day.
51
54
  self._add_holiday_jan_1(tr("عيد الإستقلال"))
52
55
 
@@ -108,14 +108,13 @@ class Suriname(
108
108
  self._add_holiday_oct_10(tr("Dag der Marrons"))
109
109
 
110
110
  if self._year >= 1976:
111
- name = (
111
+ self._add_holiday_nov_25(
112
112
  # Independence Day.
113
113
  tr("Onafhankelijkheidsdag")
114
114
  if self._year >= 2008
115
115
  # Republic Day.
116
116
  else tr("Dag van de Republiek")
117
117
  )
118
- self._add_holiday_nov_25(name)
119
118
 
120
119
  # Christmas Day.
121
120
  self._add_christmas_day(tr("Eerste Kerstdag"))
@@ -39,7 +39,7 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays):
39
39
  default_language = "sv"
40
40
  supported_languages = ("en_US", "sv", "th", "uk")
41
41
 
42
- def __init__(self, include_sundays: bool = True, *args, **kwargs):
42
+ def __init__(self, *args, include_sundays: bool = True, **kwargs):
43
43
  """
44
44
  Args:
45
45
  include_sundays: