holidays 0.63__py3-none-any.whl → 0.65__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 (71) hide show
  1. holidays/calendars/hebrew.py +32 -3
  2. holidays/constants.py +1 -0
  3. holidays/countries/__init__.py +1 -0
  4. holidays/countries/afghanistan.py +192 -0
  5. holidays/countries/azerbaijan.py +2 -2
  6. holidays/countries/belarus.py +93 -14
  7. holidays/countries/el_salvador.py +45 -24
  8. holidays/countries/iran.py +3 -0
  9. holidays/countries/israel.py +55 -80
  10. holidays/countries/kazakhstan.py +2 -2
  11. holidays/countries/lithuania.py +1 -4
  12. holidays/countries/montenegro.py +143 -27
  13. holidays/countries/norway.py +1 -1
  14. holidays/countries/poland.py +9 -1
  15. holidays/countries/russia.py +1 -1
  16. holidays/countries/south_korea.py +2 -0
  17. holidays/countries/thailand.py +1 -2
  18. holidays/countries/ukraine.py +19 -10
  19. holidays/financial/ny_stock_exchange.py +81 -44
  20. holidays/groups/__init__.py +1 -0
  21. holidays/groups/christian.py +2 -0
  22. holidays/groups/custom.py +12 -0
  23. holidays/groups/hebrew.py +151 -0
  24. holidays/groups/persian.py +11 -0
  25. holidays/holiday_base.py +15 -8
  26. holidays/locale/be/LC_MESSAGES/BY.mo +0 -0
  27. holidays/locale/be/LC_MESSAGES/BY.po +53 -17
  28. holidays/locale/cnr/LC_MESSAGES/ME.mo +0 -0
  29. holidays/locale/cnr/LC_MESSAGES/ME.po +102 -0
  30. holidays/locale/en_US/LC_MESSAGES/AF.mo +0 -0
  31. holidays/locale/en_US/LC_MESSAGES/AF.po +92 -0
  32. holidays/locale/en_US/LC_MESSAGES/BY.mo +0 -0
  33. holidays/locale/en_US/LC_MESSAGES/BY.po +61 -20
  34. holidays/locale/en_US/LC_MESSAGES/ME.mo +0 -0
  35. holidays/locale/en_US/LC_MESSAGES/ME.po +102 -0
  36. holidays/locale/en_US/LC_MESSAGES/PL.mo +0 -0
  37. holidays/locale/en_US/LC_MESSAGES/PL.po +7 -5
  38. holidays/locale/en_US/LC_MESSAGES/SV.mo +0 -0
  39. holidays/locale/en_US/LC_MESSAGES/SV.po +75 -0
  40. holidays/locale/es/LC_MESSAGES/SV.mo +0 -0
  41. holidays/locale/es/LC_MESSAGES/SV.po +75 -0
  42. holidays/locale/fa_AF/LC_MESSAGES/AF.mo +0 -0
  43. holidays/locale/fa_AF/LC_MESSAGES/AF.po +92 -0
  44. holidays/locale/pl/LC_MESSAGES/PL.mo +0 -0
  45. holidays/locale/pl/LC_MESSAGES/PL.po +8 -4
  46. holidays/locale/ps_AF/LC_MESSAGES/AF.mo +0 -0
  47. holidays/locale/ps_AF/LC_MESSAGES/AF.po +92 -0
  48. holidays/locale/ru/LC_MESSAGES/BY.mo +0 -0
  49. holidays/locale/ru/LC_MESSAGES/BY.po +111 -0
  50. holidays/locale/th/LC_MESSAGES/BY.mo +0 -0
  51. holidays/locale/th/LC_MESSAGES/BY.po +109 -0
  52. holidays/locale/th/LC_MESSAGES/NO.mo +0 -0
  53. holidays/locale/th/LC_MESSAGES/NO.po +80 -0
  54. holidays/locale/th/LC_MESSAGES/RU.mo +0 -0
  55. holidays/locale/th/LC_MESSAGES/RU.po +90 -0
  56. holidays/locale/th/LC_MESSAGES/UA.mo +0 -0
  57. holidays/locale/th/LC_MESSAGES/UA.po +114 -0
  58. holidays/locale/uk/LC_MESSAGES/ME.mo +0 -0
  59. holidays/locale/uk/LC_MESSAGES/ME.po +102 -0
  60. holidays/locale/uk/LC_MESSAGES/PL.mo +0 -0
  61. holidays/locale/uk/LC_MESSAGES/PL.po +7 -5
  62. holidays/locale/uk/LC_MESSAGES/SV.mo +0 -0
  63. holidays/locale/uk/LC_MESSAGES/SV.po +75 -0
  64. holidays/registry.py +1 -0
  65. holidays/version.py +1 -1
  66. {holidays-0.63.dist-info → holidays-0.65.dist-info}/AUTHORS +1 -0
  67. {holidays-0.63.dist-info → holidays-0.65.dist-info}/METADATA +17 -12
  68. {holidays-0.63.dist-info → holidays-0.65.dist-info}/RECORD +71 -41
  69. {holidays-0.63.dist-info → holidays-0.65.dist-info}/WHEEL +1 -1
  70. {holidays-0.63.dist-info → holidays-0.65.dist-info}/LICENSE +0 -0
  71. {holidays-0.63.dist-info → holidays-0.65.dist-info}/top_level.txt +0 -0
@@ -1598,7 +1598,36 @@ class _HebrewLunisolar:
1598
1598
  2100: (OCT, 13),
1599
1599
  }
1600
1600
 
1601
- @staticmethod
1602
- def _get_holiday(holiday: str, year: int) -> Optional[date]:
1603
- dt = getattr(_HebrewLunisolar, f"{holiday}_DATES", {}).get(year, ())
1601
+ def _get_holiday(self, holiday: str, year: int) -> Optional[date]:
1602
+ dt = getattr(self, f"{holiday}_DATES", {}).get(year, ())
1604
1603
  return date(year, *dt) if dt else None
1604
+
1605
+ def hanukkah_date(self, year: int) -> set[Optional[date]]:
1606
+ return {self._get_holiday(HANUKKAH, y) for y in (year - 1, year)}
1607
+
1608
+ def israel_independence_date(self, year: int) -> Optional[date]:
1609
+ return self._get_holiday(INDEPENDENCE_DAY, year)
1610
+
1611
+ def lag_baomer_date(self, year: int) -> Optional[date]:
1612
+ return self._get_holiday(LAG_BAOMER, year)
1613
+
1614
+ def passover_date(self, year: int) -> Optional[date]:
1615
+ return self._get_holiday(PASSOVER, year)
1616
+
1617
+ def purim_date(self, year: int) -> Optional[date]:
1618
+ return self._get_holiday(PURIM, year)
1619
+
1620
+ def rosh_hashanah_date(self, year: int) -> Optional[date]:
1621
+ return self._get_holiday(ROSH_HASHANAH, year)
1622
+
1623
+ def shavuot_date(self, year: int) -> Optional[date]:
1624
+ return self._get_holiday(SHAVUOT, year)
1625
+
1626
+ def sukkot_date(self, year: int) -> Optional[date]:
1627
+ return self._get_holiday(SUKKOT, year)
1628
+
1629
+ def tisha_bav_date(self, year: int) -> Optional[date]:
1630
+ return self._get_holiday(TISHA_BAV, year)
1631
+
1632
+ def yom_kippur_date(self, year: int) -> Optional[date]:
1633
+ return self._get_holiday(YOM_KIPPUR, year)
holidays/constants.py CHANGED
@@ -54,6 +54,7 @@ CHRISTIAN = "christian"
54
54
  HEBREW = "hebrew"
55
55
  HINDU = "hindu"
56
56
  ISLAMIC = "islamic"
57
+ ORTHODOX = "orthodox"
57
58
 
58
59
  DEFAULT_START_YEAR = 1901
59
60
  DEFAULT_END_YEAR = 2100
@@ -12,6 +12,7 @@
12
12
 
13
13
  # flake8: noqa: F401
14
14
 
15
+ from .afghanistan import Afghanistan, AF, AFG
15
16
  from .albania import Albania, AL, ALB
16
17
  from .algeria import Algeria, DZ, DZA
17
18
  from .american_samoa import AmericanSamoa, AS, ASM, HolidaysAS
@@ -0,0 +1,192 @@
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 AUTHORS 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 (
17
+ JAN,
18
+ MAR,
19
+ APR,
20
+ MAY,
21
+ JUN,
22
+ JUL,
23
+ AUG,
24
+ SEP,
25
+ OCT,
26
+ NOV,
27
+ DEC,
28
+ FRI,
29
+ SAT,
30
+ )
31
+ from holidays.groups import InternationalHolidays, IslamicHolidays, PersianCalendarHolidays
32
+ from holidays.holiday_base import HolidayBase
33
+
34
+
35
+ class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays, PersianCalendarHolidays):
36
+ """
37
+ https://en.wikipedia.org/wiki/Public_holidays_in_Afghanistan
38
+ https://www.timeanddate.com/holidays/afghanistan/
39
+ https://en.wikipedia.org/wiki/Workweek_and_weekend
40
+ """
41
+
42
+ country = "AF"
43
+ default_language = "fa_AF"
44
+ # %s (estimated).
45
+ estimated_label = tr("%s (برآورد شده)")
46
+ supported_languages = ("en_US", "fa_AF", "ps_AF")
47
+ # Afghanistan's regaining of full independence from British influence.
48
+ start_year = 1919
49
+ weekend = {FRI, SAT}
50
+
51
+ def __init__(self, *args, **kwargs):
52
+ InternationalHolidays.__init__(self)
53
+ IslamicHolidays.__init__(self, AfghanistanIslamicHolidays)
54
+ PersianCalendarHolidays.__init__(self)
55
+ super().__init__(*args, **kwargs)
56
+
57
+ def _populate_public_holidays(self):
58
+ if self._year >= 1989:
59
+ # Liberation Day.
60
+ self._add_holiday_feb_15(tr("روز آزادی"))
61
+
62
+ # Afghanistan Independence Day.
63
+ self._add_holiday_aug_19(tr("روز استقلال افغانستان"))
64
+
65
+ if self._year <= 1996 or 2001 <= self._year <= 2020:
66
+ # Nowruz.
67
+ self._add_nowruz_day(tr("نوروز"))
68
+
69
+ if self._year >= 1992:
70
+ # Mojahedin's Victory Day.
71
+ self._add_holiday_apr_28(tr("روز پیروزی مجاهدین"))
72
+
73
+ if 1974 <= self._year <= 1996 or 2002 <= self._year <= 2021:
74
+ # International Workers' Day.
75
+ self._add_labor_day(tr("روز جهانی کارگر"))
76
+
77
+ if 1978 <= self._year <= 1988:
78
+ # Soviet Victory Day.
79
+ self._add_holiday_may_9(tr("روز پیروزی شوروی"))
80
+
81
+ if self._year >= 2022:
82
+ # Islamic Emirate Victory Day.
83
+ self._add_islamic_emirat_victory_day(tr("روز پیروزی امارت اسلامی"))
84
+
85
+ # American Withdrawal Day.
86
+ self._add_holiday_aug_31(tr("روز خروج آمریکایی ها"))
87
+
88
+ if 2012 <= self._year <= 2020:
89
+ # Martyrs' Day.
90
+ self._add_holiday_sep_9(tr("روز شهیدان"))
91
+
92
+ if self._year <= 2021:
93
+ # Ashura.
94
+ self._add_ashura_day(tr("عاشورا"))
95
+
96
+ # Prophet's Birthday.
97
+ self._add_mawlid_day(tr("میلاد پیامبر"))
98
+
99
+ # First Day of Ramadan.
100
+ self._add_ramadan_beginning_day(tr("اول رمضان"))
101
+
102
+ # Eid al-Fitr.
103
+ name = tr("عید فطر")
104
+ self._add_eid_al_fitr_day(name)
105
+ self._add_eid_al_fitr_day_two(name)
106
+ self._add_eid_al_fitr_day_three(name)
107
+
108
+ # Day of Arafah.
109
+ self._add_arafah_day(tr("روز عرفه"))
110
+
111
+ # Eid al-Adha.
112
+ name = tr("عید قربانی")
113
+ self._add_eid_al_adha_day(name)
114
+ self._add_eid_al_adha_day_two(name)
115
+ self._add_eid_al_adha_day_three(name)
116
+
117
+
118
+ class AF(Afghanistan):
119
+ pass
120
+
121
+
122
+ class AFG(Afghanistan):
123
+ pass
124
+
125
+
126
+ class AfghanistanIslamicHolidays(_CustomIslamicHolidays):
127
+ ASHURA_DATES = {
128
+ 2014: (NOV, 3),
129
+ 2015: (OCT, 24),
130
+ 2016: (OCT, 12),
131
+ 2017: (OCT, 1),
132
+ 2018: (SEP, 21),
133
+ 2019: (SEP, 10),
134
+ 2020: (AUG, 30),
135
+ 2021: (AUG, 19),
136
+ }
137
+
138
+ EID_AL_ADHA_DATES = {
139
+ 2014: (OCT, 5),
140
+ 2015: (SEP, 23),
141
+ 2016: (SEP, 13),
142
+ 2017: (SEP, 2),
143
+ 2018: (AUG, 22),
144
+ 2019: (AUG, 11),
145
+ 2020: (JUL, 31),
146
+ 2021: (JUL, 20),
147
+ 2022: (JUL, 9),
148
+ 2023: (JUN, 28),
149
+ 2024: (JUN, 17),
150
+ }
151
+
152
+ EID_AL_FITR_DATES = {
153
+ 2014: (JUL, 29),
154
+ 2015: (JUL, 18),
155
+ 2016: (JUL, 7),
156
+ 2017: (JUN, 26),
157
+ 2018: (JUN, 15),
158
+ 2019: (JUN, 4),
159
+ 2020: (MAY, 24),
160
+ 2021: (MAY, 13),
161
+ 2022: (MAY, 1),
162
+ 2023: (APR, 22),
163
+ 2024: (APR, 10),
164
+ }
165
+
166
+ MAWLID_DATES = {
167
+ 2014: (JAN, 14),
168
+ 2015: ((JAN, 3), (DEC, 24)),
169
+ 2016: (DEC, 12),
170
+ 2017: (DEC, 1),
171
+ 2018: (NOV, 21),
172
+ 2019: (NOV, 10),
173
+ 2020: (OCT, 29),
174
+ 2021: (OCT, 19),
175
+ 2022: (OCT, 8),
176
+ 2023: (SEP, 27),
177
+ 2024: (SEP, 16),
178
+ }
179
+
180
+ RAMADAN_BEGINNING_DATES = {
181
+ 2014: (JUN, 29),
182
+ 2015: (JUN, 18),
183
+ 2016: (JUN, 7),
184
+ 2017: (MAY, 27),
185
+ 2018: (MAY, 16),
186
+ 2019: (MAY, 6),
187
+ 2020: (APR, 24),
188
+ 2021: (APR, 13),
189
+ 2022: (APR, 2),
190
+ 2023: (MAR, 23),
191
+ 2024: (MAR, 11),
192
+ }
@@ -287,10 +287,10 @@ class AzerbaijanStaticHolidays:
287
287
  2018: (APR, 11, presidential_elections),
288
288
  2019: (DEC, 27, municipal_elections),
289
289
  2020: (
290
- (MAR, 27, MAR, 29),
291
- (MAY, 27, MAY, 30),
292
290
  (JAN, 3, DEC, 28, 2019),
293
291
  (JAN, 6, DEC, 29, 2019),
292
+ (MAR, 27, MAR, 29),
293
+ (MAY, 27, MAY, 30),
294
294
  ),
295
295
  2021: (
296
296
  (MAY, 11, MAY, 8),
@@ -14,6 +14,7 @@ from gettext import gettext as tr
14
14
 
15
15
  from holidays.calendars.gregorian import GREGORIAN_CALENDAR, JAN, MAR, APR, MAY, JUN, JUL, NOV, DEC
16
16
  from holidays.calendars.julian import JULIAN_CALENDAR
17
+ from holidays.constants import PUBLIC, WORKDAY
17
18
  from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
18
19
  from holidays.holiday_base import HolidayBase
19
20
 
@@ -23,18 +24,24 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
23
24
  Belarus holidays.
24
25
 
25
26
  References:
26
- - http://president.gov.by/en/holidays_en/
27
+ - https://president.gov.by/en/gosudarstvo/prazdniki
28
+ - https://president.gov.by/be/gosudarstvo/prazdniki
29
+ - https://president.gov.by/ru/gosudarstvo/prazdniki
27
30
  - http://www.belarus.by/en/about-belarus/national-holidays
28
31
  - http://laws.newsby.org/documents/ukazp/pos05/ukaz05806.htm
29
32
  - http://president.gov.by/uploads/documents/2019/464uk.pdf
30
- - https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%91%D0%B5%D0%BB%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%B8%D0%B8
33
+ - https://ru.wikipedia.org/wiki/Праздники_Белоруссии
34
+
35
+ Cross-checked With:
36
+ - https://president.gov.by/en/gosudarstvo/prazdniki/calendar-2024
31
37
  """
32
38
 
33
39
  country = "BY"
34
40
  default_language = "be"
35
- supported_languages = ("be", "en_US")
36
- # The current set of holidays actual from 1998.
37
- start_year = 1998
41
+ supported_categories = (PUBLIC, WORKDAY)
42
+ supported_languages = ("be", "en_US", "ru", "th")
43
+ # Declaration of State Sovereignty of the BSSR.
44
+ start_year = 1991
38
45
 
39
46
  def __init__(self, *args, **kwargs):
40
47
  ChristianHolidays.__init__(self, JULIAN_CALENDAR)
@@ -44,10 +51,10 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
44
51
 
45
52
  def _populate_public_holidays(self):
46
53
  # New Year's Day.
47
- self._add_new_years_day(tr("Новы год"))
48
-
54
+ name = tr("Новы год")
55
+ self._add_new_years_day(name)
49
56
  if self._year >= 2020:
50
- self._add_new_years_day_two(tr("Новы год"))
57
+ self._add_new_years_day_two(name)
51
58
 
52
59
  # Orthodox Christmas Day.
53
60
  self._add_christmas_day(tr("Нараджэнне Хрыстова (праваслаўнае Раство)"))
@@ -55,8 +62,9 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
55
62
  # Women's Day.
56
63
  self._add_womens_day(tr("Дзень жанчын"))
57
64
 
58
- # Radunitsa (Day of Rejoicing).
59
- self._add_rejoicing_day(tr("Радаўніца"))
65
+ if 1995 <= self._year <= 1998:
66
+ # Constitution Day.
67
+ self._add_holiday_mar_15(tr("Дзень Канстытуцыі"))
60
68
 
61
69
  # Labor Day.
62
70
  self._add_labor_day(tr("Свята працы"))
@@ -64,15 +72,70 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
64
72
  # Victory Day.
65
73
  self._add_world_war_two_victory_day(tr("Дзень Перамогі"), is_western=False)
66
74
 
67
- # Independence Day.
68
- self._add_holiday_jul_3(tr("Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)"))
75
+ # Radunitsa (Day of Rejoicing).
76
+ self._add_rejoicing_day(tr("Радаўніца"))
77
+
78
+ # Independence Day of the Republic of Belarus (Day of the Republic).
79
+ name = tr("Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)")
80
+ if self._year >= 1997:
81
+ self._add_holiday_jul_3(name)
82
+ else:
83
+ self._add_holiday_jul_27(name)
69
84
 
70
- # October Revolution Day.
71
- self._add_holiday_nov_7(tr("Дзень Кастрычніцкай рэвалюцыі"))
85
+ if self._year >= 1995:
86
+ # October Revolution Day.
87
+ self._add_holiday_nov_7(tr("Дзень Кастрычніцкай рэвалюцыі"))
72
88
 
73
89
  # Catholic Christmas Day.
74
90
  self._add_christmas_day(tr("Нараджэнне Хрыстова (каталіцкае Раство)"), GREGORIAN_CALENDAR)
75
91
 
92
+ if self._year >= 1992:
93
+ # Catholic Easter.
94
+ name_catholic = tr("Каталiцкi Вялiкдзень")
95
+ self._add_easter_sunday(name_catholic, GREGORIAN_CALENDAR)
96
+
97
+ # Orthodox Easter.
98
+ name_orthodox = tr("Праваслаўны Вялiкдзень")
99
+ self._add_easter_sunday(name_orthodox)
100
+
101
+ if self._year <= 1997:
102
+ self._add_easter_monday(name_catholic, GREGORIAN_CALENDAR)
103
+ self._add_easter_monday(name_orthodox)
104
+
105
+ # Dzyady (All Souls' Day).
106
+ self._add_all_souls_day(tr("Дзень памяці"))
107
+
108
+ def _populate_workday_holidays(self):
109
+ # Day of the Fatherland's Defenders and the Armed Forces of the Republic of Belarus.
110
+ self._add_holiday_feb_23(tr("Дзень абаронцаў Айчыны і Узброеных Сіл Рэспублікі Беларусь"))
111
+
112
+ if self._year >= 1999:
113
+ # Constitution Day.
114
+ self._add_holiday_mar_15(tr("Дзень Канстытуцыі"))
115
+
116
+ if self._year >= 1996:
117
+ # Day of Unity of the Peoples of Belarus and Russia.
118
+ self._add_holiday_apr_2(tr("Дзень яднання народаў Беларусі і Расіі"))
119
+
120
+ if self._year >= 1998:
121
+ self._add_holiday_2nd_sun_of_may(
122
+ # Day of the National Coat of Arms of the Republic of Belarus,
123
+ # the National Flag of the Republic of Belarus
124
+ # and the National Anthem of the Republic of Belarus.
125
+ tr(
126
+ "Дзень Дзяржаўнага сцяга, Дзяржаўнага герба і Дзяржаўнага "
127
+ "гімна Рэспублікі Беларусь"
128
+ )
129
+ )
130
+
131
+ if self._year >= 2021:
132
+ # Day of People's Unity.
133
+ self._add_holiday_sep_17(tr("Дзень народнага адзінства"))
134
+
135
+ if self._year >= 1998:
136
+ # Dzyady (All Souls' Day).
137
+ self._add_all_souls_day(tr("Дзень памяці"))
138
+
76
139
 
77
140
  class BY(Belarus):
78
141
  pass
@@ -83,6 +146,12 @@ class BLR(Belarus):
83
146
 
84
147
 
85
148
  class BelarusStaticHolidays:
149
+ """
150
+ References
151
+ - https://belarusbank.by/en/financial-institutions/11151
152
+ - https://belarusbank.by/en/financial-institutions/11160
153
+ """
154
+
86
155
  # Date format (see strftime() Format Codes)
87
156
  substituted_date_format = tr("%d.%m.%Y")
88
157
  # Day off (substituted from %s).
@@ -221,4 +290,14 @@ class BelarusStaticHolidays:
221
290
  (MAY, 8, MAY, 13),
222
291
  (NOV, 6, NOV, 11),
223
292
  ),
293
+ 2024: (
294
+ (MAY, 13, MAY, 18),
295
+ (NOV, 8, NOV, 16),
296
+ ),
297
+ 2025: (
298
+ (JAN, 6, JAN, 11),
299
+ (APR, 28, APR, 26),
300
+ (JUL, 4, JUL, 12),
301
+ (DEC, 26, DEC, 20),
302
+ ),
224
303
  }
@@ -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.groups import ChristianHolidays, InternationalHolidays
14
16
  from holidays.holiday_base import HolidayBase
15
17
 
@@ -17,12 +19,14 @@ from holidays.holiday_base import HolidayBase
17
19
  class ElSalvador(HolidayBase, ChristianHolidays, InternationalHolidays):
18
20
  """
19
21
  References:
20
- - https://www.transparencia.gob.sv/institutions/gd-usulutan/documents/192280/download
21
- - https://www.timeanddate.com/holidays/el-salvador
22
- - https://www.officeholidays.com/countries/el-salvador
22
+ - `Labor Code 1972 <https://www.transparencia.gob.sv/institutions/gd-usulutan/documents/192280/download>`_
23
+ - https://www.timeanddate.com/holidays/el-salvador
24
+ - https://www.officeholidays.com/countries/el-salvador
23
25
  """
24
26
 
25
27
  country = "SV"
28
+ default_language = "es"
29
+ supported_languages = ("en_US", "es", "uk")
26
30
  subdivisions = (
27
31
  "AH", # Ahuachapán
28
32
  "CA", # Cabañas
@@ -39,6 +43,24 @@ class ElSalvador(HolidayBase, ChristianHolidays, InternationalHolidays):
39
43
  "UN", # La Unión
40
44
  "US", # Usulután
41
45
  )
46
+ subdivisions_aliases = {
47
+ "Ahuachapán": "AH",
48
+ "Cabañas": "CA",
49
+ "Chalatenango": "CH",
50
+ "Cuscatlán": "CU",
51
+ "La Libertad": "LI",
52
+ "Morazán": "MO",
53
+ "La Paz": "PA",
54
+ "Santa Ana": "SA",
55
+ "San Miguel": "SM",
56
+ "Sonsonate": "SO",
57
+ "San Salvador": "SS",
58
+ "San Vicente": "SV",
59
+ "La Unión": "UN",
60
+ "Usulután": "US",
61
+ }
62
+ # Labor Code 1972.
63
+ start_year = 1973
42
64
 
43
65
  def __init__(self, *args, **kwargs):
44
66
  ChristianHolidays.__init__(self)
@@ -47,48 +69,47 @@ class ElSalvador(HolidayBase, ChristianHolidays, InternationalHolidays):
47
69
 
48
70
  def _populate_public_holidays(self):
49
71
  # New Year's Day.
50
- self._add_new_years_day("New Year's Day")
72
+ self._add_new_years_day(tr("Año Nuevo"))
51
73
 
52
74
  # Maundy Thursday.
53
- self._add_holy_thursday("Maundy Thursday")
75
+ self._add_holy_thursday(tr("Jueves Santo"))
54
76
 
55
77
  # Good Friday.
56
- self._add_good_friday("Good Friday")
78
+ self._add_good_friday(tr("Viernes Santo"))
57
79
 
58
80
  # Holy Saturday.
59
- self._add_holy_saturday("Holy Saturday")
81
+ self._add_holy_saturday(tr("Sábado Santo"))
60
82
 
61
83
  # Labor Day.
62
- self._add_labor_day("Labor Day")
84
+ self._add_labor_day(tr("Día del Trabajo"))
63
85
 
86
+ # Legislative Decree #399 from Apr 14, 2016.
64
87
  if self._year >= 2016:
65
- # Legislative Decree #399 from Apr 14, 2016
66
- # Mothers' Day.
67
- self._add_holiday_may_10("Mothers' Day")
88
+ # Mother's Day.
89
+ self._add_holiday_may_10(tr("Día de la Madre"))
68
90
 
91
+ # Legislative Decree #208 from Jun 17, 2012.
69
92
  if self._year >= 2013:
70
- # Legislative Decree #208 from Jun 17, 2012
71
- # Fathers' Day.
72
- self._add_holiday_jun_17("Fathers' Day")
93
+ # Father's Day.
94
+ self._add_holiday_jun_17(tr("Día del Padre"))
73
95
 
74
- # Feast of San Salvador.
75
- self._add_holiday_aug_6("Feast of San Salvador")
96
+ # Celebrations of San Salvador.
97
+ self._add_holiday_aug_6(tr("Celebración del Divino Salvador del Mundo"))
76
98
 
77
99
  # Independence Day.
78
- self._add_holiday_sep_15("Independence Day")
100
+ self._add_holiday_sep_15(tr("Día de la Independencia"))
79
101
 
80
102
  # All Souls' Day.
81
- self._add_all_souls_day("All Souls' Day")
103
+ self._add_all_souls_day(tr("Día de los Difuntos"))
82
104
 
83
105
  # Christmas Day.
84
- self._add_christmas_day("Christmas Day")
106
+ self._add_christmas_day(tr("Navidad"))
85
107
 
86
108
  def _populate_subdiv_ss_public_holidays(self):
87
- # San Salvador Day 1.
88
- self._add_holiday_aug_3("San Salvador Day 1")
89
-
90
- # San Salvador Day 2.
91
- self._add_holiday_aug_5("San Salvador Day 2")
109
+ # Feast of San Salvador.
110
+ name = tr("Fiesta de San Salvador")
111
+ self._add_holiday_aug_3(name)
112
+ self._add_holiday_aug_5(name)
92
113
 
93
114
 
94
115
  class SV(ElSalvador):
@@ -12,6 +12,7 @@
12
12
 
13
13
  from gettext import gettext as tr
14
14
 
15
+ from holidays.calendars.gregorian import FRI
15
16
  from holidays.groups import IslamicHolidays, PersianCalendarHolidays
16
17
  from holidays.holiday_base import HolidayBase
17
18
 
@@ -21,6 +22,7 @@ class Iran(HolidayBase, IslamicHolidays, PersianCalendarHolidays):
21
22
  References:
22
23
  - https://en.wikipedia.org/wiki/Public_holidays_in_Iran
23
24
  - https://fa.wikipedia.org/wiki/تعطیلات_عمومی_در_ایران
25
+ - https://en.wikipedia.org/wiki/Workweek_and_weekend
24
26
  """
25
27
 
26
28
  country = "IR"
@@ -29,6 +31,7 @@ class Iran(HolidayBase, IslamicHolidays, PersianCalendarHolidays):
29
31
  estimated_label = tr("(تخمین زده) %s")
30
32
  supported_languages = ("en_US", "fa")
31
33
  start_year = 1980
34
+ weekend = {FRI}
32
35
 
33
36
  def __init__(self, *args, **kwargs):
34
37
  IslamicHolidays.__init__(self)