holidays 0.81__py3-none-any.whl → 0.82__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 (98) 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/thai.py +49 -2
  5. holidays/countries/__init__.py +10 -0
  6. holidays/countries/afghanistan.py +7 -5
  7. holidays/countries/algeria.py +89 -24
  8. holidays/countries/antarctica.py +58 -0
  9. holidays/countries/bouvet_island.py +31 -0
  10. holidays/countries/brazil.py +1 -1
  11. holidays/countries/british_indian_ocean_territory.py +31 -0
  12. holidays/countries/bulgaria.py +6 -1
  13. holidays/countries/chile.py +9 -8
  14. holidays/countries/cuba.py +3 -4
  15. holidays/countries/djibouti.py +1 -1
  16. holidays/countries/heard_island_and_mcdonald_islands.py +31 -0
  17. holidays/countries/hungary.py +4 -5
  18. holidays/countries/india.py +6 -0
  19. holidays/countries/japan.py +22 -18
  20. holidays/countries/jordan.py +6 -3
  21. holidays/countries/kuwait.py +6 -3
  22. holidays/countries/malaysia.py +14 -3
  23. holidays/countries/myanmar.py +195 -0
  24. holidays/countries/north_korea.py +161 -0
  25. holidays/countries/norway.py +23 -8
  26. holidays/countries/oman.py +6 -2
  27. holidays/countries/paraguay.py +70 -23
  28. holidays/countries/portugal.py +5 -6
  29. holidays/countries/qatar.py +5 -2
  30. holidays/countries/rwanda.py +6 -1
  31. holidays/countries/saudi_arabia.py +6 -5
  32. holidays/countries/serbia.py +5 -0
  33. holidays/countries/south_africa.py +96 -53
  34. holidays/countries/south_korea.py +6 -1
  35. holidays/countries/spain.py +4 -4
  36. holidays/countries/sudan.py +6 -3
  37. holidays/countries/switzerland.py +169 -3
  38. holidays/countries/taiwan.py +22 -2
  39. holidays/countries/tanzania.py +6 -1
  40. holidays/countries/thailand.py +21 -0
  41. holidays/countries/tonga.py +6 -1
  42. holidays/countries/trinidad_and_tobago.py +6 -1
  43. holidays/countries/united_arab_emirates.py +9 -2
  44. holidays/countries/united_states.py +16 -0
  45. holidays/countries/uruguay.py +6 -1
  46. holidays/countries/vietnam.py +6 -1
  47. holidays/countries/yemen.py +6 -3
  48. holidays/groups/__init__.py +1 -0
  49. holidays/groups/balinese_saka.py +1 -1
  50. holidays/groups/buddhist.py +1 -1
  51. holidays/groups/burmese.py +273 -0
  52. holidays/groups/chinese.py +25 -0
  53. holidays/groups/custom.py +8 -2
  54. holidays/groups/eastern.py +24 -0
  55. holidays/groups/hebrew.py +16 -14
  56. holidays/groups/hindu.py +15 -13
  57. holidays/groups/islamic.py +43 -48
  58. holidays/groups/mongolian.py +1 -1
  59. holidays/groups/sinhala.py +4 -9
  60. holidays/groups/tibetan.py +3 -4
  61. holidays/holiday_base.py +5 -4
  62. holidays/ical.py +6 -4
  63. holidays/locale/ar/LC_MESSAGES/DZ.mo +0 -0
  64. holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
  65. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  66. holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
  67. holidays/locale/en_US/LC_MESSAGES/DZ.mo +0 -0
  68. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  69. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  70. holidays/locale/en_US/LC_MESSAGES/JP.mo +0 -0
  71. holidays/locale/en_US/LC_MESSAGES/KP.mo +0 -0
  72. holidays/locale/en_US/LC_MESSAGES/MM.mo +0 -0
  73. holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
  74. holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
  75. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  76. holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
  77. holidays/locale/fr/LC_MESSAGES/DZ.mo +0 -0
  78. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  79. holidays/locale/ja/LC_MESSAGES/JP.mo +0 -0
  80. holidays/locale/ko_KP/LC_MESSAGES/KP.mo +0 -0
  81. holidays/locale/my/LC_MESSAGES/MM.mo +0 -0
  82. holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
  83. holidays/locale/th/LC_MESSAGES/JP.mo +0 -0
  84. holidays/locale/th/LC_MESSAGES/MM.mo +0 -0
  85. holidays/locale/th/LC_MESSAGES/US.mo +0 -0
  86. holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
  87. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  88. holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
  89. holidays/no_holiday_base.py +21 -0
  90. holidays/registry.py +6 -0
  91. holidays/utils.py +5 -5
  92. holidays/version.py +1 -1
  93. {holidays-0.81.dist-info → holidays-0.82.dist-info}/METADATA +47 -5
  94. {holidays-0.81.dist-info → holidays-0.82.dist-info}/RECORD +98 -83
  95. {holidays-0.81.dist-info → holidays-0.82.dist-info}/licenses/CONTRIBUTORS +2 -0
  96. {holidays-0.81.dist-info → holidays-0.82.dist-info}/WHEEL +0 -0
  97. {holidays-0.81.dist-info → holidays-0.82.dist-info}/licenses/LICENSE +0 -0
  98. {holidays-0.81.dist-info → holidays-0.82.dist-info}/top_level.txt +0 -0
@@ -129,15 +129,14 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays):
129
129
  if self._year >= 1911:
130
130
  if 1933 <= self._year <= 1973:
131
131
  # Day of Camões, Portugal, and the Portuguese Race.
132
- self._add_holiday_jun_10(tr("Dia de Camões, de Portugal e da Raça"))
132
+ name = tr("Dia de Camões, de Portugal e da Raça")
133
133
  elif self._year >= 1978:
134
- self._add_holiday_jun_10(
135
- # Day of Portugal, Camões, and the Portuguese Communities.
136
- tr("Dia de Portugal, de Camões e das Comunidades Portuguesas")
137
- )
134
+ # Day of Portugal, Camões, and the Portuguese Communities.
135
+ name = tr("Dia de Portugal, de Camões e das Comunidades Portuguesas")
138
136
  else:
139
137
  # Portugal Day.
140
- self._add_holiday_jun_10(tr("Dia de Portugal"))
138
+ name = tr("Dia de Portugal")
139
+ self._add_holiday_jun_10(name)
141
140
 
142
141
  # Assumption Day.
143
142
  self._add_assumption_of_mary_day(tr("Assunção de Nossa Senhora"))
@@ -10,6 +10,7 @@
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
@@ -36,6 +37,7 @@ class Qatar(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays)
36
37
  start_year = 1971
37
38
  supported_categories = (BANK, PUBLIC)
38
39
  supported_languages = ("ar_QA", "en_US")
40
+ weekend = {FRI, SAT}
39
41
 
40
42
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
41
43
  """
@@ -51,10 +53,11 @@ class Qatar(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays)
51
53
  StaticHolidays.__init__(self, QatarStaticHolidays)
52
54
  super().__init__(*args, **kwargs)
53
55
 
54
- def _populate_public_holidays(self):
56
+ def _get_weekend(self, dt: date) -> set[int]:
55
57
  # Qatar switches from THU-FRI to FRI-SAT on Aug 1, 2003.
56
- self.weekend = {THU, FRI} if self._year <= 2003 else {FRI, SAT}
58
+ return {FRI, SAT} if dt >= date(2003, AUG, 1) else {THU, FRI}
57
59
 
60
+ def _populate_public_holidays(self):
58
61
  if self._year >= 2012:
59
62
  # National Sports Day.
60
63
  self._add_holiday_2nd_tue_of_feb(tr("اليوم الوطني للرياضة"))
@@ -10,8 +10,10 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
- from datetime import date
13
+ from __future__ import annotations
14
+
14
15
  from gettext import gettext as tr
16
+ from typing import TYPE_CHECKING
15
17
 
16
18
  from holidays.calendars import _CustomIslamicHolidays
17
19
  from holidays.calendars.gregorian import MAR, JUN, JUL, AUG
@@ -22,6 +24,9 @@ from holidays.observed_holiday_base import (
22
24
  SAT_SUN_TO_NEXT_WORKDAY,
23
25
  )
24
26
 
27
+ if TYPE_CHECKING:
28
+ from datetime import date
29
+
25
30
 
26
31
  class Rwanda(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
27
32
  """Rwanda holidays.
@@ -14,7 +14,7 @@ from datetime import date
14
14
  from gettext import gettext as tr
15
15
 
16
16
  from holidays.calendars import _CustomIslamicHolidays
17
- from holidays.calendars.gregorian import SEP, NOV, THU, FRI, SAT, _timedelta
17
+ from holidays.calendars.gregorian import JUN, SEP, NOV, THU, FRI, SAT, _timedelta
18
18
  from holidays.groups import IslamicHolidays, StaticHolidays
19
19
  from holidays.observed_holiday_base import (
20
20
  ObservedHolidayBase,
@@ -46,6 +46,7 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
46
46
  # %s (observed, estimated).
47
47
  observed_estimated_label = tr("%s (المقدرة، ملاحظة)")
48
48
  supported_languages = ("ar", "en_US")
49
+ weekend = {FRI, SAT}
49
50
 
50
51
  def __init__(self, *args, islamic_show_estimated: bool = False, **kwargs):
51
52
  """Saudi Arabia has traditionally used the Umm al-Qura calendar
@@ -71,16 +72,16 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays):
71
72
  for i in range(4):
72
73
  self._add_observed(_timedelta(dt, -i), name=self[dt], rule=observed_rule)
73
74
 
74
- def _populate_public_holidays(self):
75
+ def _get_weekend(self, dt: date) -> set[int]:
75
76
  # Weekend used to be THU, FRI before June 28th, 2013.
76
- # On that year both Eids were after that date, and Founding day
77
- # holiday started at 2022; so what below works.
77
+ return {FRI, SAT} if dt >= date(2013, JUN, 28) else {THU, FRI}
78
+
79
+ def _populate_public_holidays(self):
78
80
  self._observed_rule = (
79
81
  THU_TO_PREV_WED + FRI_TO_NEXT_SAT
80
82
  if self._year <= 2012
81
83
  else FRI_TO_PREV_THU + SAT_TO_NEXT_SUN
82
84
  )
83
- self.weekend = {THU, FRI} if self._year <= 2012 else {FRI, SAT}
84
85
 
85
86
  # Eid al-Fitr Holiday.
86
87
  eid_al_fitr_name = tr("عطلة عيد الفطر")
@@ -28,6 +28,8 @@ class Serbia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
28
28
  default_language = "sr"
29
29
  # %s (observed).
30
30
  observed_label = tr("%s (слободан дан)")
31
+ # Independence Restored on June 5th, 2006.
32
+ start_year = 2007
31
33
  supported_languages = ("en_US", "sr")
32
34
 
33
35
  def __init__(self, *args, **kwargs):
@@ -64,10 +66,13 @@ class Serbia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
64
66
 
65
67
  # Good Friday.
66
68
  self._add_good_friday(tr("Велики петак"))
69
+
67
70
  # Holy Saturday.
68
71
  self._add_holy_saturday(tr("Велика субота"))
72
+
69
73
  # Easter Sunday.
70
74
  self._add_easter_sunday(tr("Васкрс"))
75
+
71
76
  # Easter Monday.
72
77
  self._add_easter_monday(tr("Други дан Васкрса"))
73
78
 
@@ -20,15 +20,18 @@ class SouthAfrica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
20
20
 
21
21
  References:
22
22
  * <https://web.archive.org/web/20250424073852/https://www.gov.za/about-sa/public-holidays>
23
+ * [Act No. 36, 1994](https://web.archive.org/web/20250914045710/https://www.gov.za/sites/default/files/gcis_document/201409/act36of1994.pdf)
24
+ * <https://web.archive.org/web/20250914050022/https://www.ancestors.co.za/origins-of-public-holidays-in-south-africa/>
23
25
  * <https://en.wikipedia.org/wiki/Public_holidays_in_South_Africa>
24
26
  * <https://web.archive.org/web/20240715110800/https://www.gov.za/speeches/president-cyril-ramaphosa-progress-economic-recovery-30-oct-2023-0000>
25
27
  * <https://web.archive.org/web/20250427184315/https://www.gov.za/documents/notices/public-holidays-act-declaration-29-may-2024-public-holiday-23-feb-2024>
26
28
  """
27
29
 
28
30
  country = "ZA"
31
+ # %s (observed).
29
32
  observed_label = "%s (observed)"
30
- # Observed since 1910, with a few name changes
31
- start_year = 1910
33
+ # Public Holidays Act (No. 3 of 1910) came in effect on January 1st, 1911.
34
+ start_year = 1911
32
35
 
33
36
  def __init__(self, *args, **kwargs):
34
37
  ChristianHolidays.__init__(self)
@@ -39,75 +42,113 @@ class SouthAfrica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
39
42
  super().__init__(*args, **kwargs)
40
43
 
41
44
  def _populate_public_holidays(self):
45
+ # New Year's Day.
42
46
  self._add_observed(self._add_new_years_day("New Year's Day"))
43
47
 
48
+ if 1980 <= self._year <= 1994:
49
+ # Founder's Day.
50
+ self._add_holiday_apr_6("Founder's Day")
51
+ elif 1952 <= self._year <= 1973:
52
+ # Van Riebeeck's Day.
53
+ self._add_holiday_apr_6("Van Riebeeck's Day")
54
+
55
+ # Good Friday.
44
56
  self._add_good_friday("Good Friday")
45
57
 
46
- self._add_easter_monday("Family Day" if self._year >= 1980 else "Easter Monday")
58
+ if self._year <= 1979:
59
+ # Easter Monday.
60
+ self._add_easter_monday("Easter Monday")
47
61
 
48
- if self._year <= 1951:
49
- name = "Dingaan's Day"
50
- elif self._year <= 1979:
51
- name = "Day of the Covenant"
52
- elif self._year <= 1994:
53
- name = "Day of the Vow"
54
- else:
55
- name = "Day of Reconciliation"
56
- self._add_observed(self._add_holiday_dec_16(name))
62
+ # Family Day.
63
+ name = "Family Day"
64
+ if self._year >= 1980:
65
+ self._add_easter_monday(name)
66
+ elif 1961 <= self._year <= 1973:
67
+ self._add_holiday_jul_10(name)
57
68
 
58
- self._add_christmas_day("Christmas Day")
59
-
60
- self._add_observed(
61
- self._add_christmas_day_two("Day of Goodwill" if self._year >= 1980 else "Boxing Day")
62
- )
69
+ # Workers' Day.
70
+ name = "Workers' Day"
71
+ if self._year >= 1995:
72
+ self._add_observed(self._add_labor_day(name))
73
+ elif 1987 <= self._year <= 1989:
74
+ self._add_holiday_1st_fri_of_may(name)
63
75
 
64
76
  if self._year >= 1995:
77
+ # Human Rights Day.
65
78
  self._add_observed(self._add_holiday_mar_21("Human Rights Day"))
66
79
 
80
+ # Freedom Day.
67
81
  self._add_observed(self._add_holiday_apr_27("Freedom Day"))
68
82
 
69
- self._add_observed(self._add_labor_day("Workers' Day"))
70
-
83
+ # Youth Day.
71
84
  self._add_observed(self._add_holiday_jun_16("Youth Day"))
72
85
 
86
+ # National Women's Day.
73
87
  self._add_observed(self._add_holiday_aug_9("National Women's Day"))
74
88
 
89
+ # Heritage Day.
75
90
  self._add_observed(self._add_holiday_sep_24("Heritage Day"))
76
-
77
- # Historic public holidays no longer observed
78
- if 1952 <= self._year <= 1973:
79
- self._add_holiday_apr_6("Van Riebeeck's Day")
80
- elif 1980 <= self._year <= 1994:
81
- self._add_holiday_apr_6("Founder's Day")
82
-
83
- if 1987 <= self._year <= 1989:
84
- self._add_holiday_1st_fri_of_may("Workers' Day")
85
-
86
- if self._year <= 1993:
91
+ elif self._year <= 1993:
92
+ self._add_holiday_may_31(
93
+ # Republic Day.
94
+ "Republic Day"
95
+ if self._year >= 1961
96
+ # Union Day.
97
+ else "Union Day"
98
+ )
99
+
100
+ # Ascension Day.
87
101
  self._add_ascension_thursday("Ascension Day")
88
102
 
89
- if self._year <= 1951:
90
- self._add_holiday_may_24("Empire Day")
103
+ if self._year >= 1952:
104
+ # Kruger Day.
105
+ self._add_holiday_oct_10("Kruger Day")
91
106
 
92
- if self._year <= 1960:
93
- self._add_holiday_may_31("Union Day")
94
- elif self._year <= 1993:
95
- self._add_holiday_may_31("Republic Day")
107
+ if self._year >= 1952:
108
+ if self._year <= 1960:
109
+ # Queen's Birthday.
110
+ self._add_holiday_2nd_mon_of_jul("Queen's Birthday")
96
111
 
97
- if 1952 <= self._year <= 1960:
98
- self._add_holiday_2nd_mon_of_jul("Queen's Birthday")
112
+ if self._year <= 1979:
113
+ # Settlers' Day.
114
+ self._add_holiday_1st_mon_of_sep("Settlers' Day")
115
+ else:
116
+ # According to our sources, Act No. 3 of 1910 supposedly uses the term "Victoria Day"
117
+ # but as we can't find the original document and that Empire Day was supposed
118
+ # instituted empire-wide circa 1904 - we'll stick with its latter name for now.
99
119
 
100
- if 1961 <= self._year <= 1973:
101
- self._add_holiday_jul_10("Family Day")
120
+ # Empire Day.
121
+ self._add_holiday_may_24("Empire Day")
102
122
 
103
- if self._year <= 1951:
123
+ # King's Birthday.
104
124
  self._add_holiday_1st_mon_of_aug("King's Birthday")
105
125
 
106
- if 1952 <= self._year <= 1979:
107
- self._add_holiday_1st_mon_of_sep("Settlers' Day")
126
+ if self._year >= 1995:
127
+ # Day of Reconciliation.
128
+ name = "Day of Reconciliation"
129
+ elif self._year >= 1980:
130
+ # Day of the Vow.
131
+ name = "Day of the Vow"
132
+ elif self._year >= 1952:
133
+ # Day of the Covenant.
134
+ name = "Day of the Covenant"
135
+ else:
136
+ # Dingaan's Day.
137
+ name = "Dingaan's Day"
138
+ self._add_observed(self._add_holiday_dec_16(name))
139
+
140
+ # Christmas Day.
141
+ self._add_christmas_day("Christmas Day")
108
142
 
109
- if 1952 <= self._year <= 1993:
110
- self._add_holiday_oct_10("Kruger Day")
143
+ self._add_observed(
144
+ self._add_christmas_day_two(
145
+ # Day of Goodwill.
146
+ "Day of Goodwill"
147
+ if self._year >= 1980
148
+ # Boxing Day.
149
+ else "Boxing Day"
150
+ )
151
+ )
111
152
 
112
153
 
113
154
  class ZA(SouthAfrica):
@@ -119,11 +160,14 @@ class ZAF(SouthAfrica):
119
160
 
120
161
 
121
162
  class SouthAfricaStaticHolidays:
122
- local_elections = "Local government elections"
123
- municipal_elections = "Municipal elections"
124
- national_and_provincial_elections = "National and provincial government elections"
125
- presidential_decree_holiday = "Public holiday by presidential decree"
126
- y2k_changeover = "Y2K changeover"
163
+ # Local Government Elections.
164
+ local_elections = "Local Government Elections"
165
+ # National and Provincial Government Elections.
166
+ national_and_provincial_elections = "National and Provincial Government Elections"
167
+ # Public Holiday by Presidential Decree.
168
+ presidential_decree_holiday = "Public Holiday by Presidential Decree"
169
+ # Y2K Changeover.
170
+ y2k_changeover = "Y2K Changeover"
127
171
  special_public_holidays = {
128
172
  1999: (
129
173
  (JUN, 2, national_and_provincial_elections),
@@ -144,13 +188,12 @@ class SouthAfricaStaticHolidays:
144
188
  (DEC, 27, presidential_decree_holiday),
145
189
  ),
146
190
  2019: (MAY, 8, national_and_provincial_elections),
147
- 2021: (NOV, 1, municipal_elections),
191
+ # Municipal elections.
192
+ 2021: (NOV, 1, "Municipal elections"),
148
193
  2022: (DEC, 27, presidential_decree_holiday),
149
- # Winning the 2023 Rugby World Cup
150
194
  2023: (DEC, 15, presidential_decree_holiday),
151
195
  2024: (MAY, 29, national_and_provincial_elections),
152
196
  }
153
-
154
197
  special_public_holidays_observed = {
155
198
  # https://web.archive.org/web/20120328122217/http://www.info.gov.za/speeches/1999/991028409p1002.htm
156
199
  2000: (JAN, 3, y2k_changeover),
@@ -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:
@@ -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