holidays 0.62__py3-none-any.whl → 0.64__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 (97) hide show
  1. holidays/calendars/hebrew.py +32 -3
  2. holidays/calendars/thai.py +25 -9
  3. holidays/constants.py +1 -0
  4. holidays/countries/__init__.py +1 -0
  5. holidays/countries/afghanistan.py +104 -0
  6. holidays/countries/angola.py +22 -25
  7. holidays/countries/argentina.py +2 -3
  8. holidays/countries/azerbaijan.py +2 -2
  9. holidays/countries/belarus.py +93 -14
  10. holidays/countries/bolivia.py +1 -1
  11. holidays/countries/bosnia_and_herzegovina.py +1 -1
  12. holidays/countries/cambodia.py +6 -7
  13. holidays/countries/canada.py +1 -2
  14. holidays/countries/chile.py +10 -11
  15. holidays/countries/costa_rica.py +1 -1
  16. holidays/countries/croatia.py +1 -2
  17. holidays/countries/czechia.py +1 -1
  18. holidays/countries/dominica.py +1 -2
  19. holidays/countries/el_salvador.py +45 -24
  20. holidays/countries/france.py +18 -3
  21. holidays/countries/hungary.py +2 -2
  22. holidays/countries/israel.py +55 -81
  23. holidays/countries/kazakhstan.py +8 -2
  24. holidays/countries/latvia.py +2 -4
  25. holidays/countries/lithuania.py +1 -1
  26. holidays/countries/montenegro.py +143 -27
  27. holidays/countries/namibia.py +1 -1
  28. holidays/countries/new_zealand.py +3 -8
  29. holidays/countries/norway.py +1 -1
  30. holidays/countries/philippines.py +2 -2
  31. holidays/countries/poland.py +9 -1
  32. holidays/countries/russia.py +1 -1
  33. holidays/countries/south_korea.py +4 -8
  34. holidays/countries/thailand.py +499 -213
  35. holidays/countries/turkey.py +2 -4
  36. holidays/countries/ukraine.py +19 -10
  37. holidays/countries/united_states.py +26 -23
  38. holidays/countries/uruguay.py +8 -7
  39. holidays/financial/__init__.py +2 -2
  40. holidays/financial/european_central_bank.py +10 -3
  41. holidays/financial/ny_stock_exchange.py +82 -45
  42. holidays/groups/__init__.py +1 -0
  43. holidays/groups/christian.py +2 -0
  44. holidays/groups/custom.py +12 -0
  45. holidays/groups/hebrew.py +151 -0
  46. holidays/holiday_base.py +4 -13
  47. holidays/locale/be/LC_MESSAGES/BY.mo +0 -0
  48. holidays/locale/be/LC_MESSAGES/BY.po +53 -17
  49. holidays/locale/cnr/LC_MESSAGES/ME.mo +0 -0
  50. holidays/locale/cnr/LC_MESSAGES/ME.po +102 -0
  51. holidays/locale/en_US/LC_MESSAGES/AF.mo +0 -0
  52. holidays/locale/en_US/LC_MESSAGES/AF.po +98 -0
  53. holidays/locale/en_US/LC_MESSAGES/BY.mo +0 -0
  54. holidays/locale/en_US/LC_MESSAGES/BY.po +61 -20
  55. holidays/locale/en_US/LC_MESSAGES/ME.mo +0 -0
  56. holidays/locale/en_US/LC_MESSAGES/ME.po +102 -0
  57. holidays/locale/en_US/LC_MESSAGES/PL.mo +0 -0
  58. holidays/locale/en_US/LC_MESSAGES/PL.po +7 -5
  59. holidays/locale/en_US/LC_MESSAGES/SV.mo +0 -0
  60. holidays/locale/en_US/LC_MESSAGES/SV.po +75 -0
  61. holidays/locale/en_US/LC_MESSAGES/TH.mo +0 -0
  62. holidays/locale/en_US/LC_MESSAGES/TH.po +128 -24
  63. holidays/locale/es/LC_MESSAGES/SV.mo +0 -0
  64. holidays/locale/es/LC_MESSAGES/SV.po +75 -0
  65. holidays/locale/fa_AF/LC_MESSAGES/AF.mo +0 -0
  66. holidays/locale/fa_AF/LC_MESSAGES/AF.po +98 -0
  67. holidays/locale/pl/LC_MESSAGES/PL.mo +0 -0
  68. holidays/locale/pl/LC_MESSAGES/PL.po +8 -4
  69. holidays/locale/ps_AF/LC_MESSAGES/AF.mo +0 -0
  70. holidays/locale/ps_AF/LC_MESSAGES/AF.po +98 -0
  71. holidays/locale/ru/LC_MESSAGES/BY.mo +0 -0
  72. holidays/locale/ru/LC_MESSAGES/BY.po +111 -0
  73. holidays/locale/th/LC_MESSAGES/BY.mo +0 -0
  74. holidays/locale/th/LC_MESSAGES/BY.po +109 -0
  75. holidays/locale/th/LC_MESSAGES/NO.mo +0 -0
  76. holidays/locale/th/LC_MESSAGES/NO.po +80 -0
  77. holidays/locale/th/LC_MESSAGES/RU.mo +0 -0
  78. holidays/locale/th/LC_MESSAGES/RU.po +90 -0
  79. holidays/locale/th/LC_MESSAGES/TH.mo +0 -0
  80. holidays/locale/th/LC_MESSAGES/TH.po +127 -23
  81. holidays/locale/th/LC_MESSAGES/UA.mo +0 -0
  82. holidays/locale/th/LC_MESSAGES/UA.po +114 -0
  83. holidays/locale/uk/LC_MESSAGES/ME.mo +0 -0
  84. holidays/locale/uk/LC_MESSAGES/ME.po +102 -0
  85. holidays/locale/uk/LC_MESSAGES/PL.mo +0 -0
  86. holidays/locale/uk/LC_MESSAGES/PL.po +7 -5
  87. holidays/locale/uk/LC_MESSAGES/SV.mo +0 -0
  88. holidays/locale/uk/LC_MESSAGES/SV.po +75 -0
  89. holidays/registry.py +3 -2
  90. holidays/utils.py +1 -5
  91. holidays/version.py +1 -1
  92. {holidays-0.62.dist-info → holidays-0.64.dist-info}/AUTHORS +1 -0
  93. {holidays-0.62.dist-info → holidays-0.64.dist-info}/METADATA +22 -17
  94. {holidays-0.62.dist-info → holidays-0.64.dist-info}/RECORD +97 -67
  95. {holidays-0.62.dist-info → holidays-0.64.dist-info}/WHEEL +1 -1
  96. {holidays-0.62.dist-info → holidays-0.64.dist-info}/LICENSE +0 -0
  97. {holidays-0.62.dist-info → holidays-0.64.dist-info}/top_level.txt +0 -0
@@ -10,65 +10,141 @@
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
+
15
+ from holidays.calendars import _CustomIslamicHolidays
16
+ from holidays.calendars.gregorian import GREGORIAN_CALENDAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
13
17
  from holidays.calendars.julian import JULIAN_CALENDAR
14
- from holidays.groups import ChristianHolidays, InternationalHolidays
18
+ from holidays.constants import CATHOLIC, HEBREW, ISLAMIC, ORTHODOX, PUBLIC, WORKDAY
19
+ from holidays.groups import (
20
+ ChristianHolidays,
21
+ HebrewCalendarHolidays,
22
+ InternationalHolidays,
23
+ IslamicHolidays,
24
+ StaticHolidays,
25
+ )
15
26
  from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON, SUN_TO_NEXT_TUE
16
27
 
17
28
 
18
- class Montenegro(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
29
+ class Montenegro(
30
+ ObservedHolidayBase,
31
+ ChristianHolidays,
32
+ HebrewCalendarHolidays,
33
+ InternationalHolidays,
34
+ IslamicHolidays,
35
+ StaticHolidays,
36
+ ):
19
37
  """
20
38
  References:
21
- - https://en.wikipedia.org/wiki/Public_holidays_in_Montenegro
22
- - https://me.usembassy.gov/holiday-calendar/
23
- - https://publicholidays.eu/montenegro/2023-dates/
24
- - https://www.officeholidays.com/countries/montenegro/2023
39
+ - https://en.wikipedia.org/wiki/Public_holidays_in_Montenegro
40
+ - `Zakon o državnim i drugim praznicima <https://wapi.gov.me/download-preview/927f23a3-db4e-4f65-9f29-ce3c9dde0c90?version=1.0>`_
41
+ - `Zakon o svetkovanju vjerskih praznika <https://wapi.gov.me/download-preview/4f0b05a4-c85b-4eb2-bc29-0ad8363a9ba3?version=1.0>`_
25
42
  """
26
43
 
27
44
  country = "ME"
28
- observed_label = "%s (observed)"
45
+ default_language = "cnr"
46
+ # %s (estimated).
47
+ estimated_label = tr("%s (procijenjeno)")
48
+ # %s (observed).
49
+ observed_label = tr("%s (neradni dan)")
50
+ # %s (observed, estimated).
51
+ observed_estimated_label = tr("%s (neradni dan, procijenjeno)")
52
+ supported_languages = ("cnr", "en_US", "uk")
53
+ supported_categories = (CATHOLIC, ISLAMIC, HEBREW, ORTHODOX, PUBLIC, WORKDAY)
54
+ start_year = 2007
29
55
 
30
56
  def __init__(self, *args, **kwargs):
31
57
  ChristianHolidays.__init__(self, calendar=JULIAN_CALENDAR)
58
+ HebrewCalendarHolidays.__init__(self)
32
59
  InternationalHolidays.__init__(self)
60
+ IslamicHolidays.__init__(self, cls=MontenegroIslamicHolidays)
61
+ StaticHolidays.__init__(self, cls=MontenegroStaticHolidays)
33
62
  kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
34
63
  super().__init__(*args, **kwargs)
35
64
 
36
65
  def _populate_public_holidays(self):
37
66
  # New Year's Day.
38
- name = "New Year's Day"
67
+ name = tr("Nova godina")
39
68
  self._add_observed(self._add_new_years_day(name), rule=SUN_TO_NEXT_TUE)
40
69
  self._add_observed(self._add_new_years_day_two(name))
41
70
 
42
- # Orthodox Christmas Eve.
43
- self._add_christmas_eve("Orthodox Christmas Eve")
44
-
45
- # Orthodox Christmas.
46
- self._add_christmas_day("Orthodox Christmas")
47
-
48
- # Labour Day.
49
- name = "Labour Day"
71
+ # Labor Day.
72
+ name = tr("Praznik rada")
50
73
  self._add_observed(self._add_labor_day(name), rule=SUN_TO_NEXT_TUE)
51
74
  self._add_observed(self._add_labor_day_two(name))
52
75
 
53
- # Good Friday.
54
- self._add_good_friday("Orthodox Good Friday")
55
-
56
- # Easter Sunday.
57
- self._add_easter_sunday("Orthodox Easter Sunday")
58
-
59
- # Easter Monday.
60
- self._add_easter_monday("Orthodox Easter Monday")
61
-
62
76
  # Independence Day.
63
- name = "Independence Day"
77
+ name = tr("Dan nezavisnosti")
64
78
  self._add_observed(self._add_holiday_may_21(name), rule=SUN_TO_NEXT_TUE)
65
79
  self._add_observed(self._add_holiday_may_22(name))
66
80
 
67
81
  # Statehood Day.
68
- name = "Statehood Day"
82
+ name = tr("Dan državnosti")
69
83
  self._add_observed(self._add_holiday_jul_13(name), rule=SUN_TO_NEXT_TUE)
70
84
  self._add_observed(self._add_holiday_jul_14(name))
71
85
 
86
+ if self._year >= 2022:
87
+ # Njegos Day.
88
+ self._add_observed(self._add_holiday_nov_13(tr("Njegošev dan")))
89
+
90
+ def _populate_catholic_holidays(self):
91
+ # Good Friday.
92
+ self._add_good_friday(tr("Veliki petak"), GREGORIAN_CALENDAR)
93
+
94
+ # Easter.
95
+ self._add_easter_monday(tr("Uskrs"), GREGORIAN_CALENDAR)
96
+
97
+ # All Saints' Day.
98
+ self._add_all_saints_day(tr("Svi Sveti"))
99
+
100
+ # Christmas Eve.
101
+ self._add_christmas_eve(tr("Badnji dan"), GREGORIAN_CALENDAR)
102
+
103
+ # Christmas.
104
+ name = tr("Božić")
105
+ self._add_christmas_day(name, GREGORIAN_CALENDAR)
106
+ self._add_christmas_day_two(name, GREGORIAN_CALENDAR)
107
+
108
+ def _populate_hebrew_holidays(self):
109
+ # Pesach.
110
+ self._add_passover(tr("Pasha"), range(2))
111
+
112
+ # Yom Kippur.
113
+ self._add_yom_kippur(tr("Jom Kipur"), range(2))
114
+
115
+ def _populate_islamic_holidays(self):
116
+ # Eid al-Fitr.
117
+ name = tr("Ramazanski bajram")
118
+ self._add_eid_al_fitr_day(name)
119
+ self._add_eid_al_fitr_day_two(name)
120
+ self._add_eid_al_fitr_day_three(name)
121
+
122
+ # Eid al-Adha.
123
+ name = tr("Kurbanski bajram")
124
+ self._add_eid_al_adha_day(name)
125
+ self._add_eid_al_adha_day_two(name)
126
+ self._add_eid_al_adha_day_three(name)
127
+
128
+ def _populate_orthodox_holidays(self):
129
+ # Good Friday.
130
+ self._add_good_friday(tr("Veliki petak"))
131
+
132
+ # Easter.
133
+ self._add_easter_monday(tr("Uskrs"))
134
+
135
+ # Christmas Eve.
136
+ self._add_christmas_eve(tr("Badnji dan"))
137
+
138
+ # Christmas.
139
+ name = tr("Božić")
140
+ self._add_christmas_day(name)
141
+ self._add_christmas_day_two(name)
142
+
143
+ def _populate_workday_holidays(self):
144
+ if self._year >= 2022:
145
+ # Ecological State Day.
146
+ self._add_holiday_sep_20(tr("Dan Ekološke države"))
147
+
72
148
 
73
149
  class ME(Montenegro):
74
150
  pass
@@ -76,3 +152,43 @@ class ME(Montenegro):
76
152
 
77
153
  class MNE(Montenegro):
78
154
  pass
155
+
156
+
157
+ class MontenegroIslamicHolidays(_CustomIslamicHolidays):
158
+ EID_AL_ADHA_DATES = {
159
+ 2012: (OCT, 26),
160
+ 2013: (OCT, 15),
161
+ 2014: (OCT, 5),
162
+ 2015: (SEP, 24),
163
+ 2016: (SEP, 13),
164
+ 2017: (SEP, 2),
165
+ 2018: (AUG, 22),
166
+ 2019: (AUG, 11),
167
+ 2020: (JUL, 31),
168
+ 2021: (JUL, 20),
169
+ 2022: (JUL, 9),
170
+ 2023: (JUN, 28),
171
+ 2024: (JUN, 16),
172
+ }
173
+
174
+ EID_AL_FITR_DATES = {
175
+ 2012: (AUG, 19),
176
+ 2013: (AUG, 8),
177
+ 2014: (JUL, 29),
178
+ 2015: (JUL, 18),
179
+ 2016: (JUL, 7),
180
+ 2017: (JUN, 26),
181
+ 2018: (JUN, 15),
182
+ 2019: (JUN, 4),
183
+ 2020: (MAY, 24),
184
+ 2021: (MAY, 13),
185
+ 2022: (MAY, 2),
186
+ 2023: (APR, 21),
187
+ 2024: (APR, 10),
188
+ }
189
+
190
+
191
+ class MontenegroStaticHolidays:
192
+ special_public_holidays = {
193
+ 2024: (NOV, 14, tr("Njegošev dan")),
194
+ }
@@ -73,7 +73,7 @@ class Namibia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
73
73
  self._add_holiday_sep_10(
74
74
  "Day of the Namibian Women and International Human Rights Day"
75
75
  if self._year >= 2005
76
- else "International Human Rights Day",
76
+ else "International Human Rights Day"
77
77
  )
78
78
  )
79
79
 
@@ -122,9 +122,7 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
122
122
  super().__init__(*args, **kwargs)
123
123
 
124
124
  def _get_nearest_monday(self, *args) -> Optional[date]:
125
- dt = args if len(args) > 1 else args[0]
126
- dt = dt if isinstance(dt, date) else date(self._year, *dt)
127
- return self._get_observed_date(dt, rule=ALL_TO_NEAREST_MON)
125
+ return self._get_observed_date(date(self._year, *args), rule=ALL_TO_NEAREST_MON)
128
126
 
129
127
  def _populate_public_holidays(self):
130
128
  # Bank Holidays Act 1873
@@ -256,12 +254,9 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
256
254
 
257
255
  def _populate_subdiv_ntl_public_holidays(self):
258
256
  if 1964 <= self._year <= 1973:
259
- name = "Waitangi Day"
260
- dt = (FEB, 6)
257
+ self._add_holiday("Waitangi Day", self._get_nearest_monday(FEB, 6))
261
258
  else:
262
- name = "Auckland Anniversary Day"
263
- dt = (JAN, 29)
264
- self._add_holiday(name, self._get_nearest_monday(dt))
259
+ self._add_holiday("Auckland Anniversary Day", self._get_nearest_monday(JAN, 29))
265
260
 
266
261
  def _populate_subdiv_ota_public_holidays(self):
267
262
  # there is no easily determined single day of local observance?!?!
@@ -35,7 +35,7 @@ class Norway(HolidayBase, ChristianHolidays, InternationalHolidays):
35
35
 
36
36
  country = "NO"
37
37
  default_language = "no"
38
- supported_languages = ("en_US", "no", "uk")
38
+ supported_languages = ("en_US", "no", "th", "uk")
39
39
 
40
40
  def __init__(self, include_sundays=False, *args, **kwargs):
41
41
  """
@@ -267,8 +267,8 @@ class PhilippinesStaticHolidays:
267
267
  (NOV, 2, additional_special),
268
268
  (DEC, 24, additional_special),
269
269
  ),
270
- 2010: ((DEC, 24, additional_special),),
271
- 2012: ((NOV, 2, additional_special),),
270
+ 2010: (DEC, 24, additional_special),
271
+ 2012: (NOV, 2, additional_special),
272
272
  2013: (
273
273
  (NOV, 2, additional_special),
274
274
  (DEC, 24, additional_special),
@@ -19,7 +19,10 @@ from holidays.holiday_base import HolidayBase
19
19
 
20
20
  class Poland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
21
21
  """
22
- https://pl.wikipedia.org/wiki/Dni_wolne_od_pracy_w_Polsce
22
+ References:
23
+ - https://en.wikipedia.org/wiki/Public_holidays_in_Poland
24
+ - https://pl.wikipedia.org/wiki/Dni_wolne_od_pracy_w_Polsce
25
+ - https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20240001965
23
26
  """
24
27
 
25
28
  country = "PL"
@@ -104,8 +107,13 @@ class Poland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolida
104
107
  tr("Niepokalane Poczęcie Najświętszej Marii Panny")
105
108
  )
106
109
 
110
+ if self._year >= 2025:
111
+ # Christmas Eve.
112
+ self._add_christmas_eve(tr("Wigilia Bożego Narodzenia"))
113
+
107
114
  # Christmas Day.
108
115
  self._add_christmas_day(tr("Boże Narodzenie (pierwszy dzień)"))
116
+
109
117
  # Second Day of Christmas.
110
118
  self._add_christmas_day_two(tr("Boże Narodzenie (drugi dzień)"))
111
119
 
@@ -26,7 +26,7 @@ class Russia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
26
26
 
27
27
  country = "RU"
28
28
  default_language = "ru"
29
- supported_languages = ("en_US", "ru")
29
+ supported_languages = ("en_US", "ru", "th")
30
30
  start_year = 1991
31
31
 
32
32
  def __init__(self, *args, **kwargs):
@@ -399,10 +399,8 @@ class SouthKoreaStaticHolidays:
399
399
  # Joint Memorial Service for Fallen Soldiers.
400
400
  (JUN, 21, tr("전몰군인 합동위령제")),
401
401
  ),
402
- 1951: (
403
- # Vice Presidential Election.
404
- (MAY, 16, tr("부통령 선거일")),
405
- ),
402
+ # Vice Presidential Election.
403
+ 1951: (MAY, 16, tr("부통령 선거일")),
406
404
  1952: (
407
405
  # City/Town/Township-level Local Elections.
408
406
  (APR, 25, local_election_day),
@@ -411,10 +409,8 @@ class SouthKoreaStaticHolidays:
411
409
  # 2nd Presidential Election/3rd Vice President Election.
412
410
  (AUG, 5, presidential_election_day),
413
411
  ),
414
- 1954: (
415
- # 3rd National Assembly Election.
416
- (MAY, 20, national_assembly_election_day),
417
- ),
412
+ # 3rd National Assembly Election.
413
+ 1954: (MAY, 20, national_assembly_election_day),
418
414
  1956: (
419
415
  # 3rd Presidential Election/4th Vice President Election.
420
416
  (MAY, 15, presidential_election_day),