holidays 0.80__py3-none-any.whl → 0.81__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 (64) hide show
  1. holidays/calendars/chinese.py +39 -1
  2. holidays/countries/__init__.py +6 -0
  3. holidays/countries/china.py +4 -0
  4. holidays/countries/hongkong.py +5 -1
  5. holidays/countries/macau.py +9 -0
  6. holidays/countries/mongolia.py +2 -0
  7. holidays/countries/philippines.py +11 -2
  8. holidays/countries/saint_helena_ascension_and_tristan_da_cunha.py +197 -0
  9. holidays/countries/south_korea.py +4 -0
  10. holidays/countries/spain.py +22 -0
  11. holidays/countries/sudan.py +115 -0
  12. holidays/countries/taiwan.py +5 -1
  13. holidays/countries/tajikistan.py +1 -1
  14. holidays/countries/vietnam.py +4 -0
  15. holidays/groups/chinese.py +3 -15
  16. holidays/groups/eastern.py +1 -3
  17. holidays/groups/islamic.py +10 -0
  18. holidays/locale/ar_SD/LC_MESSAGES/SD.mo +0 -0
  19. holidays/locale/en_GB/LC_MESSAGES/SH.mo +0 -0
  20. holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
  21. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  22. holidays/locale/en_PH/LC_MESSAGES/PH.mo +0 -0
  23. holidays/locale/en_US/LC_MESSAGES/CN.mo +0 -0
  24. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  25. holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
  26. holidays/locale/en_US/LC_MESSAGES/KR.mo +0 -0
  27. holidays/locale/en_US/LC_MESSAGES/MN.mo +0 -0
  28. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  29. holidays/locale/en_US/LC_MESSAGES/PH.mo +0 -0
  30. holidays/locale/en_US/LC_MESSAGES/SD.mo +0 -0
  31. holidays/locale/en_US/LC_MESSAGES/SH.mo +0 -0
  32. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  33. holidays/locale/en_US/LC_MESSAGES/VN.mo +0 -0
  34. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  35. holidays/locale/fil/LC_MESSAGES/PH.mo +0 -0
  36. holidays/locale/ko/LC_MESSAGES/KR.mo +0 -0
  37. holidays/locale/mn/LC_MESSAGES/MN.mo +0 -0
  38. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  39. holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
  40. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  41. holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
  42. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  43. holidays/locale/th/LC_MESSAGES/PH.mo +0 -0
  44. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  45. holidays/locale/th/LC_MESSAGES/VN.mo +0 -0
  46. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  47. holidays/locale/vi/LC_MESSAGES/VN.mo +0 -0
  48. holidays/locale/zh_CN/LC_MESSAGES/CN.mo +0 -0
  49. holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
  50. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  51. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  52. holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
  53. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  54. holidays/locale/zh_TW/LC_MESSAGES/CN.mo +0 -0
  55. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  56. holidays/observed_holiday_base.py +1 -1
  57. holidays/registry.py +6 -0
  58. holidays/version.py +1 -1
  59. {holidays-0.80.dist-info → holidays-0.81.dist-info}/METADATA +16 -2
  60. {holidays-0.80.dist-info → holidays-0.81.dist-info}/RECORD +64 -58
  61. {holidays-0.80.dist-info → holidays-0.81.dist-info}/WHEEL +0 -0
  62. {holidays-0.80.dist-info → holidays-0.81.dist-info}/licenses/CONTRIBUTORS +0 -0
  63. {holidays-0.80.dist-info → holidays-0.81.dist-info}/licenses/LICENSE +0 -0
  64. {holidays-0.80.dist-info → holidays-0.81.dist-info}/top_level.txt +0 -0
@@ -14,7 +14,7 @@ from datetime import date
14
14
  from typing import Optional
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
- from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, SEP, OCT, NOV
17
+ from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, SEP, OCT, NOV, DEC
18
18
 
19
19
  CHINESE_CALENDAR = "CHINESE_CALENDAR"
20
20
  KOREAN_CALENDAR = "KOREAN_CALENDAR"
@@ -1307,6 +1307,24 @@ class _ChineseLunisolar:
1307
1307
  2053: (FEB, 18),
1308
1308
  }
1309
1309
 
1310
+ WINTER_SOLSTICE_THRESHOLDS: dict[str, dict[str, dict[int, int]]] = {
1311
+ # UTC+7.
1312
+ VIETNAMESE_CALENDAR: {
1313
+ "dec_21": {0: 1980, 1: 2017, 2: 2050, 3: 2083},
1314
+ "dec_23": {3: 1943},
1315
+ },
1316
+ # UTC+8.
1317
+ CHINESE_CALENDAR: {
1318
+ "dec_21": {0: 1988, 1: 2021, 2: 2058, 3: 2091},
1319
+ "dec_23": {3: 1947},
1320
+ },
1321
+ # UTC+9.
1322
+ KOREAN_CALENDAR: {
1323
+ "dec_21": {0: 1992, 1: 2029, 2: 2062, 3: 2099},
1324
+ "dec_23": {3: 1955},
1325
+ },
1326
+ }
1327
+
1310
1328
  def __init__(self, calendar: str = CHINESE_CALENDAR) -> None:
1311
1329
  self.__verify_calendar(calendar)
1312
1330
  self.__calendar = calendar
@@ -1359,6 +1377,26 @@ class _ChineseLunisolar:
1359
1377
  def mid_autumn_date(self, year: int, calendar=None) -> tuple[Optional[date], bool]:
1360
1378
  return self._get_holiday(MID_AUTUMN, year, calendar)
1361
1379
 
1380
+ def winter_solstice_date(self, year: int, calendar=None) -> tuple[Optional[date], bool]:
1381
+ """Return Winter Solstice (22nd solar term in Chinese Lunisolar calendar) date.
1382
+
1383
+ !!! note "Note"
1384
+ This approximation is reliable for 1941-2099 years.
1385
+ """
1386
+ calendar = calendar or self.__calendar
1387
+ self.__verify_calendar(calendar)
1388
+
1389
+ thresholds = self.WINTER_SOLSTICE_THRESHOLDS[calendar]
1390
+ year_mod = year % 4
1391
+ if year >= thresholds["dec_21"][year_mod]:
1392
+ day = 21
1393
+ elif year <= thresholds["dec_23"].get(year_mod, 0):
1394
+ day = 23
1395
+ else:
1396
+ day = 22
1397
+
1398
+ return date(year, DEC, day), not (1941 <= year <= 2099)
1399
+
1362
1400
 
1363
1401
  class _CustomChineseHolidays(_CustomCalendar, _ChineseLunisolar):
1364
1402
  pass
@@ -196,6 +196,11 @@ from holidays.countries.romania import Romania, RO, ROU
196
196
  from holidays.countries.russia import Russia, RU, RUS
197
197
  from holidays.countries.rwanda import Rwanda, RW, RWA
198
198
  from holidays.countries.saint_barthelemy import SaintBarthelemy, BL, BLM, HolidaysBL
199
+ from holidays.countries.saint_helena_ascension_and_tristan_da_cunha import (
200
+ SaintHelenaAscensionAndTristanDaCunha,
201
+ SH,
202
+ SHN,
203
+ )
199
204
  from holidays.countries.saint_kitts_and_nevis import SaintKittsAndNevis, KN, KNA
200
205
  from holidays.countries.saint_lucia import SaintLucia, LC, LCA
201
206
  from holidays.countries.saint_martin import SaintMartin, MF, MAF, HolidaysMF
@@ -234,6 +239,7 @@ from holidays.countries.south_korea import SouthKorea, KR, KOR, Korea
234
239
  from holidays.countries.south_sudan import SouthSudan, SS, SSD
235
240
  from holidays.countries.spain import Spain, ES, ESP
236
241
  from holidays.countries.sri_lanka import SriLanka, LK, LKA
242
+ from holidays.countries.sudan import Sudan, SD, SDN
237
243
  from holidays.countries.suriname import Suriname, SR, SUR
238
244
  from holidays.countries.svalbard_and_jan_mayen import SvalbardAndJanMayen, SJ, SJM, HolidaysSJ
239
245
  from holidays.countries.sweden import Sweden, SE, SWE
@@ -65,6 +65,10 @@ class China(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays,
65
65
  """
66
66
 
67
67
  country = "CN"
68
+ # %s (estimated).
69
+ estimated_label = tr("%s(推定)")
70
+ # %s (observed, estimated).
71
+ observed_estimated_label = tr("%s(观察日,推定)")
68
72
  # %s (observed).
69
73
  observed_label = tr("%s(观察日)")
70
74
  supported_categories = (PUBLIC, HALF_DAY)
@@ -69,8 +69,12 @@ class HongKong(
69
69
  country = "HK"
70
70
  default_language = "zh_HK"
71
71
  default_preferred_discretionary_holidays = (CHRISTMAS,)
72
+ # %s (estimated).
73
+ estimated_label = tr("%s(推定)")
74
+ # %s (observed, estimated).
75
+ observed_estimated_label = tr("%s(補假,推定)")
72
76
  # %s (observed).
73
- observed_label = tr("%s(慶祝)")
77
+ observed_label = tr("%s(補假)")
74
78
  supported_categories = (OPTIONAL, PUBLIC)
75
79
  supported_languages = ("en_HK", "en_US", "th", "zh_CN", "zh_HK")
76
80
  weekend = {SUN}
@@ -62,6 +62,8 @@ class Macau(
62
62
 
63
63
  country = "MO"
64
64
  default_language = "zh_MO"
65
+ # %s (estimated).
66
+ estimated_label = tr("%s(推定)")
65
67
  # Decreto-Lei n.º 4/82/M.
66
68
  start_year = 1982
67
69
  subdivisions = (
@@ -374,6 +376,13 @@ class Macau(
374
376
  # The first working day after %s.
375
377
  else self.tr("%s後首個工作日")
376
378
  )
379
+ self.observed_estimated_label = (
380
+ # Compensatory rest day for %s (estimated).
381
+ self.tr("%s的補假(推定)")
382
+ if self._year >= 2020
383
+ # The first working day after %s (estimated).
384
+ else self.tr("%s後首個工作日(推定)")
385
+ )
377
386
  # Prior to 2012, in-lieus are only given for holidays which falls on Sunday.
378
387
  self._observed_rule = (
379
388
  SUN_TO_NEXT_WORKDAY if self._year <= 2011 else SAT_SUN_TO_NEXT_WORKDAY
@@ -32,6 +32,8 @@ class Mongolia(HolidayBase, InternationalHolidays, MongolianCalendarHolidays):
32
32
 
33
33
  country = "MN"
34
34
  default_language = "mn"
35
+ # %s (estimated).
36
+ estimated_label = tr("%s (урьдчилсан)")
35
37
  start_year = 2004
36
38
  supported_categories = (PUBLIC, WORKDAY)
37
39
  supported_languages = ("en_US", "mn")
@@ -53,6 +53,7 @@ class Philippines(
53
53
  * [Proclamation No. 839/2025](https://archive.org/details/20250320-proc-839-frm_202506)
54
54
  * [Proclamation No. 878/2025](https://archive.org/details/20250506-proc-878-frm_202506)
55
55
  * [Proclamation No. 911/2025](https://archive.org/details/20250521-proc-911-frm_20250606_1800)
56
+ * [Proclamation No. 1006/2025](https://archive.org/details/20250903-proc-1006-frm)
56
57
  """
57
58
 
58
59
  country = "PH"
@@ -240,9 +241,13 @@ class PhilippinesIslamicHolidays(_CustomIslamicHolidays):
240
241
  class PhilippinesStaticHolidays:
241
242
  # Additional special (non-working) day.
242
243
  additional_special = tr("Additional special (non-working) day")
244
+
243
245
  # Elections special (non-working) day.
244
246
  election_special = tr("Elections special (non-working) day")
245
247
 
248
+ # Christmas Eve.
249
+ christmas_eve = tr("Christmas Eve")
250
+
246
251
  special_public_holidays = {
247
252
  2008: (
248
253
  (DEC, 26, additional_special),
@@ -309,7 +314,11 @@ class PhilippinesStaticHolidays:
309
314
  (JUL, 27, additional_special),
310
315
  # All Saints' Day Eve.
311
316
  (OCT, 31, tr("All Saints' Day Eve")),
312
- # Christmas Eve.
313
- (DEC, 24, tr("Christmas Eve")),
317
+ (DEC, 24, christmas_eve),
318
+ ),
319
+ 2026: (
320
+ # All Souls' Day.
321
+ (NOV, 2, tr("All Souls' Day")),
322
+ (DEC, 24, christmas_eve),
314
323
  ),
315
324
  }
@@ -0,0 +1,197 @@
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, FEB, APR, MAY, JUN, SEP
16
+ from holidays.constants import GOVERNMENT, PUBLIC
17
+ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
18
+ from holidays.observed_holiday_base import (
19
+ ObservedHolidayBase,
20
+ SAT_TO_PREV_FRI,
21
+ SUN_TO_NEXT_MON,
22
+ SAT_SUN_TO_NEXT_MON,
23
+ SAT_SUN_TO_NEXT_MON_TUE,
24
+ )
25
+
26
+
27
+ class SaintHelenaAscensionAndTristanDaCunha(
28
+ ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays
29
+ ):
30
+ """Saint Helena, Ascension and Tristan da Cunha holidays.
31
+
32
+ References:
33
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Saint_Helena,_Ascension_and_Tristan_da_Cunha>
34
+
35
+ Saint Helena:
36
+ * <https://web.archive.org/web/20250810194916/https://sainthelenaisland.info/holidays.htm>
37
+ * [Public Holidays Ordinance](https://web.archive.org/web/20231129081100/https://www.sainthelena.gov.sh/wp-content/uploads/2013/01/Public-Holidays-Ordinance.pdf)
38
+ * [2015](https://web.archive.org/web/20241219152350/https://www.sainthelena.gov.sh/wp-content/uploads/2012/08/Public-Holidays-2015.pdf)
39
+ * [2020](https://web.archive.org/web/20250831203105/https://www.sainthelena.gov.sh/wp-content/uploads/2019/11/Public-Holidays-2020.pdf)
40
+ * [2021](https://web.archive.org/web/20240626101426/https://www.sainthelena.gov.sh/wp-content/uploads/2020/08/200824_Public-Holidays-2021.pdf)
41
+ * [2022](https://web.archive.org/web/20230922215102/https://www.sainthelena.gov.sh/wp-content/uploads/2021/11/PUBLIC-HOLIDAYS-2022.pdf)
42
+ * [Saint Helena Day 2023](https://web.archive.org/web/20250519085755/https://www.sainthelena.gov.sh/wp-content/uploads/2022/09/EX-GAZ-100-Proclamation-St-Helena-Day-2023.pdf)
43
+ * [2024](https://web.archive.org/web/20250614201000/https://www.sainthelena.gov.sh/2023/news/public-and-government-holidays-2024/)
44
+ * [2025](https://web.archive.org/web/20241005191212/https://www.sainthelena.gov.sh/wp-content/uploads/2024/08/Public-Notice-Public-Holidays-2025.pdf)
45
+ * [2026](https://web.archive.org/web/20250831200128/https://www.sainthelena.gov.sh/wp-content/uploads/2025/08/Public-Notice-Public-Holidays-2026.pdf)
46
+
47
+ Ascension:
48
+ * [Public Holidays Ordinance](https://web.archive.org/web/20240610184146/https://www.sainthelena.gov.sh/wp-content/uploads/2017/12/Public-Holidays-Asc-Ordinance.pdf)
49
+
50
+ Tristan da Cunha:
51
+ * [Ratting Day](https://web.archive.org/web/20250826151056/https://www.tristandc.com/newsratting.php)
52
+ """
53
+
54
+ country = "SH"
55
+ default_language = "en_GB"
56
+ # %s (observed).
57
+ observed_label = tr("%s (observed)")
58
+ # Earliest year of holidays with an accessible online record.
59
+ start_year = 2015
60
+ subdivisions = (
61
+ "AC", # Ascension.
62
+ "HL", # Saint Helena.
63
+ "TA", # Tristan da Cunha.
64
+ )
65
+ subdivisions_aliases = {
66
+ "Ascension": "AC",
67
+ "Saint Helena": "HL",
68
+ "Tristan da Cunha": "TA",
69
+ }
70
+ supported_categories = (GOVERNMENT, PUBLIC)
71
+ supported_languages = ("en_GB", "en_US")
72
+
73
+ def __init__(self, *args, **kwargs):
74
+ ChristianHolidays.__init__(self)
75
+ InternationalHolidays.__init__(self)
76
+ StaticHolidays.__init__(self, cls=SaintHelenaAscensionAndTristanDaCunhaStaticHolidays)
77
+ kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
78
+ super().__init__(*args, **kwargs)
79
+
80
+ def _populate_public_holidays(self):
81
+ # Good Friday.
82
+ self._add_good_friday(tr("Good Friday"))
83
+
84
+ # Easter Monday.
85
+ self._add_easter_monday(tr("Easter Monday"))
86
+
87
+ if self._year <= 2022:
88
+ # Queen's Birthday.
89
+ name = tr("Queen's Birthday")
90
+ if self._year <= 2019:
91
+ self._add_holiday_3rd_mon_of_jun(name)
92
+ else:
93
+ self._add_holiday_2nd_mon_of_jun(name)
94
+ else:
95
+ # King's Birthday.
96
+ name = tr("King's Birthday")
97
+ if self._year == 2023:
98
+ self._add_holiday_jun_19(name)
99
+ else:
100
+ self._add_holiday_1st_fri_from_nov_11(name)
101
+
102
+ self._add_observed(
103
+ # Christmas Day.
104
+ self._add_christmas_day(tr("Christmas Day")),
105
+ rule=SAT_SUN_TO_NEXT_MON_TUE,
106
+ )
107
+
108
+ self._add_observed(
109
+ # Boxing Day.
110
+ self._add_christmas_day_two(tr("Boxing Day")),
111
+ rule=SAT_SUN_TO_NEXT_MON_TUE,
112
+ )
113
+
114
+ def _populate_subdiv_ac_public_holidays(self):
115
+ # Ascension Day.
116
+ self._add_ascension_thursday(tr("Ascension Day"))
117
+
118
+ def _populate_subdiv_hl_public_holidays(self):
119
+ self._add_observed(
120
+ # Saint Helena Day.
121
+ self._add_holiday_may_21(tr("Saint Helena Day")),
122
+ rule=SAT_TO_PREV_FRI + SUN_TO_NEXT_MON,
123
+ )
124
+
125
+ def _populate_subdiv_ta_public_holidays(self):
126
+ # Ascension Day.
127
+ self._add_ascension_thursday(tr("Ascension Day"))
128
+
129
+ ratting_day_dates = {
130
+ 2015: (MAY, 16),
131
+ 2016: (APR, 30),
132
+ 2017: (MAY, 26),
133
+ 2018: (JUN, 2),
134
+ 2019: (MAY, 24),
135
+ 2020: (APR, 25),
136
+ 2021: (APR, 9),
137
+ 2023: (JUN, 2),
138
+ 2025: (MAY, 30),
139
+ }
140
+ # Ratting Day.
141
+ name = tr("Ratting Day")
142
+ if dt := ratting_day_dates.get(self._year):
143
+ self._add_holiday(name, dt)
144
+
145
+ # Anniversary Day.
146
+ self._add_holiday_aug_14(tr("Anniversary Day"))
147
+
148
+ def _populate_government_holidays(self):
149
+ # New Year's Day.
150
+ self._add_observed(self._add_new_years_day(tr("New Year's Day")))
151
+
152
+ # Whit Monday.
153
+ self._add_whit_monday(tr("Whit Monday"))
154
+
155
+ def _populate_subdiv_ac_government_holidays(self):
156
+ # August Bank Holiday.
157
+ self._add_holiday_last_mon_of_aug(tr("August Bank Holiday"))
158
+
159
+ def _populate_subdiv_hl_government_holidays(self):
160
+ # August Bank Holiday.
161
+ self._add_holiday_last_mon_of_aug(tr("August Bank Holiday"))
162
+
163
+
164
+ class SH(SaintHelenaAscensionAndTristanDaCunha):
165
+ pass
166
+
167
+
168
+ class SHN(SaintHelenaAscensionAndTristanDaCunha):
169
+ pass
170
+
171
+
172
+ class SaintHelenaAscensionAndTristanDaCunhaStaticHolidays:
173
+ """Saint Helena, Ascension and Tristan da Cunha special holidays.
174
+
175
+ References:
176
+ * <https://web.archive.org/web/20250810194916/https://sainthelenaisland.info/holidays.htm>
177
+ * [The Duke of Edinburgh's Visit](https://web.archive.org/web/20250719002906/https://www.sainthelena.gov.sh/2024/news/public-holiday-declared-to-mark-visit-of-his-royal-highness-the-duke-of-edinburgh-public-events-announced/)
178
+ * [Queen Elizabeth II's State Funeral](https://web.archive.org/web/20250513122736/https://www.sainthelena.gov.sh/wp-content/uploads/2022/09/EX-GAZ-94-Proclamation-Proclaiming-His-Majesty-Public-Holiday-HM-Queen-II-Funeral-STH-ASC.pdf)
179
+ * [Coronation of His Majesty King Charles III](https://web.archive.org/web/20250719085105/https://www.sainthelena.gov.sh/2023/news/governors-deputy-declares-public-holiday-to-mark-the-coronation-of-his-majesty-king-charles-iii/)
180
+ """
181
+
182
+ special_public_holidays = {
183
+ # Final Departure of R.M.S. St Helena.
184
+ 2018: (FEB, 9, tr("Final Departure of R.M.S. St Helena")),
185
+ 2022: (
186
+ # Queen Elizabeth II's Platinum Jubilee.
187
+ (JUN, 3, tr("Queen Elizabeth II's Platinum Jubilee")),
188
+ # Queen Elizabeth II's State Funeral.
189
+ (SEP, 19, tr("Queen Elizabeth II's State Funeral")),
190
+ ),
191
+ 2023: (
192
+ # The Duke of Edinburgh's Visit.
193
+ (JAN, 24, tr("The Duke of Edinburgh's Visit")),
194
+ # Coronation of His Majesty King Charles III.
195
+ (MAY, 8, tr("Coronation of His Majesty King Charles III")),
196
+ ),
197
+ }
@@ -81,6 +81,10 @@ class SouthKorea(
81
81
  country = "KR"
82
82
  supported_categories = (BANK, PUBLIC)
83
83
  default_language = "ko"
84
+ # %s (estimated).
85
+ estimated_label = tr("%s (추정)")
86
+ # Alternative holiday for %s (estimated).
87
+ observed_estimated_label = tr("%s 대체 휴일 (추정)")
84
88
  # Alternative holiday for %s.
85
89
  observed_label = tr("%s 대체 휴일")
86
90
  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
 
@@ -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,115 @@
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 MAY, JUL, AUG, SEP, FRI, SAT
17
+ from holidays.calendars.julian import JULIAN_CALENDAR
18
+ from holidays.groups import ChristianHolidays, IslamicHolidays
19
+ from holidays.holiday_base import HolidayBase
20
+
21
+
22
+ class Sudan(HolidayBase, ChristianHolidays, IslamicHolidays):
23
+ """Sudan holidays.
24
+
25
+ References:
26
+ * <https://en.wikipedia.org/wiki/Public_holidays_in_Sudan>
27
+ * <https://web.archive.org/web/20250820070831/https://www.sudanembassy.org.uk/public-holidays/>
28
+ * [Christian Holidays 2011-2018](https://web.archive.org/web/20250827155208/https://evangelicalfocus.com/world/5014/christmas-celebrations-mark-progress-of-religious-freedom-in-sudan)
29
+ """
30
+
31
+ country = "SD"
32
+ default_language = "ar_SD"
33
+ # %s (estimated).
34
+ estimated_label = tr("%s (المقدرة)")
35
+ supported_languages = ("ar_SD", "en_US")
36
+ start_year = 1985
37
+
38
+ def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
39
+ ChristianHolidays.__init__(self)
40
+ IslamicHolidays.__init__(
41
+ self, cls=SudanIslamicHolidays, show_estimated=islamic_show_estimated
42
+ )
43
+ super().__init__(*args, **kwargs)
44
+
45
+ def _populate_public_holidays(self):
46
+ # The resting days are Friday and Saturday since January 26th, 2008.
47
+ # https://sudantribune.com/article25544/
48
+ self.weekend = {FRI, SAT} if self._year >= 2008 else {FRI}
49
+
50
+ # Independence Day.
51
+ self._add_holiday_jan_1(tr("عيد الإستقلال"))
52
+
53
+ # Christian public holidays were suspended 2011–2018 and reinstated in 2019.
54
+ if self._year <= 2010 or self._year >= 2019:
55
+ # Coptic Christmas Day.
56
+ self._add_christmas_day(tr("عيد الميلاد المجيد"), calendar=JULIAN_CALENDAR)
57
+
58
+ # Coptic Easter.
59
+ self._add_easter_sunday(tr("عيد الفصح القبطي"), calendar=JULIAN_CALENDAR)
60
+
61
+ # Christmas Day.
62
+ self._add_christmas_day(tr("عيد الميلاد"))
63
+
64
+ # Islamic New Year.
65
+ self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
66
+
67
+ # Prophet's Birthday.
68
+ self._add_mawlid_day(tr("المولد النبوي الشريف"))
69
+
70
+ # Eid al-Fitr.
71
+ name = tr("عيد الفطر المبارك")
72
+ self._add_eid_al_fitr_day(name)
73
+ self._add_eid_al_fitr_day_two(name)
74
+ self._add_eid_al_fitr_day_three(name)
75
+
76
+ if self._year >= 2020:
77
+ self._add_eid_al_fitr_day_four(name)
78
+
79
+ # Eid al-Adha.
80
+ name = tr("عيد الأضحى المبارك")
81
+ self._add_arafah_day(name)
82
+ self._add_eid_al_adha_day(name)
83
+ self._add_eid_al_adha_day_two(name)
84
+ self._add_eid_al_adha_day_three(name)
85
+ self._add_eid_al_adha_day_four(name)
86
+
87
+
88
+ class SD(Sudan):
89
+ pass
90
+
91
+
92
+ class SDN(Sudan):
93
+ pass
94
+
95
+
96
+ class SudanIslamicHolidays(_CustomIslamicHolidays):
97
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
98
+ EID_AL_ADHA_DATES = {
99
+ 2022: (JUL, 10),
100
+ }
101
+
102
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2020, 2025)
103
+ EID_AL_FITR_DATES = {
104
+ 2022: (MAY, 1),
105
+ }
106
+
107
+ HIJRI_NEW_YEAR_DATES_CONFIRMED_YEARS = (2020, 2025)
108
+ HIJRI_NEW_YEAR_DATES = {
109
+ 2021: (AUG, 11),
110
+ }
111
+
112
+ MAWLID_DATES_CONFIRMED_YEARS = (2020, 2025)
113
+ MAWLID_DATES = {
114
+ 2023: (SEP, 28),
115
+ }
@@ -72,8 +72,12 @@ class Taiwan(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays
72
72
  """
73
73
 
74
74
  country = "TW"
75
+ # %s (estimated).
76
+ estimated_label = tr("%s(推定)")
77
+ # %s (observed, estimated).
78
+ observed_estimated_label = tr("%s(補假,推定)")
75
79
  # %s (observed).
76
- observed_label = tr("%s(慶祝)")
80
+ observed_label = tr("%s(補假)")
77
81
  default_language = "zh_TW"
78
82
  supported_categories = (GOVERNMENT, OPTIONAL, PUBLIC, SCHOOL, WORKDAY)
79
83
  supported_languages = ("en_US", "th", "zh_CN", "zh_TW")
@@ -107,7 +107,7 @@ class TJK(Tajikistan):
107
107
 
108
108
 
109
109
  class TajikistanIslamicHolidays(_CustomIslamicHolidays):
110
- # https://www.timeanddate.com/holidays/tajikistan/eid-al-fitr
110
+ # https://web.archive.org/web/20240911001624/https://www.timeanddate.com/holidays/tajikistan/eid-al-fitr
111
111
  EID_AL_FITR_DATES_CONFIRMED_YEARS = (1992, 2025)
112
112
  EID_AL_FITR_DATES = {
113
113
  2023: (APR, 22),
@@ -54,6 +54,10 @@ class Vietnam(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHoliday
54
54
  """
55
55
 
56
56
  country = "VN"
57
+ # %s (estimated).
58
+ estimated_label = tr("%s (dự kiến)")
59
+ # %s (observed, estimated).
60
+ observed_estimated_label = tr("%s (nghỉ bù, dự kiến)")
57
61
  # %s (observed).
58
62
  observed_label = tr("%s (nghỉ bù)")
59
63
  default_language = "vi"
@@ -14,7 +14,7 @@ from datetime import date
14
14
  from typing import Optional
15
15
 
16
16
  from holidays.calendars.chinese import _ChineseLunisolar, CHINESE_CALENDAR
17
- from holidays.calendars.gregorian import APR, DEC
17
+ from holidays.calendars.gregorian import APR
18
18
  from holidays.groups.eastern import EasternCalendarHolidays
19
19
 
20
20
 
@@ -79,20 +79,8 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
79
79
  def _dongzhi_festival(self):
80
80
  """
81
81
  Return Dongzhi Festival (Chinese Winter Solstice) date.
82
-
83
- This approximation is reliable for 1952-2099 years.
84
- """
85
- #
86
- if (
87
- (self._year % 4 == 0 and self._year >= 1988)
88
- or (self._year % 4 == 1 and self._year >= 2021)
89
- or (self._year % 4 == 2 and self._year >= 2058)
90
- or (self._year % 4 == 3 and self._year >= 2091)
91
- ):
92
- day = 21
93
- else:
94
- day = 22
95
- return date(self._year, DEC, day)
82
+ """
83
+ return self._chinese_calendar.winter_solstice_date(self._year)[0]
96
84
 
97
85
  def _add_chinese_calendar_holiday(
98
86
  self, name: str, dt_estimated: tuple[Optional[date], bool], days_delta: int = 0
@@ -33,15 +33,13 @@ class EasternCalendarHolidays:
33
33
 
34
34
  Adds customizable estimation label to holiday name if holiday date is an estimation.
35
35
  """
36
- estimated_label = getattr(self, "estimated_label", "%s")
37
36
  dt, is_estimated = dt_estimated
38
-
39
37
  if days_delta and dt:
40
38
  dt = _timedelta(dt, days_delta)
41
39
 
42
40
  return (
43
41
  self._add_holiday(
44
- self.tr(estimated_label) % self.tr(name)
42
+ self.tr(self.estimated_label) % self.tr(name)
45
43
  if is_estimated and show_estimated
46
44
  else name,
47
45
  dt,
@@ -182,6 +182,16 @@ class IslamicHolidays(EasternCalendarHolidays):
182
182
  name, self._islamic_calendar.eid_al_fitr_dates(self._year), days_delta=+2
183
183
  )
184
184
 
185
+ def _add_eid_al_fitr_day_four(self, name) -> set[date]:
186
+ """
187
+ Add Eid al-Fitr Day Four.
188
+
189
+ https://en.wikipedia.org/wiki/Eid_al-Fitr
190
+ """
191
+ return self._add_islamic_calendar_holiday(
192
+ name, self._islamic_calendar.eid_al_fitr_dates(self._year), days_delta=+3
193
+ )
194
+
185
195
  def _add_eid_al_fitr_eve(self, name) -> set[date]:
186
196
  """
187
197
  Add Eid al-Fitr Eve (last day of 9th month of Islamic calendar).
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file