holidays 0.85__py3-none-any.whl → 0.87__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 (63) hide show
  1. holidays/calendars/chinese.py +44 -6
  2. holidays/calendars/hindu.py +85 -1
  3. holidays/countries/bangladesh.py +13 -9
  4. holidays/countries/bulgaria.py +208 -50
  5. holidays/countries/estonia.py +55 -9
  6. holidays/countries/germany.py +75 -74
  7. holidays/countries/gibraltar.py +1 -1
  8. holidays/countries/india.py +5 -3
  9. holidays/countries/italy.py +489 -167
  10. holidays/countries/mongolia.py +1 -5
  11. holidays/countries/nepal.py +46 -41
  12. holidays/countries/russia.py +1 -2
  13. holidays/countries/sweden.py +102 -32
  14. holidays/countries/taiwan.py +3 -6
  15. holidays/countries/thailand.py +5 -5
  16. holidays/countries/united_states.py +55 -46
  17. holidays/financial/ny_stock_exchange.py +591 -89
  18. holidays/groups/chinese.py +11 -18
  19. holidays/groups/hindu.py +24 -0
  20. holidays/holiday_base.py +51 -23
  21. holidays/locale/bg/LC_MESSAGES/BG.mo +0 -0
  22. holidays/locale/bn/LC_MESSAGES/BD.mo +0 -0
  23. holidays/locale/de/LC_MESSAGES/DE.mo +0 -0
  24. holidays/locale/en_US/LC_MESSAGES/BD.mo +0 -0
  25. holidays/locale/en_US/LC_MESSAGES/BG.mo +0 -0
  26. holidays/locale/en_US/LC_MESSAGES/DE.mo +0 -0
  27. holidays/locale/en_US/LC_MESSAGES/EE.mo +0 -0
  28. holidays/locale/en_US/LC_MESSAGES/IT.mo +0 -0
  29. holidays/locale/en_US/LC_MESSAGES/NP.mo +0 -0
  30. holidays/locale/en_US/LC_MESSAGES/SE.mo +0 -0
  31. holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
  32. holidays/locale/et/LC_MESSAGES/EE.mo +0 -0
  33. holidays/locale/gu/LC_MESSAGES/IN.mo +0 -0
  34. holidays/locale/it_IT/LC_MESSAGES/IT.mo +0 -0
  35. holidays/locale/ne/LC_MESSAGES/NP.mo +0 -0
  36. holidays/locale/sv/LC_MESSAGES/SE.mo +0 -0
  37. holidays/locale/th/LC_MESSAGES/CA.mo +0 -0
  38. holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
  39. holidays/locale/th/LC_MESSAGES/DE.mo +0 -0
  40. holidays/locale/th/LC_MESSAGES/DK.mo +0 -0
  41. holidays/locale/th/LC_MESSAGES/ES.mo +0 -0
  42. holidays/locale/th/LC_MESSAGES/FI.mo +0 -0
  43. holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
  44. holidays/locale/th/LC_MESSAGES/NO.mo +0 -0
  45. holidays/locale/th/LC_MESSAGES/SE.mo +0 -0
  46. holidays/locale/th/LC_MESSAGES/TL.mo +0 -0
  47. holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
  48. holidays/locale/th/LC_MESSAGES/US.mo +0 -0
  49. holidays/locale/th/LC_MESSAGES/VA.mo +0 -0
  50. holidays/locale/uk/LC_MESSAGES/BG.mo +0 -0
  51. holidays/locale/uk/LC_MESSAGES/DE.mo +0 -0
  52. holidays/locale/uk/LC_MESSAGES/EE.mo +0 -0
  53. holidays/locale/uk/LC_MESSAGES/SE.mo +0 -0
  54. holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
  55. holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
  56. holidays/utils.py +10 -1
  57. holidays/version.py +1 -1
  58. {holidays-0.85.dist-info → holidays-0.87.dist-info}/METADATA +18 -11
  59. {holidays-0.85.dist-info → holidays-0.87.dist-info}/RECORD +63 -56
  60. {holidays-0.85.dist-info → holidays-0.87.dist-info}/licenses/CONTRIBUTORS +4 -0
  61. {holidays-0.85.dist-info → holidays-0.87.dist-info}/WHEEL +0 -0
  62. {holidays-0.85.dist-info → holidays-0.87.dist-info}/licenses/LICENSE +0 -0
  63. {holidays-0.85.dist-info → holidays-0.87.dist-info}/top_level.txt +0 -0
@@ -1306,21 +1306,39 @@ class _ChineseLunisolar:
1306
1306
  2053: (FEB, 18),
1307
1307
  }
1308
1308
 
1309
+ QINGMING_THRESHOLDS: dict[str, dict[str, dict[int, int]]] = {
1310
+ # UTC+7.
1311
+ VIETNAMESE_CALENDAR: {
1312
+ "apr_4": {0: 1972, 1: 2005, 2: 2038, 3: 2067},
1313
+ "apr_6": {2: 1906, 3: 1935},
1314
+ },
1315
+ # UTC+8.
1316
+ CHINESE_CALENDAR: {
1317
+ "apr_4": {0: 1976, 1: 2009, 2: 2042, 3: 2075},
1318
+ "apr_6": {2: 1910, 3: 1943},
1319
+ },
1320
+ # UTC+9.
1321
+ KOREAN_CALENDAR: {
1322
+ "apr_4": {0: 1984, 1: 2017, 2: 2046, 3: 2079},
1323
+ "apr_6": {2: 1914, 3: 1947},
1324
+ },
1325
+ }
1326
+
1309
1327
  WINTER_SOLSTICE_THRESHOLDS: dict[str, dict[str, dict[int, int]]] = {
1310
1328
  # UTC+7.
1311
1329
  VIETNAMESE_CALENDAR: {
1312
1330
  "dec_21": {0: 1980, 1: 2017, 2: 2050, 3: 2083},
1313
- "dec_23": {3: 1943},
1331
+ "dec_23": {2: 1910, 3: 1943},
1314
1332
  },
1315
1333
  # UTC+8.
1316
1334
  CHINESE_CALENDAR: {
1317
1335
  "dec_21": {0: 1988, 1: 2021, 2: 2058, 3: 2091},
1318
- "dec_23": {3: 1947},
1336
+ "dec_23": {2: 1914, 3: 1947},
1319
1337
  },
1320
1338
  # UTC+9.
1321
1339
  KOREAN_CALENDAR: {
1322
1340
  "dec_21": {0: 1992, 1: 2029, 2: 2062, 3: 2099},
1323
- "dec_23": {3: 1955},
1341
+ "dec_23": {2: 1918, 3: 1955},
1324
1342
  },
1325
1343
  }
1326
1344
 
@@ -1376,11 +1394,31 @@ class _ChineseLunisolar:
1376
1394
  def mid_autumn_date(self, year: int, calendar=None) -> tuple[date | None, bool]:
1377
1395
  return self._get_holiday(MID_AUTUMN, year, calendar)
1378
1396
 
1379
- def winter_solstice_date(self, year: int, calendar=None) -> tuple[date | None, bool]:
1397
+ def qingming_date(self, year: int, calendar=None) -> tuple[date, bool]:
1398
+ """Return Qingming Festival (5th solar term of the Chinese lunisolar calendar) date.
1399
+
1400
+ !!! note "Note"
1401
+ This approximation is reliable for 1901-2099 years.
1402
+ """
1403
+ calendar = calendar or self.__calendar
1404
+ self.__verify_calendar(calendar)
1405
+
1406
+ thresholds = self.QINGMING_THRESHOLDS[calendar]
1407
+ year_mod = year % 4
1408
+ if year >= thresholds["apr_4"][year_mod]:
1409
+ day = 4
1410
+ elif year <= thresholds["apr_6"].get(year_mod, 0):
1411
+ day = 6
1412
+ else:
1413
+ day = 5
1414
+
1415
+ return date(year, APR, day), not (1901 <= year <= 2099)
1416
+
1417
+ def winter_solstice_date(self, year: int, calendar=None) -> tuple[date, bool]:
1380
1418
  """Return Winter Solstice (22nd solar term in Chinese Lunisolar calendar) date.
1381
1419
 
1382
1420
  !!! note "Note"
1383
- This approximation is reliable for 1941-2099 years.
1421
+ This approximation is reliable for 1901-2099 years.
1384
1422
  """
1385
1423
  calendar = calendar or self.__calendar
1386
1424
  self.__verify_calendar(calendar)
@@ -1394,7 +1432,7 @@ class _ChineseLunisolar:
1394
1432
  else:
1395
1433
  day = 22
1396
1434
 
1397
- return date(year, DEC, day), not (1941 <= year <= 2099)
1435
+ return date(year, DEC, day), not (1901 <= year <= 2099)
1398
1436
 
1399
1437
 
1400
1438
  class _CustomChineseHolidays(_CustomCalendar, _ChineseLunisolar):
@@ -14,9 +14,10 @@ from collections.abc import Iterable
14
14
  from datetime import date
15
15
 
16
16
  from holidays.calendars.custom import _CustomCalendar
17
- from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, AUG, SEP, OCT, NOV, DEC
17
+ from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, AUG, SEP, OCT, NOV, DEC
18
18
  from holidays.helpers import _normalize_tuple
19
19
 
20
+ BATHUKAMMA = "BATHUKAMMA"
20
21
  BUDDHA_PURNIMA = "BUDDHA_PURNIMA"
21
22
  CHHATH_PUJA = "CHHATH_PUJA"
22
23
  DIWALI = "DIWALI"
@@ -32,6 +33,7 @@ HOLI = "HOLI"
32
33
  JANMASHTAMI = "JANMASHTAMI"
33
34
  MAHA_ASHTAMI = "MAHA_ASHTAMI"
34
35
  MAHA_NAVAMI = "MAHA_NAVAMI"
36
+ MAHARANA_PRATAP_JAYANTI = "MAHARANA_PRATAP_JAYANTI"
35
37
  MAHA_SHIVARATRI = "MAHA_SHIVARATRI"
36
38
  MAHAVIR_JAYANTI = "MAHAVIR_JAYANTI"
37
39
  MAKAR_SANKRANTI = "MAKAR_SANKRANTI"
@@ -47,6 +49,45 @@ VAISAKHI = "VAISAKHI"
47
49
 
48
50
 
49
51
  class _HinduLunisolar:
52
+ # Dates for Bathukamma (Mahalaya Amavasya/amavasya shraddha)
53
+ # [Mahalaya Amavasya](https://web.archive.org/web/20250906191235/https://www.drikpanchang.com/shraddha/tithi/amavasya-shraddha-date-time.html)
54
+ # [2018](https://web.archive.org/web/20250402131537/https://www.telangana.gov.in/Downloads/calendar-2018/)
55
+ # [2019](https://web.archive.org/web/20250508145651/https://www.telangana.gov.in/Downloads/calendar-2019/)
56
+ # [2020](https://web.archive.org/web/20250421174049/https://www.telangana.gov.in/downloads/calendar-2020/)
57
+ # [2021](https://web.archive.org/web/20250404142143/https://www.telangana.gov.in/Downloads/calendar-2021/)
58
+ # [2022](https://web.archive.org/web/20250217143857/https://www.telangana.gov.in/Downloads/calendar-2022/)
59
+ # [2023](https://web.archive.org/web/20250123180708/https://www.telangana.gov.in/Downloads/calendar-2023/)
60
+ # [2024](https://web.archive.org/web/20250217144536/https://www.telangana.gov.in/Downloads/calendar/)
61
+ # [2025](https://web.archive.org/web/20250217133450/https://www.telangana.gov.in/Downloads/calendar-2025/)
62
+ BATHUKAMMA_DATES = {
63
+ 2010: (OCT, 7),
64
+ 2011: (SEP, 27),
65
+ 2012: (OCT, 15),
66
+ 2013: (OCT, 4),
67
+ 2014: (SEP, 23),
68
+ 2015: (OCT, 12),
69
+ 2016: (SEP, 30),
70
+ 2017: (SEP, 19),
71
+ 2018: (OCT, 8),
72
+ 2019: (SEP, 28),
73
+ 2020: (OCT, 16),
74
+ 2021: (OCT, 6),
75
+ 2022: (SEP, 25),
76
+ 2023: (OCT, 14),
77
+ 2024: (OCT, 2),
78
+ 2025: (SEP, 21),
79
+ 2026: (OCT, 10),
80
+ 2027: (SEP, 29),
81
+ 2028: (SEP, 18),
82
+ 2029: (OCT, 7),
83
+ 2030: (SEP, 27),
84
+ 2031: (OCT, 15),
85
+ 2032: (OCT, 4),
86
+ 2033: (SEP, 23),
87
+ 2034: (OCT, 11),
88
+ 2035: (OCT, 1),
89
+ }
90
+
50
91
  # https://web.archive.org/web/20240804044401/https://www.timeanddate.com/holidays/india/buddha-purnima
51
92
  BUDDHA_PURNIMA_DATES = {
52
93
  2001: (APR, 30),
@@ -784,6 +825,43 @@ class _HinduLunisolar:
784
825
  2035: (OCT, 10),
785
826
  }
786
827
 
828
+ # Dates for Maharana Pratap Jayanti (Jyeshtha Shukla 3)
829
+ # [Maharana Pratap Jayanti](https://web.archive.org/web/20241212205537/https://www.drikpanchang.com/calendars/indian/jayanti/maharana-pratap/maharana-pratap-jayanti.html)
830
+ # [2018](https://web.archive.org/web/20251213153439/https://gad.rajasthan.gov.in/writereaddata/OLDWEBDATA/PDF/Govt_Holidays_2018_25102017.pdf)
831
+ # [2019](https://web.archive.org/web/20251213151532/https://gad.rajasthan.gov.in/writereaddata/OLDWEBDATA/PDF/Govt_Holidays_2019_02112018.pdf)
832
+ # [2020](https://web.archive.org/web/20251213151547/https://gad.rajasthan.gov.in/writereaddata/OLDWEBDATA/PDF/Govt_Holidays_2020_22112019.pdf)
833
+ # [2021](https://web.archive.org/web/20251213151616/https://gad.rajasthan.gov.in/writereaddata/OLDWEBDATA/PDF/holiday_calender_2021_gr6_26102020.pdf)
834
+ # [2022](https://web.archive.org/web/20251213151608/https://gad.rajasthan.gov.in/writereaddata/OLDWEBDATA/PDF/Govt_holidays_list_21_10_2021.pdf)
835
+ # [2023](https://web.archive.org/web/20251213151559/https://gad.rajasthan.gov.in/writereaddata/OLDWEBDATA/PDF/Govt_holidays_list_16_11_2022.pdf)
836
+ MAHARANA_PRATAP_JAYANTI_DATES = {
837
+ 2010: (JUN, 15),
838
+ 2011: (JUN, 4),
839
+ 2012: (MAY, 24),
840
+ 2013: (JUN, 11),
841
+ 2014: (MAY, 31),
842
+ 2015: (MAY, 20),
843
+ 2016: (JUN, 7),
844
+ 2017: (MAY, 28),
845
+ 2018: (JUN, 16),
846
+ 2019: (JUN, 6),
847
+ 2020: (MAY, 25),
848
+ 2021: (JUN, 13),
849
+ 2022: (JUN, 2),
850
+ 2023: (MAY, 22),
851
+ 2024: (JUN, 9),
852
+ 2025: (MAY, 29),
853
+ 2026: (JUN, 17),
854
+ 2027: (JUN, 7),
855
+ 2028: (MAY, 27),
856
+ 2029: (MAY, 15),
857
+ 2030: (JUN, 4),
858
+ 2031: (MAY, 24),
859
+ 2032: (JUN, 11),
860
+ 2033: (MAY, 31),
861
+ 2034: (MAY, 20),
862
+ 2035: (JUN, 8),
863
+ }
864
+
787
865
  # https://web.archive.org/web/20250323040914/https://www.timeanddate.com/holidays/india/maha-shivaratri-shivaratri
788
866
  MAHA_SHIVARATRI_DATES = {
789
867
  2001: (FEB, 21),
@@ -1408,6 +1486,9 @@ class _HinduLunisolar:
1408
1486
  for dt in _normalize_tuple(exact_dates.get(year, estimated_dates.get(year, ()))):
1409
1487
  yield date(year, *dt), year not in exact_dates
1410
1488
 
1489
+ def bathukamma_date(self, year: int) -> tuple[date | None, bool]:
1490
+ return self._get_holiday(BATHUKAMMA, year)
1491
+
1411
1492
  def buddha_purnima_date(self, year: int) -> tuple[date | None, bool]:
1412
1493
  return self._get_holiday(BUDDHA_PURNIMA, year)
1413
1494
 
@@ -1459,6 +1540,9 @@ class _HinduLunisolar:
1459
1540
  def maha_shivaratri_date(self, year: int) -> tuple[date | None, bool]:
1460
1541
  return self._get_holiday(MAHA_SHIVARATRI, year)
1461
1542
 
1543
+ def maharana_pratap_jayanti_date(self, year: int) -> tuple[date | None, bool]:
1544
+ return self._get_holiday(MAHARANA_PRATAP_JAYANTI, year)
1545
+
1462
1546
  def mahavir_jayanti_date(self, year: int) -> tuple[date | None, bool]:
1463
1547
  return self._get_holiday(MAHAVIR_JAYANTI, year)
1464
1548
 
@@ -10,6 +10,8 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from gettext import gettext as tr
14
+
13
15
  from holidays.calendars.gregorian import FRI, SAT
14
16
  from holidays.groups import InternationalHolidays
15
17
  from holidays.holiday_base import HolidayBase
@@ -24,6 +26,8 @@ class Bangladesh(HolidayBase, InternationalHolidays):
24
26
  """
25
27
 
26
28
  country = "BD"
29
+ default_language = "bn"
30
+ supported_languages = ("bn", "en_US")
27
31
  weekend = {FRI, SAT}
28
32
 
29
33
  def __init__(self, *args, **kwargs):
@@ -31,26 +35,26 @@ class Bangladesh(HolidayBase, InternationalHolidays):
31
35
  super().__init__(*args, **kwargs)
32
36
 
33
37
  def _populate_public_holidays(self):
34
- # International Mother's language Day.
35
- self._add_holiday_feb_21("International Mother's language Day")
38
+ # Martyrs' Day and International Mother Language Day.
39
+ self._add_holiday_feb_21(tr("শহীদ দিবস আন্তর্জাতিক মাতৃভাষা দিবস"))
36
40
 
37
- # Sheikh Mujibur Rahman's Birthday and Children's Day.
38
- self._add_holiday_mar_17("Sheikh Mujibur Rahman's Birthday and Children's Day")
41
+ # Sheikh Mujibur Rahman's Birthday.
42
+ self._add_holiday_mar_17(tr("জাতির পিতা বঙ্গবন্ধু শেখ মুজিবুর রহমান এর জন্মদিবস"))
39
43
 
40
44
  # Independence Day.
41
- self._add_holiday_mar_26("Independence Day")
45
+ self._add_holiday_mar_26(tr("স্বাধীনতা দিবস"))
42
46
 
43
47
  # Bengali New Year's Day.
44
- self._add_holiday_apr_14("Bengali New Year's Day")
48
+ self._add_holiday_apr_14(tr("পহেলা বৈশাখ"))
45
49
 
46
50
  # May Day.
47
- self._add_labor_day("May Day")
51
+ self._add_labor_day(tr("মে দিবস"))
48
52
 
49
53
  # National Mourning Day.
50
- self._add_holiday_aug_15("National Mourning Day")
54
+ self._add_holiday_aug_15(tr("জাতীয় শোক দিবস"))
51
55
 
52
56
  # Victory Day.
53
- self._add_holiday_dec_16("Victory Day")
57
+ self._add_holiday_dec_16(tr("বিজয় দিবস"))
54
58
 
55
59
 
56
60
  class BD(Bangladesh):
@@ -15,56 +15,64 @@ from __future__ import annotations
15
15
  from gettext import gettext as tr
16
16
  from typing import TYPE_CHECKING
17
17
 
18
+ from holidays.calendars.gregorian import JAN, MAR, APR, MAY, JUN, SEP, DEC
18
19
  from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR
19
- from holidays.constants import PUBLIC, SCHOOL
20
- from holidays.groups import ChristianHolidays, InternationalHolidays
20
+ from holidays.constants import HALF_DAY, PUBLIC, SCHOOL
21
+ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
21
22
  from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY
22
23
 
23
24
  if TYPE_CHECKING:
24
25
  from datetime import date
25
26
 
26
27
 
27
- class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
28
+ class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
28
29
  """Bulgaria holidays.
29
30
 
30
31
  References:
31
- * <https://web.archive.org/web/20250402193136/https://lex.bg/laws/ldoc/1594373121>
32
- * <https://web.archive.org/web/20240814165123/https://www.parliament.bg/bg/24>
33
- * <https://web.archive.org/web/20250118142918/https://kik-info.com/spravochnik/calendar/2021/>
32
+ * [Labor Code](https://web.archive.org/web/20250402193136/https://lex.bg/laws/ldoc/1594373121)
33
+ * [Labor Code changes - State Gazette, Issue 30, 13.04.1990](https://archive.org/details/30-1990)
34
+ * [Labor Code changes - State Gazette, Issue 27, 05.04.1991](https://archive.org/details/27-1991_202511)
35
+ * [Labor Code changes - State Gazette, Issue 104, 17.12.1991](https://archive.org/details/104-1991)
36
+ * [Labor Code changes - State Gazette, Issue 88, 30.10.1992](https://archive.org/details/88-1992)
37
+ * [Labor Code changes - State Gazette, Issue 2, 05.01.1996](https://archive.org/details/2-1996_202511)
38
+ * [Labor Code changes - State Gazette, Issue 22, 24.02.1998](https://archive.org/details/22-1998)
39
+ * [Labor Code changes - State Gazette, Issue 56, 19.05.1998](https://archive.org/details/56-1998)
40
+ * [Labor Code changes - State Gazette, Issue 108, 15.09.1998](https://archive.org/details/108-1998)
41
+ * [Labor Code changes - State Gazette, Issue 15, 23.02.2010](https://web.archive.org/web/20250515130122/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=29936)
42
+ * [Labor Code changes - State Gazette, Issue 105, 30.12.2016](https://web.archive.org/web/20220509103925/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=110584)
43
+ * [Labor Code changes - State Gazette, Issue 107, 18.12.2020](https://web.archive.org/web/20210410181539/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=154367)
44
+ * [Bulgarian public holidays](https://web.archive.org/web/20240814165123/https://www.parliament.bg/bg/24)
45
+ * [Working days and weekends calendar](https://web.archive.org/web/20250916112151/https://kik-info.com/spravochnik/calendar/2025/)
34
46
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Bulgaria>
35
-
36
- Official holidays in Bulgaria in their current form. This class does not
37
- any return holidays before 1990, as holidays in the People's Republic of
38
- Bulgaria and earlier were different.
39
-
40
- Since 2017, it has been accepted that public holidays in Bulgaria that fall on a Saturday
41
- or Sunday are to be taken on the first working day after them. If there are both Saturday
42
- and Sunday holidays, Monday and Tuesday are rested respectively.
43
- The exceptions are:
44
- 1) the Easter holidays, which are always a consecutive Friday, Saturday, and Sunday;
45
- 2) National Awakening Day which, while an official holiday and a non-attendance day for
46
- schools, is still a working day.
47
47
  """
48
48
 
49
49
  country = "BG"
50
50
  default_language = "bg"
51
51
  # %s (observed).
52
52
  observed_label = tr("%s (почивен ден)")
53
- supported_categories = (PUBLIC, SCHOOL)
53
+ supported_categories = (HALF_DAY, PUBLIC, SCHOOL)
54
54
  supported_languages = ("bg", "en_US", "uk")
55
- start_year = 1990
55
+ # Labor Code changes - State Gazette, Issue 30, 13.04.1990.
56
+ start_year = 1991
56
57
 
57
58
  def __init__(self, *args, **kwargs):
58
59
  ChristianHolidays.__init__(self, JULIAN_REVISED_CALENDAR)
59
60
  InternationalHolidays.__init__(self)
61
+ StaticHolidays.__init__(self, BulgariaStaticHolidays)
62
+ # Labor Code changes - State Gazette, Issue 105, 30.12.2016.
60
63
  kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
61
64
  kwargs.setdefault("observed_since", 2017)
62
65
  super().__init__(*args, **kwargs)
63
66
 
64
- def _populate_observed(self, dts: set[date], excluded_names: set[str]) -> None:
67
+ def _populate_observed(self, dts: set[date], *, multiple: bool = False) -> None:
68
+ excluded_names = {
69
+ # Holy Saturday.
70
+ self.tr("Велика събота"),
71
+ # Easter.
72
+ self.tr("Великден"),
73
+ }
74
+
65
75
  for dt in sorted(dts):
66
- if not self._is_observed(dt):
67
- continue
68
76
  for name in self.get_list(dt):
69
77
  if name not in excluded_names:
70
78
  self._add_observed(dt, name)
@@ -80,45 +88,67 @@ class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
80
88
  self._add_holiday_mar_3(tr("Ден на Освобождението на България от османско иго"))
81
89
  )
82
90
 
83
- # Good Friday.
84
- self._add_good_friday(tr("Велики петък"))
91
+ # Labor Code changes - State Gazette, Issue 15, 23.02.2010.
92
+ if self._year >= 2010:
93
+ # Good Friday.
94
+ self._add_good_friday(tr("Велики петък"))
85
95
 
86
- # Holy Saturday.
87
- self._add_holy_saturday(tr("Велика събота"))
96
+ # Holy Saturday.
97
+ self._add_holy_saturday(tr("Велика събота"))
88
98
 
89
99
  # Easter.
90
100
  name = tr("Великден")
91
101
  self._add_easter_sunday(name)
102
+ # Labor Code changes - State Gazette, Issue 27, 05.04.1991.
92
103
  self._add_easter_monday(name)
93
104
 
94
105
  dts_observed.add(
95
- # International Workers' Day.
106
+ # Labor Day and International Workers' Solidarity Day.
96
107
  self._add_labor_day(tr("Ден на труда и на международната работническа солидарност"))
97
108
  )
98
109
 
99
- dts_observed.add(
100
- # Saint George's Day.
101
- self._add_holiday_may_6(tr("Гергьовден, Ден на храбростта и Българската армия"))
102
- )
110
+ # Labor Code changes - State Gazette, Issue 56, 19.05.1998.
111
+ if self._year >= 1999:
112
+ dts_observed.add(
113
+ # Saint George's Day, Day of the Bulgarian Army.
114
+ self._add_holiday_may_6(tr("Гергьовден, Ден на храбростта и Българската армия"))
115
+ )
103
116
 
104
- dts_observed.add(
105
- self._add_holiday_may_24(
106
- # Bulgarian Education and Culture and Slavonic Literature Day.
107
- tr(
108
- "Ден на светите братя Кирил и Методий, на българската азбука, "
109
- "просвета и култура и на славянската книжовност"
110
- )
117
+ # Renamed by Labor Code changes - State Gazette, Issue 107, 18.12.2020.
118
+ name = (
119
+ # Day of the Holy Brothers Cyril and Methodius, Bulgarian Alphabet,
120
+ # Enlightenment, Culture and Slavonic Literature.
121
+ tr(
122
+ "Ден на светите братя Кирил и Методий, на българската азбука, "
123
+ "просвета и култура и на славянската книжовност"
111
124
  )
125
+ if self._year >= 2021
126
+ # Day of Bulgarian Enlightenment and Culture and Slavonic Alphabet.
127
+ else tr("Ден на българската просвета и култура и на славянската писменост")
112
128
  )
129
+ dts_observed.add(self._add_holiday_may_24(name))
113
130
 
114
- # Unification Day.
115
- dts_observed.add(self._add_holiday_sep_6(tr("Ден на Съединението")))
131
+ # Labor Code changes - State Gazette, Issue 22, 24.02.1998.
132
+ if self._year >= 1998:
133
+ # Unification Day.
134
+ dts_observed.add(self._add_holiday_sep_6(tr("Ден на Съединението")))
116
135
 
117
- # Independence Day.
118
- dts_observed.add(self._add_holiday_sep_22(tr("Ден на Независимостта на България")))
136
+ # Abandoned by Labor Code changes - State Gazette, Issue 104, 17.12.1991.
137
+ if self._year <= 1991:
138
+ # Freedom Day.
139
+ self._add_holiday_sep_9(tr("Ден на свободата"))
119
140
 
120
- # Christmas Eve.
121
- dts_observed.add(self._add_christmas_eve(tr("Бъдни вечер")))
141
+ # Labor Code changes - State Gazette, Issue 108, 15.09.1998.
142
+ if self._year >= 1998:
143
+ # Independence Day.
144
+ dts_observed.add(self._add_holiday_sep_22(tr("Ден на Независимостта на България")))
145
+
146
+ # Labor Code changes - State Gazette, Issue 2, 05.01.1996.
147
+ if self._year >= 1996:
148
+ # Christmas Eve.
149
+ dts_observed.add(self._add_christmas_eve(tr("Бъдни вечер")))
150
+
151
+ # Labor Code changes - State Gazette, Issue 104, 17.12.1991.
122
152
 
123
153
  # Christmas Day.
124
154
  name = tr("Рождество Христово")
@@ -126,13 +156,23 @@ class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
126
156
  dts_observed.add(self._add_christmas_day_two(name))
127
157
 
128
158
  if self.observed:
129
- self._populate_observed(
130
- dts_observed, excluded_names={self.tr("Велика събота"), self.tr("Великден")}
131
- )
159
+ self._populate_observed(dts_observed)
160
+
161
+ def _populate_half_day_holidays(self):
162
+ # Established as half-day by Labor Code changes - State Gazette, Issue 104, 17.12.1991.
163
+ # Changed to full-day by Labor Code changes - State Gazette, Issue 2, 05.01.1996.
164
+ if self._year <= 1995:
165
+ # %s (from 2pm).
166
+ begin_time_label = self.tr("%s (след 14 ч.)")
167
+
168
+ # Christmas Eve.
169
+ self._add_christmas_eve(begin_time_label % self.tr("Бъдни вечер"))
132
170
 
133
171
  def _populate_school_holidays(self):
134
- # National Awakening Day.
135
- self._add_holiday_nov_1(tr("Ден на народните будители"))
172
+ # Labor Code changes - State Gazette, Issue 88, 30.10.1992.
173
+ if self._year >= 1992:
174
+ # The Day of the People's Awakeners.
175
+ self._add_holiday_nov_1(tr("Ден на народните будители"))
136
176
 
137
177
 
138
178
  class BG(Bulgaria):
@@ -141,3 +181,121 @@ class BG(Bulgaria):
141
181
 
142
182
  class BLG(Bulgaria):
143
183
  pass
184
+
185
+
186
+ class BulgariaStaticHolidays:
187
+ """Bulgaria special holidays.
188
+
189
+ Substituted holidays references:
190
+ * [2004](https://web.archive.org/web/20251126005928/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=21156)
191
+ * [2005](https://web.archive.org/web/20251126005738/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=14875)
192
+ * [2006](https://web.archive.org/web/20251126005635/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=1142)
193
+ * [2006 changes](https://web.archive.org/web/20251126005653/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=1246)
194
+ * [2007](https://web.archive.org/web/20251126010247/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=3325)
195
+ * [2007 changes](https://web.archive.org/web/20251126010247/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=3600)
196
+ * [2008](https://web.archive.org/web/20251126010335/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=4686)
197
+ * [2009](https://web.archive.org/web/20251126005722/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=12464)
198
+ * [2009 changes](https://web.archive.org/web/20251126005900/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=16562)
199
+ * [2009 changes](https://web.archive.org/web/20251126010145/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=27525)
200
+ * [2010](https://web.archive.org/web/20251126010239/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=27993)
201
+ * [2011](https://web.archive.org/web/20251126010309/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=41994)
202
+ * [2012](https://web.archive.org/web/20251126010350/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=58790)
203
+ * [2013](https://web.archive.org/web/20251126115613/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=70577)
204
+ * [2013 changes](https://web.archive.org/web/20210410195503/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=74637)
205
+ * [2013 changes](https://web.archive.org/web/20250908131607/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=80503)
206
+ * [2014](https://web.archive.org/web/20231130064115/http://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=80502)
207
+ * [2015](https://web.archive.org/web/20250523171159/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=89532)
208
+ * [2016](https://web.archive.org/web/20250208071613/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=99143)
209
+
210
+ Special holidays references:
211
+ * [Resolution 220 of Mar 26, 2004](https://web.archive.org/web/20251126010024/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=21351)
212
+ * [Resolution 722 of Oct 18, 2006](https://web.archive.org/web/20251126010114/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=2739)
213
+ * [Resolution 808 of Nov 19, 2025](https://web.archive.org/web/20251126010045/https://dv.parliament.bg/DVWeb/showMaterialDV.jsp?idMat=239075)
214
+ """
215
+
216
+ # Substituted date format.
217
+ substituted_date_format = tr("%d.%m.%Y")
218
+
219
+ # Day off (substituted from %s).
220
+ substituted_label = tr("Почивен ден (прехвърлен от %s)")
221
+
222
+ # Official Holiday.
223
+ official_holiday = tr("Официален празник")
224
+
225
+ # Non-working day.
226
+ non_working_day = tr("Неприсъствен ден")
227
+
228
+ special_public_holidays = {
229
+ 2004: (
230
+ (APR, 2, official_holiday),
231
+ (MAY, 7, MAY, 15),
232
+ ),
233
+ 2005: (
234
+ (MAR, 4, MAR, 12),
235
+ (MAY, 23, MAY, 28),
236
+ (SEP, 5, SEP, 10),
237
+ (SEP, 23, SEP, 17),
238
+ ),
239
+ 2006: (JAN, 2, JAN, 28),
240
+ 2007: (
241
+ (JAN, 2, official_holiday),
242
+ (APR, 30, APR, 21),
243
+ (MAY, 25, JUN, 2),
244
+ (SEP, 7, SEP, 15),
245
+ (DEC, 31, DEC, 15),
246
+ ),
247
+ 2008: (
248
+ (MAY, 2, MAY, 10),
249
+ (MAY, 5, MAY, 17),
250
+ (DEC, 31, DEC, 20),
251
+ ),
252
+ 2009: (
253
+ (JAN, 2, JAN, 10),
254
+ (MAR, 2, MAR, 14),
255
+ (MAY, 4, MAY, 16),
256
+ (MAY, 5, MAY, 30),
257
+ (SEP, 21, SEP, 26),
258
+ (DEC, 31, DEC, 19),
259
+ ),
260
+ 2010: (
261
+ (MAY, 7, MAY, 15),
262
+ (DEC, 31, DEC, 11),
263
+ ),
264
+ 2011: (
265
+ (MAR, 4, MAR, 19),
266
+ (MAY, 23, MAY, 28),
267
+ (SEP, 5, SEP, 3),
268
+ (SEP, 23, SEP, 17),
269
+ ),
270
+ 2012: (
271
+ (JAN, 2, JAN, 21),
272
+ (APR, 30, APR, 21),
273
+ (MAY, 25, MAY, 19),
274
+ (SEP, 7, SEP, 29),
275
+ (DEC, 31, DEC, 15),
276
+ ),
277
+ 2013: (
278
+ (MAY, 2, MAY, 18),
279
+ (DEC, 23, DEC, 21),
280
+ (DEC, 31, DEC, 14),
281
+ ),
282
+ 2014: (
283
+ (MAY, 2, MAY, 10),
284
+ (MAY, 5, MAY, 31),
285
+ (DEC, 31, DEC, 13),
286
+ ),
287
+ 2015: (
288
+ (JAN, 2, JAN, 24),
289
+ (MAR, 2, MAR, 21),
290
+ (SEP, 21, SEP, 12),
291
+ (DEC, 31, DEC, 12),
292
+ ),
293
+ 2016: (
294
+ (MAR, 4, MAR, 12),
295
+ (MAY, 23, MAY, 14),
296
+ (SEP, 5, SEP, 10),
297
+ (SEP, 23, SEP, 17),
298
+ ),
299
+ 2025: (DEC, 31, non_working_day),
300
+ 2026: (JAN, 2, non_working_day),
301
+ }