holidays 0.80__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 (142) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/burmese.py +319 -0
  3. holidays/calendars/chinese.py +39 -1
  4. holidays/calendars/hebrew.py +2 -2
  5. holidays/calendars/thai.py +49 -2
  6. holidays/countries/__init__.py +16 -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/bouvet_island.py +31 -0
  11. holidays/countries/brazil.py +1 -1
  12. holidays/countries/british_indian_ocean_territory.py +31 -0
  13. holidays/countries/bulgaria.py +6 -1
  14. holidays/countries/chile.py +9 -8
  15. holidays/countries/china.py +4 -0
  16. holidays/countries/cuba.py +3 -4
  17. holidays/countries/djibouti.py +1 -1
  18. holidays/countries/heard_island_and_mcdonald_islands.py +31 -0
  19. holidays/countries/hongkong.py +5 -1
  20. holidays/countries/hungary.py +4 -5
  21. holidays/countries/india.py +6 -0
  22. holidays/countries/japan.py +22 -18
  23. holidays/countries/jordan.py +6 -3
  24. holidays/countries/kuwait.py +6 -3
  25. holidays/countries/macau.py +9 -0
  26. holidays/countries/malaysia.py +14 -3
  27. holidays/countries/mongolia.py +2 -0
  28. holidays/countries/myanmar.py +195 -0
  29. holidays/countries/north_korea.py +161 -0
  30. holidays/countries/norway.py +23 -8
  31. holidays/countries/oman.py +6 -2
  32. holidays/countries/paraguay.py +70 -23
  33. holidays/countries/philippines.py +11 -2
  34. holidays/countries/portugal.py +5 -6
  35. holidays/countries/qatar.py +5 -2
  36. holidays/countries/rwanda.py +6 -1
  37. holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py +197 -0
  38. holidays/countries/saudi_arabia.py +6 -5
  39. holidays/countries/serbia.py +5 -0
  40. holidays/countries/south_africa.py +96 -53
  41. holidays/countries/south_korea.py +10 -1
  42. holidays/countries/spain.py +26 -4
  43. holidays/countries/sudan.py +118 -0
  44. holidays/countries/switzerland.py +169 -3
  45. holidays/countries/taiwan.py +27 -3
  46. holidays/countries/tajikistan.py +1 -1
  47. holidays/countries/tanzania.py +6 -1
  48. holidays/countries/thailand.py +21 -0
  49. holidays/countries/tonga.py +6 -1
  50. holidays/countries/trinidad_and_tobago.py +6 -1
  51. holidays/countries/united_arab_emirates.py +9 -2
  52. holidays/countries/united_states.py +16 -0
  53. holidays/countries/uruguay.py +6 -1
  54. holidays/countries/vietnam.py +10 -1
  55. holidays/countries/yemen.py +6 -3
  56. holidays/groups/__init__.py +1 -0
  57. holidays/groups/balinese_saka.py +1 -1
  58. holidays/groups/buddhist.py +1 -1
  59. holidays/groups/burmese.py +273 -0
  60. holidays/groups/chinese.py +27 -14
  61. holidays/groups/custom.py +8 -2
  62. holidays/groups/eastern.py +25 -3
  63. holidays/groups/hebrew.py +16 -14
  64. holidays/groups/hindu.py +15 -13
  65. holidays/groups/islamic.py +52 -47
  66. holidays/groups/mongolian.py +1 -1
  67. holidays/groups/sinhala.py +4 -9
  68. holidays/groups/tibetan.py +3 -4
  69. holidays/holiday_base.py +5 -4
  70. holidays/ical.py +6 -4
  71. holidays/locale/ar/LC_MESSAGES/DZ.mo +0 -0
  72. holidays/locale/ar_SD/LC_MESSAGES/SD.mo +0 -0
  73. holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
  74. holidays/locale/en_GB/LC_MESSAGES/SH.mo +0 -0
  75. holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
  76. holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
  77. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  78. holidays/locale/en_PH/LC_MESSAGES/PH.mo +0 -0
  79. holidays/locale/en_US/LC_MESSAGES/BR.mo +0 -0
  80. holidays/locale/en_US/LC_MESSAGES/CN.mo +0 -0
  81. holidays/locale/en_US/LC_MESSAGES/DZ.mo +0 -0
  82. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  83. holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
  84. holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
  85. holidays/locale/en_US/LC_MESSAGES/JP.mo +0 -0
  86. holidays/locale/en_US/LC_MESSAGES/KP.mo +0 -0
  87. holidays/locale/en_US/LC_MESSAGES/KR.mo +0 -0
  88. holidays/locale/en_US/LC_MESSAGES/MM.mo +0 -0
  89. holidays/locale/en_US/LC_MESSAGES/MN.mo +0 -0
  90. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  91. holidays/locale/en_US/LC_MESSAGES/PH.mo +0 -0
  92. holidays/locale/en_US/LC_MESSAGES/PY.mo +0 -0
  93. holidays/locale/en_US/LC_MESSAGES/SD.mo +0 -0
  94. holidays/locale/en_US/LC_MESSAGES/SH.mo +0 -0
  95. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  96. holidays/locale/en_US/LC_MESSAGES/US.mo +0 -0
  97. holidays/locale/en_US/LC_MESSAGES/VN.mo +0 -0
  98. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  99. holidays/locale/es/LC_MESSAGES/PY.mo +0 -0
  100. holidays/locale/fil/LC_MESSAGES/PH.mo +0 -0
  101. holidays/locale/fr/LC_MESSAGES/DZ.mo +0 -0
  102. holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
  103. holidays/locale/ja/LC_MESSAGES/JP.mo +0 -0
  104. holidays/locale/ko/LC_MESSAGES/KR.mo +0 -0
  105. holidays/locale/ko_KP/LC_MESSAGES/KP.mo +0 -0
  106. holidays/locale/mn/LC_MESSAGES/MN.mo +0 -0
  107. holidays/locale/my/LC_MESSAGES/MM.mo +0 -0
  108. holidays/locale/pt_BR/LC_MESSAGES/BR.mo +0 -0
  109. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  110. holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
  111. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  112. holidays/locale/th/LC_MESSAGES/JP.mo +0 -0
  113. holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
  114. holidays/locale/th/LC_MESSAGES/MM.mo +0 -0
  115. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  116. holidays/locale/th/LC_MESSAGES/PH.mo +0 -0
  117. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  118. holidays/locale/th/LC_MESSAGES/US.mo +0 -0
  119. holidays/locale/th/LC_MESSAGES/VN.mo +0 -0
  120. holidays/locale/uk/LC_MESSAGES/BR.mo +0 -0
  121. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  122. holidays/locale/uk/LC_MESSAGES/PY.mo +0 -0
  123. holidays/locale/vi/LC_MESSAGES/VN.mo +0 -0
  124. holidays/locale/zh_CN/LC_MESSAGES/CN.mo +0 -0
  125. holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
  126. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  127. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  128. holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
  129. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  130. holidays/locale/zh_TW/LC_MESSAGES/CN.mo +0 -0
  131. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  132. holidays/no_holiday_base.py +21 -0
  133. holidays/observed_holiday_base.py +1 -1
  134. holidays/registry.py +12 -0
  135. holidays/utils.py +5 -5
  136. holidays/version.py +1 -1
  137. {holidays-0.80.dist-info → holidays-0.82.dist-info}/METADATA +61 -5
  138. {holidays-0.80.dist-info → holidays-0.82.dist-info}/RECORD +142 -121
  139. {holidays-0.80.dist-info → holidays-0.82.dist-info}/licenses/CONTRIBUTORS +2 -0
  140. {holidays-0.80.dist-info → holidays-0.82.dist-info}/WHEEL +0 -0
  141. {holidays-0.80.dist-info → holidays-0.82.dist-info}/licenses/LICENSE +0 -0
  142. {holidays-0.80.dist-info → holidays-0.82.dist-info}/top_level.txt +0 -0
@@ -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,
@@ -81,6 +86,10 @@ class SouthKorea(
81
86
  country = "KR"
82
87
  supported_categories = (BANK, PUBLIC)
83
88
  default_language = "ko"
89
+ # %s (estimated).
90
+ estimated_label = tr("%s (추정)")
91
+ # Alternative holiday for %s (estimated).
92
+ observed_estimated_label = tr("%s 대체 휴일 (추정)")
84
93
  # Alternative holiday for %s.
85
94
  observed_label = tr("%s 대체 휴일")
86
95
  supported_languages = ("en_US", "ko", "th")
@@ -47,6 +47,25 @@ class Spain(
47
47
  * [2024](https://web.archive.org/web/20240401192304/https://www.boe.es/buscar/doc.php?id=BOE-A-2023-22014)
48
48
  * [2025](https://web.archive.org/web/20241226214918/https://www.boe.es/buscar/doc.php?id=BOE-A-2024-21316)
49
49
 
50
+ Subdivisions Holidays References:
51
+ * Navarra:
52
+ * [2010](https://web.archive.org/web/20250903095706/https://www.lexnavarra.navarra.es/detalle.asp?r=8402)
53
+ * [2011](https://web.archive.org/web/20250903095217/https://www.lexnavarra.navarra.es/detalle.asp?r=8403)
54
+ * [2012](https://web.archive.org/web/20250903095133/https://www.lexnavarra.navarra.es/detalle.asp?r=12993)
55
+ * [2013](https://web.archive.org/web/20250903095136/https://www.lexnavarra.navarra.es/detalle.asp?r=26226)
56
+ * [2014](https://web.archive.org/web/20250903095123/https://www.lexnavarra.navarra.es/detalle.asp?r=32382)
57
+ * [2015](https://web.archive.org/web/20250903095257/https://www.lexnavarra.navarra.es/detalle.asp?r=34276)
58
+ * [2016](https://web.archive.org/web/20250903095302/https://www.lexnavarra.navarra.es/detalle.asp?r=36141)
59
+ * [2017](https://web.archive.org/web/20250903095306/https://www.lexnavarra.navarra.es/detalle.asp?r=37665)
60
+ * [2018](https://web.archive.org/web/20170728130845/https://www.lexnavarra.navarra.es/detalle.asp?r=38904)
61
+ * [2019](https://web.archive.org/web/20250903095819/https://www.lexnavarra.navarra.es/detalle.asp?r=50305)
62
+ * [2020](https://web.archive.org/web/20250623005808/https://www.lexnavarra.navarra.es/detalle.asp?r=52229)
63
+ * [2021](https://web.archive.org/web/20250623010750/https://www.lexnavarra.navarra.es/detalle.asp?r=52748)
64
+ * [2022](https://web.archive.org/web/20250623000851/https://www.lexnavarra.navarra.es/detalle.asp?r=53763)
65
+ * [2023](https://web.archive.org/web/20250623010106/https://www.lexnavarra.navarra.es/detalle.asp?r=55481)
66
+ * [2024](https://web.archive.org/web/20250623001355/https://www.lexnavarra.navarra.es/detalle.asp?r=56116)
67
+ * [2025](https://web.archive.org/web/20250622235218/https://www.lexnavarra.navarra.es/detalle.asp?r=57122)
68
+
50
69
  Holidays checked with official sources for 2010-2025 only.
51
70
  """
52
71
 
@@ -102,7 +121,7 @@ class Spain(
102
121
  "La Rioja": "RI",
103
122
  "Valenciana": "VC",
104
123
  }
105
- supported_languages = ("en_US", "es", "uk")
124
+ supported_languages = ("ca", "en_US", "es", "uk")
106
125
 
107
126
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
108
127
  """
@@ -167,7 +186,7 @@ class Spain(
167
186
  self._move_holiday(self._add_epiphany_day(tr("Epifanía del Señor")))
168
187
 
169
188
  # Andalusia Day.
170
- 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")))
171
190
 
172
191
  # Maundy Thursday.
173
192
  self._add_holy_thursday(tr("Jueves Santo"))
@@ -241,7 +260,7 @@ class Spain(
241
260
  if self._year in {2010, 2021}:
242
261
  self._move_holiday(self._add_assumption_of_mary_day(tr("Asunción de la Virgen")))
243
262
 
244
- # Asturia Day.
263
+ # Asturias Day.
245
264
  self._move_holiday(self._add_holiday_sep_8(tr("Día de Asturias")))
246
265
 
247
266
  if self._year in {2014, 2025}:
@@ -282,7 +301,7 @@ class Spain(
282
301
  self._add_holiday_jul_28(tr("Día de las Instituciones de Cantabria"))
283
302
 
284
303
  if self._year not in {2013, 2019, 2024}:
285
- # Our Lady of the Bien Aparecida.
304
+ # Our Lady of Bien Aparecida.
286
305
  self._add_holiday_sep_15(tr("La Bien Aparecida"))
287
306
 
288
307
  if self._year == 2015:
@@ -641,6 +660,9 @@ class Spain(
641
660
  if self._year in {2011, 2013, 2015, 2016, 2017} or self._year >= 2022:
642
661
  self._add_saint_james_day(tr("Santiago Apóstol"))
643
662
 
663
+ # Saint Francis Xavier's Day.
664
+ self._move_holiday(self._add_holiday_dec_3(tr("San Francisco Javier")))
665
+
644
666
  if self._year == 2020:
645
667
  self._move_holiday(self._add_holiday_dec_6(tr("Día de la Constitución Española")))
646
668
 
@@ -0,0 +1,118 @@
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 datetime import date
14
+ from gettext import gettext as tr
15
+
16
+ from holidays.calendars import _CustomIslamicHolidays
17
+ from holidays.calendars.gregorian import JAN, MAY, JUL, AUG, SEP, FRI, SAT
18
+ from holidays.calendars.julian import JULIAN_CALENDAR
19
+ from holidays.groups import ChristianHolidays, IslamicHolidays
20
+ from holidays.holiday_base import HolidayBase
21
+
22
+
23
+ class Sudan(HolidayBase, ChristianHolidays, IslamicHolidays):
24
+ """Sudan holidays.
25
+
26
+ References:
27
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Sudan>
28
+ * <https://web.archive.org/web/20250820070831/https://www.sudanembassy.org.uk/public-holidays/>
29
+ * [Christian Holidays 2011-2018](https://web.archive.org/web/20250827155208/https://evangelicalfocus.com/world/5014/christmas-celebrations-mark-progress-of-religious-freedom-in-sudan)
30
+ """
31
+
32
+ country = "SD"
33
+ default_language = "ar_SD"
34
+ # %s (estimated).
35
+ estimated_label = tr("%s (المقدرة)")
36
+ supported_languages = ("ar_SD", "en_US")
37
+ start_year = 1985
38
+ weekend = {FRI, SAT}
39
+
40
+ def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
41
+ ChristianHolidays.__init__(self)
42
+ IslamicHolidays.__init__(
43
+ self, cls=SudanIslamicHolidays, show_estimated=islamic_show_estimated
44
+ )
45
+ super().__init__(*args, **kwargs)
46
+
47
+ def _get_weekend(self, dt: date) -> set[int]:
48
+ # The resting days are Friday and Saturday since January 26th, 2008.
49
+ # https://sudantribune.com/article25544/
50
+ return {FRI, SAT} if dt >= date(2008, JAN, 26) else {FRI}
51
+
52
+ def _populate_public_holidays(self):
53
+ # Independence Day.
54
+ self._add_holiday_jan_1(tr("عيد الإستقلال"))
55
+
56
+ # Christian public holidays were suspended 2011–2018 and reinstated in 2019.
57
+ if self._year <= 2010 or self._year >= 2019:
58
+ # Coptic Christmas Day.
59
+ self._add_christmas_day(tr("عيد الميلاد المجيد"), calendar=JULIAN_CALENDAR)
60
+
61
+ # Coptic Easter.
62
+ self._add_easter_sunday(tr("عيد الفصح القبطي"), calendar=JULIAN_CALENDAR)
63
+
64
+ # Christmas Day.
65
+ self._add_christmas_day(tr("عيد الميلاد"))
66
+
67
+ # Islamic New Year.
68
+ self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
69
+
70
+ # Prophet's Birthday.
71
+ self._add_mawlid_day(tr("المولد النبوي الشريف"))
72
+
73
+ # Eid al-Fitr.
74
+ name = tr("عيد الفطر المبارك")
75
+ self._add_eid_al_fitr_day(name)
76
+ self._add_eid_al_fitr_day_two(name)
77
+ self._add_eid_al_fitr_day_three(name)
78
+
79
+ if self._year >= 2020:
80
+ self._add_eid_al_fitr_day_four(name)
81
+
82
+ # Eid al-Adha.
83
+ name = tr("عيد الأضحى المبارك")
84
+ self._add_arafah_day(name)
85
+ self._add_eid_al_adha_day(name)
86
+ self._add_eid_al_adha_day_two(name)
87
+ self._add_eid_al_adha_day_three(name)
88
+ self._add_eid_al_adha_day_four(name)
89
+
90
+
91
+ class SD(Sudan):
92
+ pass
93
+
94
+
95
+ class SDN(Sudan):
96
+ pass
97
+
98
+
99
+ class SudanIslamicHolidays(_CustomIslamicHolidays):
100
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
101
+ EID_AL_ADHA_DATES = {
102
+ 2022: (JUL, 10),
103
+ }
104
+
105
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2020, 2025)
106
+ EID_AL_FITR_DATES = {
107
+ 2022: (MAY, 1),
108
+ }
109
+
110
+ HIJRI_NEW_YEAR_DATES_CONFIRMED_YEARS = (2020, 2025)
111
+ HIJRI_NEW_YEAR_DATES = {
112
+ 2021: (AUG, 11),
113
+ }
114
+
115
+ MAWLID_DATES_CONFIRMED_YEARS = (2020, 2025)
116
+ MAWLID_DATES = {
117
+ 2023: (SEP, 28),
118
+ }