holidays 0.76__py3-none-any.whl → 0.77__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 (85) hide show
  1. holidays/countries/__init__.py +19 -0
  2. holidays/countries/australia.py +6 -8
  3. holidays/countries/british_virgin_islands.py +6 -6
  4. holidays/countries/cabo_verde.py +293 -0
  5. holidays/countries/cayman_islands.py +162 -0
  6. holidays/countries/central_african_republic.py +143 -0
  7. holidays/countries/christmas_island.py +215 -0
  8. holidays/countries/cocos_islands.py +4 -4
  9. holidays/countries/dr_congo.py +139 -0
  10. holidays/countries/faroe_islands.py +102 -0
  11. holidays/countries/georgia.py +11 -5
  12. holidays/countries/gibraltar.py +219 -0
  13. holidays/countries/guernsey.py +6 -6
  14. holidays/countries/japan.py +6 -8
  15. holidays/countries/jersey.py +2 -2
  16. holidays/countries/lebanon.py +448 -0
  17. holidays/countries/mali.py +151 -0
  18. holidays/countries/montserrat.py +177 -0
  19. holidays/countries/nepal.py +8 -8
  20. holidays/countries/new_zealand.py +2 -2
  21. holidays/countries/niue.py +115 -0
  22. holidays/countries/norfolk_island.py +129 -0
  23. holidays/countries/palau.py +1 -1
  24. holidays/countries/palestine.py +177 -0
  25. holidays/countries/peru.py +12 -0
  26. holidays/countries/saint_vincent_and_the_grenadines.py +130 -0
  27. holidays/countries/seychelles.py +1 -1
  28. holidays/countries/solomon_islands.py +2 -2
  29. holidays/countries/tokelau.py +66 -0
  30. holidays/countries/turks_and_caicos_islands.py +2 -2
  31. holidays/countries/united_kingdom.py +2 -2
  32. holidays/countries/united_states.py +2 -5
  33. holidays/groups/christian.py +10 -10
  34. holidays/groups/hebrew.py +2 -2
  35. holidays/groups/islamic.py +17 -0
  36. holidays/holiday_base.py +1 -1
  37. holidays/locale/ar/LC_MESSAGES/LB.mo +0 -0
  38. holidays/locale/ar/LC_MESSAGES/PS.mo +0 -0
  39. holidays/locale/da/LC_MESSAGES/FO.mo +0 -0
  40. holidays/locale/de/LC_MESSAGES/CV.mo +0 -0
  41. holidays/locale/en_CX/LC_MESSAGES/CX.mo +0 -0
  42. holidays/locale/en_GB/LC_MESSAGES/GI.mo +0 -0
  43. holidays/locale/en_GB/LC_MESSAGES/KY.mo +0 -0
  44. holidays/locale/en_MS/LC_MESSAGES/MS.mo +0 -0
  45. holidays/locale/en_NF/LC_MESSAGES/NF.mo +0 -0
  46. holidays/locale/en_NU/LC_MESSAGES/NU.mo +0 -0
  47. holidays/locale/en_TK/LC_MESSAGES/TK.mo +0 -0
  48. holidays/locale/en_US/LC_MESSAGES/CD.mo +0 -0
  49. holidays/locale/en_US/LC_MESSAGES/CF.mo +0 -0
  50. holidays/locale/en_US/LC_MESSAGES/CV.mo +0 -0
  51. holidays/locale/en_US/LC_MESSAGES/CX.mo +0 -0
  52. holidays/locale/en_US/LC_MESSAGES/FO.mo +0 -0
  53. holidays/locale/en_US/LC_MESSAGES/GI.mo +0 -0
  54. holidays/locale/en_US/LC_MESSAGES/KY.mo +0 -0
  55. holidays/locale/en_US/LC_MESSAGES/LB.mo +0 -0
  56. holidays/locale/en_US/LC_MESSAGES/ML.mo +0 -0
  57. holidays/locale/en_US/LC_MESSAGES/MS.mo +0 -0
  58. holidays/locale/en_US/LC_MESSAGES/NF.mo +0 -0
  59. holidays/locale/en_US/LC_MESSAGES/NU.mo +0 -0
  60. holidays/locale/en_US/LC_MESSAGES/PE.mo +0 -0
  61. holidays/locale/en_US/LC_MESSAGES/PS.mo +0 -0
  62. holidays/locale/en_US/LC_MESSAGES/TK.mo +0 -0
  63. holidays/locale/en_US/LC_MESSAGES/VC.mo +0 -0
  64. holidays/locale/en_VC/LC_MESSAGES/VC.mo +0 -0
  65. holidays/locale/es/LC_MESSAGES/CV.mo +0 -0
  66. holidays/locale/fo/LC_MESSAGES/FO.mo +0 -0
  67. holidays/locale/fr/LC_MESSAGES/CD.mo +0 -0
  68. holidays/locale/fr/LC_MESSAGES/CF.mo +0 -0
  69. holidays/locale/fr/LC_MESSAGES/CV.mo +0 -0
  70. holidays/locale/fr/LC_MESSAGES/ML.mo +0 -0
  71. holidays/locale/is/LC_MESSAGES/FO.mo +0 -0
  72. holidays/locale/no/LC_MESSAGES/FO.mo +0 -0
  73. holidays/locale/pt_CV/LC_MESSAGES/CV.mo +0 -0
  74. holidays/locale/sv/LC_MESSAGES/FO.mo +0 -0
  75. holidays/locale/tkl/LC_MESSAGES/TK.mo +0 -0
  76. holidays/locale/uk/LC_MESSAGES/PE.mo +0 -0
  77. holidays/observed_holiday_base.py +3 -1
  78. holidays/registry.py +15 -0
  79. holidays/version.py +1 -1
  80. {holidays-0.76.dist-info → holidays-0.77.dist-info}/METADATA +107 -2
  81. {holidays-0.76.dist-info → holidays-0.77.dist-info}/RECORD +85 -32
  82. {holidays-0.76.dist-info → holidays-0.77.dist-info}/licenses/CONTRIBUTORS +3 -0
  83. {holidays-0.76.dist-info → holidays-0.77.dist-info}/WHEEL +0 -0
  84. {holidays-0.76.dist-info → holidays-0.77.dist-info}/licenses/LICENSE +0 -0
  85. {holidays-0.76.dist-info → holidays-0.77.dist-info}/top_level.txt +0 -0
@@ -22,6 +22,8 @@ class Peru(HolidayBase, ChristianHolidays, InternationalHolidays):
22
22
  References:
23
23
  * <https://web.archive.org/web/20250414165243/https://www.gob.pe/feriados/>
24
24
  * <https://es.wikipedia.org/wiki/Anexo:Días_feriados_en_el_Perú>
25
+ * [Ley N° 31788](https://web.archive.org/web/20250716164223/https://img.lpderecho.pe/wp-content/uploads/2023/06/Ley-31788-LPDerecho.pdf)
26
+ * [Ley N° 31822](https://web.archive.org/web/20250716164455/https://img.lpderecho.pe/wp-content/uploads/2023/07/Ley-31822-LPDerecho.pdf)
25
27
  """
26
28
 
27
29
  country = "PE"
@@ -49,9 +51,19 @@ class Peru(HolidayBase, ChristianHolidays, InternationalHolidays):
49
51
  # Labor Day.
50
52
  self._add_labor_day(tr("Día del Trabajo"))
51
53
 
54
+ # Added via Ley N° 31788 on June 15th, 2023.
55
+ if self._year >= 2024:
56
+ # Battle of Arica and Flag Day.
57
+ self._add_holiday_jun_7(tr("Batalla de Arica y Día de la Bandera"))
58
+
52
59
  # Saint Peter and Saint Paul's Day.
53
60
  self._add_saints_peter_and_paul_day(tr("San Pedro y San Pablo"))
54
61
 
62
+ # Added via Ley N° 31822 on July 8th, 2023.
63
+ if self._year >= 2023:
64
+ # Peruvian Air Force Day.
65
+ self._add_holiday_jul_23(tr("Día de la Fuerza Aérea del Perú"))
66
+
55
67
  # Independence Day.
56
68
  self._add_holiday_jul_28(tr("Día de la Independencia"))
57
69
 
@@ -0,0 +1,130 @@
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 JAN, JUL, AUG, SEP, _timedelta
16
+ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
17
+ from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON, SUN_TO_NEXT_TUE
18
+
19
+
20
+ class SaintVincentAndTheGrenadines(
21
+ ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays
22
+ ):
23
+ """Saint Vincent and the Grenadines holidays.
24
+
25
+ References:
26
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Saint_Vincent_and_the_Grenadines>
27
+ * [2013](https://web.archive.org/web/20240225145904/https://www.bosvg.com/wp-content/uploads/2021/10/bosvg_calendar2013-9x12_ver2-2.pdf)
28
+ * [2014](https://web.archive.org/web/20250610053913/https://www.bosvg.com/wp-content/uploads/2021/10/BOSVG-Calendar-2014-5th-draft.pdf)
29
+ * [2015](https://web.archive.org/web/20240225145904/https://www.bosvg.com/wp-content/uploads/2021/10/BOSVG-Bklet-Calendar-2015_21_11-3.pdf)
30
+ * [2016](https://web.archive.org/web/20240225145903/https://www.bosvg.com/wp-content/uploads/2021/10/BOSVG-2016_pgs_sm_fin.pdf)
31
+ * [2022](https://web.archive.org/web/20230426000952/https://www.bosvg.com/wp-content/uploads/2022/05/Tent-Calendar.pdf)
32
+ * [2023](https://web.archive.org/web/20240225145904/https://www.bosvg.com/wp-content/uploads/2023/03/BOSVG-CALENDAR-TENT_F_REPRINT_TENT-EXCLUDED-FINAL.pdf)
33
+ * [2019-2025](https://web.archive.org/web/20250214232128/https://pmoffice.gov.vc/pmoffice/index.php/public-holidays)
34
+ * [2020 Carnival Monday](https://web.archive.org/web/20250607111242/https://www.stvincenttimes.com/august-3rd-and-4th-2020-declared-public-holidays-in-svg/)
35
+ * [2025 National Spiritual Baptist Day](https://web.archive.org/web/20250513011200/https://www.gov.vc/images/pdf_documents/VINCENTIANS-PREPARE-FOR-MAY-21--SPIRITUAL-BAPTIST-LIBERATION-DAY-NATIONAL-HOLIDAY.pdf)
36
+ """
37
+
38
+ country = "VC"
39
+ default_language = "en_VC"
40
+ # %s (observed).
41
+ observed_label = tr("%s (observed)")
42
+ supported_languages = ("en_US", "en_VC")
43
+ start_year = 1979
44
+
45
+ def __init__(self, *args, **kwargs):
46
+ ChristianHolidays.__init__(self)
47
+ InternationalHolidays.__init__(self)
48
+ StaticHolidays.__init__(self, cls=SaintVincentAndTheGrenadinesStaticHolidays)
49
+ kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
50
+ super().__init__(*args, **kwargs)
51
+
52
+ def _populate_public_holidays(self):
53
+ # New Year's Day.
54
+ self._add_observed(self._add_new_years_day(tr("New Year's Day")))
55
+
56
+ # National Heroes' Day.
57
+ self._add_observed(self._add_holiday_mar_14(tr("National Heroes' Day")))
58
+
59
+ # Good Friday.
60
+ self._add_good_friday(tr("Good Friday"))
61
+
62
+ # Easter Monday.
63
+ self._add_easter_monday(tr("Easter Monday"))
64
+
65
+ # National Workers' Day.
66
+ self._add_observed(self._add_labor_day(tr("National Workers' Day")))
67
+
68
+ if self._year >= 2025:
69
+ # National Spiritual Baptist Day.
70
+ self._add_holiday_may_21(tr("National Spiritual Baptist Day"))
71
+
72
+ # Whit Monday.
73
+ self._add_whit_monday(tr("Whit Monday"))
74
+
75
+ # Carnival Monday.
76
+ name = tr("Carnival Monday")
77
+ carnival_monday_dates = {
78
+ 2013: (JUL, 8),
79
+ 2018: (JUL, 9),
80
+ 2019: (JUL, 8),
81
+ 2020: (AUG, 3),
82
+ 2021: (SEP, 6),
83
+ 2023: (JUL, 10),
84
+ 2024: (JUL, 8),
85
+ }
86
+ dt = (
87
+ self._add_holiday(name, dt)
88
+ if (dt := carnival_monday_dates.get(self._year))
89
+ else self._add_holiday_1st_mon_of_jul(name)
90
+ )
91
+
92
+ # Carnival Tuesday.
93
+ self._add_holiday(tr("Carnival Tuesday"), _timedelta(dt, +1))
94
+
95
+ # Emancipation Day.
96
+ self._add_observed(self._add_holiday_aug_1(tr("Emancipation Day")))
97
+
98
+ # Independence Day.
99
+ self._add_observed(self._add_holiday_oct_27(tr("Independence Day")))
100
+
101
+ # Christmas Day.
102
+ self._add_observed(self._add_christmas_day(tr("Christmas Day")), rule=SUN_TO_NEXT_TUE)
103
+
104
+ # Boxing Day.
105
+ self._add_observed(self._add_christmas_day_two(tr("Boxing Day")))
106
+
107
+
108
+ class VC(SaintVincentAndTheGrenadines):
109
+ pass
110
+
111
+
112
+ class VCT(SaintVincentAndTheGrenadines):
113
+ pass
114
+
115
+
116
+ class SaintVincentAndTheGrenadinesStaticHolidays:
117
+ """Saint Vincent and the Grenadines special holidays.
118
+
119
+ References:
120
+ * [Statutory Rules and Orders 2021 No.1](https://web.archive.org/web/20250613051716/https://pmoffice.gov.vc/pmoffice/images/PDF/Gazettes/No_1_Proclamation_Delcaring_Friday_the_22nd_and_Monday_25th_day_of_January_2021_to_be_Public_Holidays_in_Saint_Vincent_and_the_Grenadines_19th_January_2021.pdf)
121
+ """
122
+
123
+ # Public Health Holiday.
124
+ name = tr("Public Health Holiday")
125
+ special_public_holidays = {
126
+ 2021: (
127
+ (JAN, 22, name),
128
+ (JAN, 25, name),
129
+ ),
130
+ }
@@ -17,7 +17,7 @@ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHoli
17
17
  from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON
18
18
 
19
19
 
20
- class Seychelles(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
20
+ class Seychelles(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
21
21
  """Seychelles holidays.
22
22
 
23
23
  References:
@@ -126,8 +126,8 @@ class SolomonIslands(
126
126
  2022: (JUN, 3),
127
127
  2025: (JUN, 13),
128
128
  }
129
- if self._year in sovereign_birthday_dates:
130
- self._add_holiday(name, sovereign_birthday_dates[self._year])
129
+ if dt := sovereign_birthday_dates.get(self._year):
130
+ self._add_holiday(name, dt)
131
131
  elif self._year == 2024:
132
132
  self._add_observed(self._add_holiday_3rd_sat_of_jun(name))
133
133
  elif self._year >= 2023:
@@ -0,0 +1,66 @@
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 SUN
16
+ from holidays.groups import ChristianHolidays, InternationalHolidays
17
+ from holidays.holiday_base import HolidayBase
18
+
19
+
20
+ class Tokelau(HolidayBase, ChristianHolidays, InternationalHolidays):
21
+ """Tokelau holidays.
22
+
23
+ References:
24
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Tokelau>
25
+ * <https://web.archive.org/web/20250715060109/https://www.tokelau.org.nz/About+Us/Culture.html>
26
+ * [Interpretation Rules 2003](https://web.archive.org/web/20250715065528/https://paclii.org/tk/legis/consol_act_2016/ir2003240.pdf)
27
+ """
28
+
29
+ country = "TK"
30
+ default_language = "en_TK"
31
+ supported_languages = ("en_TK", "en_US", "tkl")
32
+ # Interpretation Rules 2003.
33
+ start_year = 2003
34
+ weekend = {SUN}
35
+
36
+ def __init__(self, *args, **kwargs):
37
+ ChristianHolidays.__init__(self)
38
+ InternationalHolidays.__init__(self)
39
+ super().__init__(*args, **kwargs)
40
+
41
+ def _populate_public_holidays(self):
42
+ # New Year's Day.
43
+ self._add_new_years_day(tr("New Year's Day"))
44
+
45
+ # Good Friday.
46
+ self._add_good_friday(tr("Good Friday"))
47
+
48
+ # Easter Monday.
49
+ self._add_easter_monday(tr("Easter Monday"))
50
+
51
+ # Tokehega Day.
52
+ self._add_holiday_sep_3(tr("Tokehega Day"))
53
+
54
+ # Christmas Day.
55
+ self._add_christmas_day(tr("Christmas Day"))
56
+
57
+ # Boxing Day.
58
+ self._add_christmas_day_two(tr("Boxing Day"))
59
+
60
+
61
+ class TK(Tokelau):
62
+ pass
63
+
64
+
65
+ class TKL(Tokelau):
66
+ pass
@@ -91,8 +91,8 @@ class TurksAndCaicosIslands(ObservedHolidayBase, ChristianHolidays, Internationa
91
91
  2024: (JUN, 17),
92
92
  2025: (JUN, 23),
93
93
  }
94
- if self._year in dates_obs:
95
- self._add_holiday(name, dates_obs.get(self._year))
94
+ if dt := dates_obs.get(self._year):
95
+ self._add_holiday(name, dt)
96
96
  else:
97
97
  self._add_holiday_2nd_mon_of_jun(name)
98
98
 
@@ -88,8 +88,8 @@ class UnitedKingdom(ObservedHolidayBase, ChristianHolidays, InternationalHoliday
88
88
  }
89
89
  # Spring Bank Holiday.
90
90
  name = tr("Spring Bank Holiday")
91
- if self._year in spring_bank_dates:
92
- self._add_holiday(name, spring_bank_dates[self._year])
91
+ if dt := spring_bank_dates.get(self._year):
92
+ self._add_holiday(name, dt)
93
93
  else:
94
94
  self._add_holiday_last_mon_of_may(name)
95
95
 
@@ -351,8 +351,8 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
351
351
  }
352
352
  # Thanksgiving Day.
353
353
  name = tr("Thanksgiving Day")
354
- if self._year in thanksgiving_day_dates:
355
- self._add_holiday(name, thanksgiving_day_dates[self._year])
354
+ if dt := thanksgiving_day_dates.get(self._year):
355
+ self._add_holiday(name, dt)
356
356
  elif self._year >= 1942:
357
357
  self._add_holiday_4th_thu_of_nov(name)
358
358
  else:
@@ -994,7 +994,6 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
994
994
  # Lincoln's Birthday.
995
995
  self._add_observed(self._add_holiday_feb_12(tr("Lincoln's Birthday")))
996
996
 
997
- if self._year >= 1971:
998
997
  # Presidents Day.
999
998
  self._add_holiday_3rd_mon_of_feb(tr("Presidents Day"))
1000
999
 
@@ -1176,7 +1175,6 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
1176
1175
  # Christmas Eve.
1177
1176
  self._add_christmas_eve_holiday()
1178
1177
 
1179
- if self._year >= 1981:
1180
1178
  # Day After Christmas.
1181
1179
  self._add_christmas_day_two(tr("Day After Christmas"))
1182
1180
 
@@ -1217,7 +1215,6 @@ class UnitedStates(ObservedHolidayBase, ChristianHolidays, InternationalHolidays
1217
1215
  # George Washington Day.
1218
1216
  self._add_holiday_3rd_mon_of_feb(tr("George Washington Day"))
1219
1217
 
1220
- if self._year >= 1971:
1221
1218
  self._add_holiday_2nd_mon_of_oct(
1222
1219
  # Indigenous Peoples' Day.
1223
1220
  tr("Indigenous Peoples' Day")
@@ -116,7 +116,7 @@ class ChristianHolidays:
116
116
  """
117
117
  return self._add_holiday_nov_2(name)
118
118
 
119
- def _add_ascension_thursday(self, name) -> date:
119
+ def _add_ascension_thursday(self, name, calendar=None) -> date:
120
120
  """
121
121
  Add Ascension Thursday (39 days after the Easter Sunday).
122
122
 
@@ -124,7 +124,7 @@ class ChristianHolidays:
124
124
  Day, or sometimes Holy Thursday.
125
125
  https://en.wikipedia.org/wiki/Feast_of_the_Ascension
126
126
  """
127
- return self._add_holiday(name, _timedelta(self._easter_sunday, +39))
127
+ return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), +39))
128
128
 
129
129
  def _add_ash_monday(self, name) -> date:
130
130
  """
@@ -316,16 +316,16 @@ class ChristianHolidays:
316
316
  """
317
317
  return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), -2))
318
318
 
319
- def _add_holy_saturday(self, name) -> date:
319
+ def _add_holy_saturday(self, name, calendar=None) -> date:
320
320
  """
321
321
  Add Holy Saturday (1 day before Easter Sunday).
322
322
 
323
323
  Great and Holy Saturday is a day between Good Friday and Easter Sunday.
324
324
  https://en.wikipedia.org/wiki/Holy_Saturday
325
325
  """
326
- return self._add_holiday(name, _timedelta(self._easter_sunday, -1))
326
+ return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), -1))
327
327
 
328
- def _add_holy_thursday(self, name) -> date:
328
+ def _add_holy_thursday(self, name, calendar=None) -> date:
329
329
  """
330
330
  Add Holy Thursday (3 days before Easter Sunday).
331
331
 
@@ -334,7 +334,7 @@ class ChristianHolidays:
334
334
  Jesus Christ with the Apostles, as described in the canonical gospels.
335
335
  https://en.wikipedia.org/wiki/Maundy_Thursday
336
336
  """
337
- return self._add_holiday(name, _timedelta(self._easter_sunday, -3))
337
+ return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), -3))
338
338
 
339
339
  def _add_immaculate_conception_day(self, name) -> date:
340
340
  """
@@ -355,7 +355,7 @@ class ChristianHolidays:
355
355
  """
356
356
  return self._add_holiday_sep_8(name)
357
357
 
358
- def _add_palm_sunday(self, name) -> date:
358
+ def _add_palm_sunday(self, name, calendar=None) -> date:
359
359
  """
360
360
  Add Palm Sunday (7 days before Easter Sunday).
361
361
 
@@ -365,7 +365,7 @@ class ChristianHolidays:
365
365
  Palm Sunday marks the first day of Holy Week.
366
366
  https://en.wikipedia.org/wiki/Palm_Sunday
367
367
  """
368
- return self._add_holiday(name, _timedelta(self._easter_sunday, -7))
368
+ return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), -7))
369
369
 
370
370
  def _add_rejoicing_day(self, name) -> date:
371
371
  """
@@ -440,7 +440,7 @@ class ChristianHolidays:
440
440
  """
441
441
  return self._add_holiday(name, _timedelta(self._easter_sunday, +50))
442
442
 
443
- def _add_whit_sunday(self, name) -> date:
443
+ def _add_whit_sunday(self, name, calendar=None) -> date:
444
444
  """
445
445
  Add Whit Sunday (49 days after Easter Sunday).
446
446
 
@@ -450,7 +450,7 @@ class ChristianHolidays:
450
450
  Feast of Weeks.
451
451
  https://en.wikipedia.org/wiki/Pentecost
452
452
  """
453
- return self._add_holiday(name, _timedelta(self._easter_sunday, +49))
453
+ return self._add_holiday(name, _timedelta(self.__get_easter_sunday(calendar), +49))
454
454
 
455
455
  def _add_trinity_sunday(self, name) -> date:
456
456
  """
holidays/groups/hebrew.py CHANGED
@@ -27,11 +27,11 @@ class HebrewCalendarHolidays:
27
27
  self._hebrew_calendar = _HebrewLunisolar()
28
28
 
29
29
  def _add_hebrew_calendar_holiday(
30
- self, name: str, hol_date: date, days_delta: Union[int, Iterable[int]] = 0
30
+ self, name: str, holiday_date: date, days_delta: Union[int, Iterable[int]] = 0
31
31
  ) -> set[date]:
32
32
  added_dates = set()
33
33
  for delta in (days_delta,) if isinstance(days_delta, int) else days_delta:
34
- if dt := self._add_holiday(name, _timedelta(hol_date, delta)):
34
+ if dt := self._add_holiday(name, _timedelta(holiday_date, delta)):
35
35
  added_dates.add(dt)
36
36
  return added_dates
37
37
 
@@ -373,6 +373,23 @@ class IslamicHolidays(EasternCalendarHolidays):
373
373
  name, self._islamic_calendar.nuzul_al_quran_dates(self._year)
374
374
  )
375
375
 
376
+ def _add_prophet_baptism_day(self, name) -> set[date]:
377
+ """
378
+ Add Prophet's Baptism.
379
+
380
+ Celebrated one week after the Prophet Mohammed's Birthday, this
381
+ marks the traditional Islamic birth rites that take place seven
382
+ days after birth. While it is not recognized in mainstream Islam,
383
+ Mali celebrates it as a cultural-religious public holiday that
384
+ reflects the local interpretation and honor of the Prophet Muhammad.
385
+ The term "baptism" is symbolic and not literal - there's no Islamic
386
+ ritual akin to Christian baptism.
387
+ https://www.officeholidays.com/holidays/mali/prophets-baptism
388
+ """
389
+ return self._add_islamic_calendar_holiday(
390
+ name, self._islamic_calendar.mawlid_dates(self._year), days_delta=+7
391
+ )
392
+
376
393
  def _add_prophet_death_day(self, name) -> set[date]:
377
394
  """
378
395
  Add death of Prophet Muhammad and Hasan ibn Ali day (28th day of 2nd month).
holidays/holiday_base.py CHANGED
@@ -44,7 +44,7 @@ from holidays.constants import HOLIDAY_NAME_DELIMITER, PUBLIC, DEFAULT_START_YEA
44
44
  from holidays.helpers import _normalize_arguments, _normalize_tuple
45
45
 
46
46
  CategoryArg = Union[str, Iterable[str]]
47
- DateArg = Union[date, tuple[int, int]]
47
+ DateArg = Union[date, tuple[int, int], tuple[int, int, int]]
48
48
  DateLike = Union[date, datetime, str, float, int]
49
49
  SpecialHoliday = Union[tuple[int, int, str], tuple[tuple[int, int, str], ...]]
50
50
  SubstitutedHoliday = Union[
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -151,7 +151,9 @@ class ObservedHolidayBase(HolidayBase):
151
151
  if dt is None:
152
152
  return False, None
153
153
 
154
- dt = dt if isinstance(dt, date) else date(self._year, *dt)
154
+ # Use as is if already a date.
155
+ # Convert to date: (m, d) → use self._year; (y, m, d) → use directly.
156
+ dt = dt if isinstance(dt, date) else date(self._year, *dt) if len(dt) == 2 else date(*dt)
155
157
 
156
158
  if not self.observed or not self._is_observed(dt):
157
159
  return False, dt