holidays 0.79__py3-none-any.whl → 0.80__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.
- holidays/calendars/hindu.py +1 -0
- holidays/constants.py +0 -1
- holidays/countries/__init__.py +7 -0
- holidays/countries/argentina.py +4 -0
- holidays/countries/australia.py +191 -295
- holidays/countries/bosnia_and_herzegovina.py +5 -1
- holidays/countries/burkina_faso.py +5 -0
- holidays/countries/burundi.py +95 -40
- holidays/countries/cameroon.py +5 -0
- holidays/countries/canada.py +7 -0
- holidays/countries/chad.py +5 -0
- holidays/countries/christmas_island.py +6 -0
- holidays/countries/comoros.py +121 -0
- holidays/countries/eritrea.py +104 -0
- holidays/countries/gabon.py +2 -0
- holidays/countries/georgia.py +9 -7
- holidays/countries/guinea_bissau.py +0 -4
- holidays/countries/kyrgyzstan.py +2 -0
- holidays/countries/macau.py +65 -63
- holidays/countries/maldives.py +2 -0
- holidays/countries/mauritania.py +2 -0
- holidays/countries/nigeria.py +198 -27
- holidays/countries/rwanda.py +162 -0
- holidays/countries/sierra_leone.py +1 -1
- holidays/countries/singapore.py +4 -0
- holidays/countries/somalia.py +79 -0
- holidays/countries/south_sudan.py +133 -0
- holidays/countries/spain.py +4 -0
- holidays/countries/tajikistan.py +116 -0
- holidays/countries/tanzania.py +291 -147
- holidays/countries/turkmenistan.py +6 -0
- holidays/countries/uganda.py +101 -0
- holidays/financial/__init__.py +5 -0
- holidays/financial/national_stock_exchange_of_india.py +169 -0
- holidays/groups/eastern.py +1 -1
- holidays/locale/bs/LC_MESSAGES/BA.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_NG/LC_MESSAGES/NG.mo +0 -0
- holidays/locale/en_SG/LC_MESSAGES/SG.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BA.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/BI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NG.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/RW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SG.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TJ.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TZ.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/RW.mo +0 -0
- holidays/locale/fr_BI/LC_MESSAGES/BI.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/XNSE.mo +0 -0
- holidays/locale/ka/LC_MESSAGES/GE.mo +0 -0
- holidays/locale/pt_GW/LC_MESSAGES/GW.mo +0 -0
- holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/ru/LC_MESSAGES/TJ.mo +0 -0
- holidays/locale/rw/LC_MESSAGES/RW.mo +0 -0
- holidays/locale/sr/LC_MESSAGES/BA.mo +0 -0
- holidays/locale/sw/LC_MESSAGES/TZ.mo +0 -0
- holidays/locale/tg/LC_MESSAGES/TJ.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/SG.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/BA.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/GE.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/registry.py +33 -14
- holidays/version.py +1 -1
- {holidays-0.79.dist-info → holidays-0.80.dist-info}/METADATA +62 -7
- {holidays-0.79.dist-info → holidays-0.80.dist-info}/RECORD +82 -61
- {holidays-0.79.dist-info → holidays-0.80.dist-info}/WHEEL +0 -0
- {holidays-0.79.dist-info → holidays-0.80.dist-info}/licenses/CONTRIBUTORS +0 -0
- {holidays-0.79.dist-info → holidays-0.80.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.79.dist-info → holidays-0.80.dist-info}/top_level.txt +0 -0
holidays/countries/macau.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
15
|
from holidays.calendars.gregorian import FEB, SEP, OCT, DEC
|
|
16
|
-
from holidays.constants import GOVERNMENT,
|
|
16
|
+
from holidays.constants import GOVERNMENT, OPTIONAL, PUBLIC
|
|
17
17
|
from holidays.groups import (
|
|
18
18
|
ChineseCalendarHolidays,
|
|
19
19
|
ChristianHolidays,
|
|
@@ -77,7 +77,7 @@ class Macau(
|
|
|
77
77
|
"澳門市": "M",
|
|
78
78
|
"澳门市": "M",
|
|
79
79
|
}
|
|
80
|
-
supported_categories = (GOVERNMENT,
|
|
80
|
+
supported_categories = (GOVERNMENT, OPTIONAL, PUBLIC)
|
|
81
81
|
supported_languages = ("en_MO", "en_US", "pt_MO", "th", "zh_CN", "zh_MO")
|
|
82
82
|
|
|
83
83
|
def __init__(self, *args, **kwargs):
|
|
@@ -91,6 +91,63 @@ class Macau(
|
|
|
91
91
|
super().__init__(*args, **kwargs)
|
|
92
92
|
|
|
93
93
|
def _populate_public_holidays(self):
|
|
94
|
+
"""Macau Mandatory (Statutory) Holidays.
|
|
95
|
+
|
|
96
|
+
Decreto-Lei n.º 101/84/M - Earliest Available Version Online.
|
|
97
|
+
Decreto-Lei n.º 24/89/M - Added Ching Ming Festival.
|
|
98
|
+
Lei n.º 8/2000 - Removed Day of Portugal
|
|
99
|
+
- Added Macao S.A.R. Establishment Day.
|
|
100
|
+
- Moved Mid-Autumn to Day following Mid-Autumn to match Public Holidays.
|
|
101
|
+
Lei n.º 7/2008 - Consolidated with other laws, reaffirming 2000 Amendment list.
|
|
102
|
+
"""
|
|
103
|
+
if self._year <= 1984:
|
|
104
|
+
return None
|
|
105
|
+
|
|
106
|
+
# New Year's Day.
|
|
107
|
+
self._add_new_years_day(tr("元旦"))
|
|
108
|
+
|
|
109
|
+
# Chinese New Year's Day.
|
|
110
|
+
self._add_chinese_new_years_day(tr("農曆正月初一"))
|
|
111
|
+
|
|
112
|
+
# The second day of Chinese New Year.
|
|
113
|
+
self._add_chinese_new_years_day_two(tr("農曆正月初二"))
|
|
114
|
+
|
|
115
|
+
# The third day of Chinese New Year.
|
|
116
|
+
self._add_chinese_new_years_day_three(tr("農曆正月初三"))
|
|
117
|
+
|
|
118
|
+
# Labor Day.
|
|
119
|
+
self._add_labor_day(tr("勞動節"))
|
|
120
|
+
|
|
121
|
+
# Double Ninth Festival.
|
|
122
|
+
self._add_double_ninth_festival(tr("重陽節"))
|
|
123
|
+
|
|
124
|
+
# National Day of the People's Republic of China.
|
|
125
|
+
self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
|
|
126
|
+
|
|
127
|
+
# Decreto-Lei n.º 24/89/M - Adds Ching Ming as a Mandatory Holiday.
|
|
128
|
+
if self._year >= 1989:
|
|
129
|
+
# Tomb-Sweeping Day.
|
|
130
|
+
self._add_qingming_festival(tr("清明節"))
|
|
131
|
+
|
|
132
|
+
# Lei n.º 8/2000 - Removed Day of Portugal as a Mandatory Holiday.
|
|
133
|
+
# - Changed observance from Mid-Autumn to the following day.
|
|
134
|
+
# - Adds Macao S.A.R. Establishment Day as a Mandatory Holiday.
|
|
135
|
+
if self._year <= 1999:
|
|
136
|
+
# Day of Portugal, Camões, and the Portuguese Communities.
|
|
137
|
+
self._add_holiday_jun_10(tr("葡國日、賈梅士日暨葡僑日"))
|
|
138
|
+
|
|
139
|
+
# Mid-Autumn Festival.
|
|
140
|
+
self._add_mid_autumn_festival(tr("中秋節"))
|
|
141
|
+
|
|
142
|
+
else:
|
|
143
|
+
# The Day following Mid-Autumn Festival.
|
|
144
|
+
self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
|
|
145
|
+
|
|
146
|
+
# Macao S.A.R. Establishment Day.
|
|
147
|
+
self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
|
|
148
|
+
|
|
149
|
+
def _populate_optional_holidays(self):
|
|
150
|
+
"""Macau General Holidays."""
|
|
94
151
|
# New Year's Day.
|
|
95
152
|
self._add_new_years_day(tr("元旦"))
|
|
96
153
|
|
|
@@ -223,61 +280,6 @@ class Macau(
|
|
|
223
280
|
# Macao S.A.R. Establishment Day.
|
|
224
281
|
self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
|
|
225
282
|
|
|
226
|
-
def _populate_mandatory_holidays(self):
|
|
227
|
-
"""
|
|
228
|
-
Decreto-Lei n.º 101/84/M - Earliest Available Version Online.
|
|
229
|
-
Decreto-Lei n.º 24/89/M - Added Ching Ming Festival.
|
|
230
|
-
Lei n.º 8/2000 - Removed Day of Portugal
|
|
231
|
-
- Added Macao S.A.R. Establishment Day.
|
|
232
|
-
- Moved Mid-Autumn to Day following Mid-Autumn to match Public Holidays.
|
|
233
|
-
Lei n.º 7/2008 - Consolidated with other laws, reaffirming 2000 Amendment list.
|
|
234
|
-
"""
|
|
235
|
-
if self._year <= 1984:
|
|
236
|
-
return None
|
|
237
|
-
|
|
238
|
-
# New Year's Day.
|
|
239
|
-
self._add_new_years_day(tr("元旦"))
|
|
240
|
-
|
|
241
|
-
# Chinese New Year's Day.
|
|
242
|
-
self._add_chinese_new_years_day(tr("農曆正月初一"))
|
|
243
|
-
|
|
244
|
-
# The second day of Chinese New Year.
|
|
245
|
-
self._add_chinese_new_years_day_two(tr("農曆正月初二"))
|
|
246
|
-
|
|
247
|
-
# The third day of Chinese New Year.
|
|
248
|
-
self._add_chinese_new_years_day_three(tr("農曆正月初三"))
|
|
249
|
-
|
|
250
|
-
# Labor Day.
|
|
251
|
-
self._add_labor_day(tr("勞動節"))
|
|
252
|
-
|
|
253
|
-
# Double Ninth Festival.
|
|
254
|
-
self._add_double_ninth_festival(tr("重陽節"))
|
|
255
|
-
|
|
256
|
-
# National Day of the People's Republic of China.
|
|
257
|
-
self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
|
|
258
|
-
|
|
259
|
-
# Decreto-Lei n.º 24/89/M - Adds Ching Ming as a Mandatory Holiday.
|
|
260
|
-
if self._year >= 1989:
|
|
261
|
-
# Tomb-Sweeping Day.
|
|
262
|
-
self._add_qingming_festival(tr("清明節"))
|
|
263
|
-
|
|
264
|
-
# Lei n.º 8/2000 - Removed Day of Portugal as a Mandatory Holiday.
|
|
265
|
-
# - Changed observance from Mid-Autumn to the following day.
|
|
266
|
-
# - Adds Macao S.A.R. Establishment Day as a Mandatory Holiday.
|
|
267
|
-
if self._year <= 1999:
|
|
268
|
-
# Day of Portugal, Camões, and the Portuguese Communities.
|
|
269
|
-
self._add_holiday_jun_10(tr("葡國日、賈梅士日暨葡僑日"))
|
|
270
|
-
|
|
271
|
-
# Mid-Autumn Festival.
|
|
272
|
-
self._add_mid_autumn_festival(tr("中秋節"))
|
|
273
|
-
|
|
274
|
-
else:
|
|
275
|
-
# The Day following Mid-Autumn Festival.
|
|
276
|
-
self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
|
|
277
|
-
|
|
278
|
-
# Macao S.A.R. Establishment Day.
|
|
279
|
-
self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
|
|
280
|
-
|
|
281
283
|
def _populate_government_holidays(self):
|
|
282
284
|
# While Cross-Checking References are available for from 2005-2025,
|
|
283
285
|
# SUN in-lieus starts in 2011; SAT-SUN in-lieus starts in 2012.
|
|
@@ -378,7 +380,7 @@ class Macau(
|
|
|
378
380
|
)
|
|
379
381
|
self._populate_observed(dts_observed, multiple=True)
|
|
380
382
|
|
|
381
|
-
def
|
|
383
|
+
def _populate_subdiv_i_optional_holidays(self):
|
|
382
384
|
# Decreto-Lei n.º 15/93/M - Moved Day of the Municipality of Ilhas from JUL 13 to NOV 30.
|
|
383
385
|
# Regulamento Administrativo n.º 4/1999 - Removed as a Public Holiday.
|
|
384
386
|
if self._year <= 1999:
|
|
@@ -389,7 +391,7 @@ class Macau(
|
|
|
389
391
|
else:
|
|
390
392
|
self._add_holiday_jul_13(name)
|
|
391
393
|
|
|
392
|
-
def
|
|
394
|
+
def _populate_subdiv_m_optional_holidays(self):
|
|
393
395
|
# Regulamento Administrativo n.º 4/1999 - Removed Macau City Day as a Public Holiday.
|
|
394
396
|
if self._year <= 1999:
|
|
395
397
|
# Macau City Day.
|
|
@@ -407,10 +409,10 @@ class MAC(Macau):
|
|
|
407
409
|
class MacauStaticHolidays:
|
|
408
410
|
"""Macau special holidays.
|
|
409
411
|
|
|
410
|
-
Special
|
|
412
|
+
Special General and Government Holidays:
|
|
411
413
|
* <https://web.archive.org/web/20240421052702/https://www.io.gov.mo/pt/legis/rec/111020>
|
|
412
414
|
|
|
413
|
-
Special Mandatory Holidays:
|
|
415
|
+
Special Mandatory (Statutory) Holidays:
|
|
414
416
|
* <https://web.archive.org/web/20250421090753/https://www.dsal.gov.mo/pt/standard/holiday_table.html>
|
|
415
417
|
|
|
416
418
|
Cross-Checking:
|
|
@@ -457,10 +459,10 @@ class MacauStaticHolidays:
|
|
|
457
459
|
2014: (OCT, 3, name_double_ninth_festival_national_day_2_overlap),
|
|
458
460
|
2020: (OCT, 5, name_mid_autumn_festival_day_2_national_day_2_overlap),
|
|
459
461
|
}
|
|
460
|
-
|
|
462
|
+
special_public_holidays = {
|
|
461
463
|
2015: (SEP, 3, name_70th_war_of_resistance),
|
|
462
464
|
}
|
|
463
|
-
|
|
465
|
+
special_optional_holidays = {
|
|
464
466
|
1998: (
|
|
465
467
|
(DEC, 23, name_fullday),
|
|
466
468
|
(DEC, 31, name_halfday),
|
holidays/countries/maldives.py
CHANGED
holidays/countries/mauritania.py
CHANGED
|
@@ -24,6 +24,8 @@ class Mauritania(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
country = "MR"
|
|
27
|
+
# %s (estimated).
|
|
28
|
+
estimated_label = "%s (estimated)"
|
|
27
29
|
weekend = {FRI, SAT}
|
|
28
30
|
|
|
29
31
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
holidays/countries/nigeria.py
CHANGED
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from
|
|
13
|
+
from gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars import _CustomIslamicHolidays
|
|
16
|
+
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
|
|
14
17
|
from holidays.groups import (
|
|
15
18
|
ChristianHolidays,
|
|
16
19
|
InternationalHolidays,
|
|
@@ -27,11 +30,33 @@ class Nigeria(
|
|
|
27
30
|
|
|
28
31
|
References:
|
|
29
32
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_Nigeria>
|
|
33
|
+
* [Public Holidays Decree 1979](https://web.archive.org/web/20240616072641/https://archive.gazettes.africa/archive/ng/1979/ng-government-gazette-supplement-dated-1979-02-01-no-5.pdf)
|
|
34
|
+
* [Public Holidays (Amendment) Decree 1984](https://web.archive.org/web/20240615185836/https://archive.gazettes.africa/archive/ng/1984/ng-government-gazette-supplement-dated-1984-08-30-no-52-part-a.pdf)
|
|
35
|
+
* [Public Holidays Act (2004 Consolidated Version)](https://web.archive.org/web/20250822094939/https://placng.org/lawsofnigeria/view2.php?sn=467)
|
|
36
|
+
* <https://web.archive.org/web/20250829024504/https://fmino.gov.ng/may-29th-in-nigerias-history/>
|
|
37
|
+
* <https://web.archive.org/web/20250829084254/https://www.iita.org/wp-content/uploads/2017/01/The-Bulletin-23-27-May-2011-No.-2070.pdf>
|
|
38
|
+
* <https://web.archive.org/web/20170618031224/http://pulse.ng/local/inauguration-day-fg-declares-may-29-public-holiday-id3795830.html>
|
|
39
|
+
* <https://web.archive.org/web/20250829081956/https://dailypost.ng/2019/05/27/fg-declares-may-29-public-holiday/>
|
|
40
|
+
* <https://web.archive.org/web/20230620060859/https://interior.gov.ng/fg-declares-monday-may-29th-2023-work-free-day-for-presidential-inauguration/>
|
|
41
|
+
* <https://web.archive.org/web/20250829060151/https://statehouse.gov.ng/news/president-buhari-declares-june-12-the-new-democracy-day/>
|
|
42
|
+
* <https://web.archive.org/web/20250829085227/https://www.nairaland.com/4548139/may-29-remains-inauguration-day>
|
|
43
|
+
* <https://web.archive.org/web/20250829030023/https://www.timeanddate.com/holidays/nigeria/2025?hol=9>
|
|
44
|
+
|
|
45
|
+
In-lieu holidays have been in effect since at least 2010:
|
|
46
|
+
* <http://archive.today/2025.08.30-142719/https://www.vanguardngr.com/2010/05/fg-declares-may-31-public-holiday-for-democracy/>
|
|
30
47
|
"""
|
|
31
48
|
|
|
32
49
|
country = "NG"
|
|
33
|
-
|
|
50
|
+
default_language = "en_NG"
|
|
51
|
+
# %s (estimated).
|
|
52
|
+
estimated_label = tr("%s (estimated)")
|
|
53
|
+
# %s (observed, estimated).
|
|
54
|
+
observed_estimated_label = tr("%s (observed, estimated)")
|
|
55
|
+
# %s (observed).
|
|
56
|
+
observed_label = tr("%s (observed)")
|
|
57
|
+
# Public Holidays Decree 1979, in effect from January 1st, 1979.
|
|
34
58
|
start_year = 1979
|
|
59
|
+
supported_languages = ("en_NG", "en_US")
|
|
35
60
|
|
|
36
61
|
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
37
62
|
"""
|
|
@@ -42,53 +67,69 @@ class Nigeria(
|
|
|
42
67
|
"""
|
|
43
68
|
ChristianHolidays.__init__(self)
|
|
44
69
|
InternationalHolidays.__init__(self)
|
|
45
|
-
IslamicHolidays.__init__(
|
|
70
|
+
IslamicHolidays.__init__(
|
|
71
|
+
self, cls=NigeriaIslamicHolidays, show_estimated=islamic_show_estimated
|
|
72
|
+
)
|
|
46
73
|
StaticHolidays.__init__(self, NigeriaStaticHolidays)
|
|
47
74
|
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
|
|
48
|
-
kwargs.setdefault("observed_since",
|
|
75
|
+
kwargs.setdefault("observed_since", 2010)
|
|
49
76
|
super().__init__(*args, **kwargs)
|
|
50
77
|
|
|
51
78
|
def _populate_public_holidays(self):
|
|
52
79
|
dts_observed = set()
|
|
53
80
|
|
|
54
81
|
# New Year's Day.
|
|
55
|
-
dts_observed.add(self._add_new_years_day("New Year's Day"))
|
|
82
|
+
dts_observed.add(self._add_new_years_day(tr("New Year's Day")))
|
|
83
|
+
|
|
84
|
+
# Good Friday.
|
|
85
|
+
self._add_good_friday(tr("Good Friday"))
|
|
56
86
|
|
|
57
|
-
|
|
58
|
-
self._add_easter_monday("Easter Monday")
|
|
87
|
+
# Easter Monday.
|
|
88
|
+
self._add_easter_monday(tr("Easter Monday"))
|
|
59
89
|
|
|
60
|
-
#
|
|
61
|
-
if self._year >=
|
|
62
|
-
|
|
90
|
+
# Added via Public Holidays (Amendment) Decree 1984 on August 28th, 1984.
|
|
91
|
+
if self._year >= 1985:
|
|
92
|
+
# Workers' Day.
|
|
93
|
+
dts_observed.add(self._add_labor_day(tr("Workers' Day")))
|
|
63
94
|
|
|
64
|
-
#
|
|
95
|
+
# Added via Public Holidays (Amendment) Decree 2000.
|
|
96
|
+
# Changed to June 12th for 2019 onwards on July 6th, 2018.
|
|
65
97
|
if self._year >= 2000:
|
|
66
|
-
|
|
98
|
+
# Democracy Day.
|
|
99
|
+
name = tr("Democracy Day")
|
|
67
100
|
dts_observed.add(
|
|
68
101
|
self._add_holiday_jun_12(name)
|
|
69
102
|
if self._year >= 2019
|
|
70
103
|
else self._add_holiday_may_29(name)
|
|
71
104
|
)
|
|
72
105
|
|
|
73
|
-
|
|
74
|
-
|
|
106
|
+
if self._year >= 1999 and self._year % 4 == 3:
|
|
107
|
+
# Presidential Inauguration Day.
|
|
108
|
+
self._add_holiday_may_29(tr("Presidential Inauguration Day"))
|
|
109
|
+
|
|
110
|
+
# National Day.
|
|
111
|
+
dts_observed.add(self._add_holiday_oct_1(tr("National Day")))
|
|
112
|
+
|
|
113
|
+
# Christmas Day.
|
|
114
|
+
dts_observed.add(self._add_christmas_day(tr("Christmas Day")))
|
|
75
115
|
|
|
76
|
-
#
|
|
77
|
-
dts_observed.add(self.
|
|
116
|
+
# Boxing Day.
|
|
117
|
+
dts_observed.add(self._add_christmas_day_two(tr("Boxing Day")))
|
|
78
118
|
|
|
79
|
-
#
|
|
80
|
-
dts_observed.
|
|
119
|
+
# Prophet's Birthday.
|
|
120
|
+
dts_observed.update(self._add_mawlid_day(tr("Id el Maulud")))
|
|
81
121
|
|
|
82
122
|
# Eid al-Fitr.
|
|
83
|
-
dts_observed.update(self._add_eid_al_fitr_day("
|
|
84
|
-
|
|
123
|
+
dts_observed.update(self._add_eid_al_fitr_day(tr("Id el Fitr")))
|
|
124
|
+
|
|
125
|
+
# Eid al-Fitr Holiday.
|
|
126
|
+
dts_observed.update(self._add_eid_al_fitr_day_two(tr("Id el Fitr Holiday")))
|
|
85
127
|
|
|
86
128
|
# Eid al-Adha.
|
|
87
|
-
dts_observed.update(self._add_eid_al_adha_day("
|
|
88
|
-
dts_observed.update(self._add_eid_al_adha_day_two("Eid-el-Kabir Holiday"))
|
|
129
|
+
dts_observed.update(self._add_eid_al_adha_day(tr("Id el Kabir")))
|
|
89
130
|
|
|
90
|
-
#
|
|
91
|
-
dts_observed.update(self.
|
|
131
|
+
# Eid al-Adha Holiday.
|
|
132
|
+
dts_observed.update(self._add_eid_al_adha_day_two(tr("Id el Kabir Holiday")))
|
|
92
133
|
|
|
93
134
|
if self.observed:
|
|
94
135
|
self._populate_observed(dts_observed)
|
|
@@ -102,10 +143,140 @@ class NGA(Nigeria):
|
|
|
102
143
|
pass
|
|
103
144
|
|
|
104
145
|
|
|
146
|
+
class NigeriaIslamicHolidays(_CustomIslamicHolidays):
|
|
147
|
+
# https://web.archive.org/web/20250829051803/https://www.timeanddate.com/holidays/nigeria/id-el-kabir
|
|
148
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (1979, 2025)
|
|
149
|
+
EID_AL_ADHA_DATES = {
|
|
150
|
+
1979: (NOV, 1),
|
|
151
|
+
1980: (OCT, 20),
|
|
152
|
+
1981: (OCT, 9),
|
|
153
|
+
1982: (SEP, 29),
|
|
154
|
+
1983: (SEP, 18),
|
|
155
|
+
1984: (SEP, 6),
|
|
156
|
+
1985: (AUG, 27),
|
|
157
|
+
1986: (AUG, 16),
|
|
158
|
+
1987: (AUG, 6),
|
|
159
|
+
1988: (JUL, 25),
|
|
160
|
+
1989: (JUL, 14),
|
|
161
|
+
1990: (JUL, 4),
|
|
162
|
+
1991: (JUN, 23),
|
|
163
|
+
1993: (JUN, 1),
|
|
164
|
+
1994: (MAY, 21),
|
|
165
|
+
1995: (MAY, 10),
|
|
166
|
+
1996: (APR, 29),
|
|
167
|
+
1997: (APR, 18),
|
|
168
|
+
1998: (APR, 8),
|
|
169
|
+
1999: (MAR, 28),
|
|
170
|
+
2001: (MAR, 6),
|
|
171
|
+
2002: (FEB, 23),
|
|
172
|
+
2003: (FEB, 12),
|
|
173
|
+
2004: (FEB, 2),
|
|
174
|
+
2007: (DEC, 19),
|
|
175
|
+
2008: (DEC, 9),
|
|
176
|
+
2009: (NOV, 28),
|
|
177
|
+
2010: (NOV, 17),
|
|
178
|
+
2011: (NOV, 7),
|
|
179
|
+
2014: (OCT, 6),
|
|
180
|
+
2015: (SEP, 24),
|
|
181
|
+
2016: (SEP, 12),
|
|
182
|
+
2017: (SEP, 2),
|
|
183
|
+
2018: (AUG, 22),
|
|
184
|
+
2019: (AUG, 12),
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
# https://web.archive.org/web/20250829052410/https://www.timeanddate.com/holidays/nigeria/id-el-fitr
|
|
188
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (1979, 2025)
|
|
189
|
+
EID_AL_FITR_DATES = {
|
|
190
|
+
1979: (AUG, 25),
|
|
191
|
+
1980: (AUG, 13),
|
|
192
|
+
1981: (AUG, 2),
|
|
193
|
+
1982: (JUL, 23),
|
|
194
|
+
1983: (JUL, 12),
|
|
195
|
+
1985: (JUN, 20),
|
|
196
|
+
1986: (JUN, 9),
|
|
197
|
+
1987: (MAY, 30),
|
|
198
|
+
1988: (MAY, 18),
|
|
199
|
+
1989: (MAY, 7),
|
|
200
|
+
1990: (APR, 27),
|
|
201
|
+
1991: (APR, 16),
|
|
202
|
+
1993: (MAR, 25),
|
|
203
|
+
1994: (MAR, 14),
|
|
204
|
+
1995: (MAR, 3),
|
|
205
|
+
1996: (FEB, 21),
|
|
206
|
+
1997: (FEB, 9),
|
|
207
|
+
1998: (JAN, 30),
|
|
208
|
+
1999: (JAN, 19),
|
|
209
|
+
2000: ((JAN, 8), (DEC, 28)),
|
|
210
|
+
2001: (DEC, 17),
|
|
211
|
+
2002: (DEC, 6),
|
|
212
|
+
2003: (NOV, 26),
|
|
213
|
+
2005: (NOV, 4),
|
|
214
|
+
2006: (OCT, 24),
|
|
215
|
+
2007: (OCT, 12),
|
|
216
|
+
2008: (SEP, 29),
|
|
217
|
+
2009: (SEP, 21),
|
|
218
|
+
2010: (SEP, 9),
|
|
219
|
+
2012: (AUG, 20),
|
|
220
|
+
2017: (JUN, 26),
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
# https://web.archive.org/web/20250829053435/https://www.timeanddate.com/holidays/nigeria/id-el-maulud
|
|
224
|
+
# https://web.archive.org/web/20250829054319/https://pmnewsnigeria.com/2012/02/03/fg-declares-6-feb-public-holiday/
|
|
225
|
+
MAWLID_DATES_CONFIRMED_YEARS = (1979, 2025)
|
|
226
|
+
MAWLID_DATES = {
|
|
227
|
+
1979: (FEB, 10),
|
|
228
|
+
1982: ((JAN, 8), (DEC, 28)),
|
|
229
|
+
1983: (DEC, 17),
|
|
230
|
+
1984: (DEC, 6),
|
|
231
|
+
1985: (NOV, 25),
|
|
232
|
+
1986: (NOV, 15),
|
|
233
|
+
1987: (NOV, 4),
|
|
234
|
+
1988: (OCT, 23),
|
|
235
|
+
1989: (OCT, 13),
|
|
236
|
+
1990: (OCT, 2),
|
|
237
|
+
1991: (SEP, 21),
|
|
238
|
+
1992: (SEP, 10),
|
|
239
|
+
1993: (AUG, 30),
|
|
240
|
+
1995: (AUG, 9),
|
|
241
|
+
1996: (JUL, 28),
|
|
242
|
+
1997: (JUL, 18),
|
|
243
|
+
1998: (JUL, 7),
|
|
244
|
+
2000: (JUN, 15),
|
|
245
|
+
2003: (MAY, 14),
|
|
246
|
+
2004: (MAY, 2),
|
|
247
|
+
2006: (APR, 11),
|
|
248
|
+
2011: (FEB, 16),
|
|
249
|
+
2012: (FEB, 6),
|
|
250
|
+
2015: ((JAN, 2), (DEC, 24)),
|
|
251
|
+
2016: (DEC, 12),
|
|
252
|
+
2017: (DEC, 1),
|
|
253
|
+
2021: (OCT, 19),
|
|
254
|
+
2024: (SEP, 16),
|
|
255
|
+
2025: (SEP, 5),
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
105
259
|
class NigeriaStaticHolidays:
|
|
260
|
+
"""Nigeria special holidays.
|
|
261
|
+
|
|
262
|
+
References:
|
|
263
|
+
* <https://web.archive.org/web/20250829090324/https://www.pambazuka.org/governance/nigeria-holiday-blow-presidential-hopeful>
|
|
264
|
+
* <https://web.archive.org/web/20250829084913/https://www.nbcnews.com/id/wbna36974655>
|
|
265
|
+
* <https://web.archive.org/web/20250829081641/https://businessday.ng/uncategorized/article/2019-elections-fg-declares-friday-public-holiday-excludes-banksothers/>
|
|
266
|
+
* <https://web.archive.org/web/20250829024209/https://statehouse.gov.ng/news/new-date-for-special-federal-executive-council-session-in-honour-of-president-muhammadu-buhari-to-be-announced/>
|
|
267
|
+
"""
|
|
268
|
+
|
|
269
|
+
# Public Holiday for Elections.
|
|
270
|
+
name_elections = tr("Public Holiday for Elections")
|
|
271
|
+
|
|
106
272
|
special_public_holidays = {
|
|
107
|
-
|
|
108
|
-
(
|
|
109
|
-
(
|
|
273
|
+
2007: (
|
|
274
|
+
(APR, 12, name_elections),
|
|
275
|
+
(APR, 13, name_elections),
|
|
110
276
|
),
|
|
277
|
+
# Day of Mourning for President Umaru Yar'Adua.
|
|
278
|
+
2010: (MAY, 6, tr("Day of Mourning for President Umaru Yar'Adua")),
|
|
279
|
+
2019: (FEB, 22, name_elections),
|
|
280
|
+
# Day of Mourning for President Muhammadu Buhari.
|
|
281
|
+
2025: (JUL, 15, tr("Day of Mourning for President Muhammadu Buhari")),
|
|
111
282
|
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# holidays
|
|
2
|
+
# --------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from datetime import date
|
|
14
|
+
from gettext import gettext as tr
|
|
15
|
+
|
|
16
|
+
from holidays.calendars import _CustomIslamicHolidays
|
|
17
|
+
from holidays.calendars.gregorian import MAR, JUN, JUL, AUG
|
|
18
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
19
|
+
from holidays.observed_holiday_base import (
|
|
20
|
+
ObservedHolidayBase,
|
|
21
|
+
SAT_TO_NEXT_WORKDAY,
|
|
22
|
+
SAT_SUN_TO_NEXT_WORKDAY,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Rwanda(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
27
|
+
"""Rwanda holidays.
|
|
28
|
+
|
|
29
|
+
References:
|
|
30
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Rwanda>
|
|
31
|
+
* [Presidential Order N° 06/01 of 16/02/2011](https://web.archive.org/web/20250601161219/https://archive.gazettes.africa/archive/rw/2011/rw-government-gazette-dated-2011-03-07-no-10.pdf)
|
|
32
|
+
* [Presidential Order N° 42/03 of 30/06/2015](https://web.archive.org/web/20180417062635/http://www.igihe.com/IMG/pdf/iteka_rya_perezida_rigena_iminsi_y_ikiruhuko_rusange.pdf)
|
|
33
|
+
* [Presidential Order N° 54/01 of 24/02/2017](https://web.archive.org/web/20220626143357/https://www.ngoma.gov.rw/index.php?eID=dumpFile&t=f&f=44336&token=fc82c76109af7950f8895d40ddd3e15bd8c57e8c)
|
|
34
|
+
* [Presidential Order N° 62/01 of 19/10/2022](https://web.archive.org/web/20250815032533/https://mifotra.prod.risa.rw/index.php?eID=dumpFile&t=f&f=85230&token=bcf0bf166638c11f4bf3d2f8c629052db26d38b6)
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
country = "RW"
|
|
38
|
+
default_language = "rw"
|
|
39
|
+
# %s (estimated).
|
|
40
|
+
estimated_label = tr("%s (yagereranijwe)")
|
|
41
|
+
# %s (observed).
|
|
42
|
+
observed_label = tr("%s (yizihijwe)")
|
|
43
|
+
# %s (observed, estimated).
|
|
44
|
+
observed_estimated_label = tr("%s (yizihijwe, yagereranijwe)")
|
|
45
|
+
supported_languages = ("en_US", "fr", "rw")
|
|
46
|
+
# Presidential Order N° 06/01 of 16/02/2011.
|
|
47
|
+
start_year = 2012
|
|
48
|
+
|
|
49
|
+
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
50
|
+
ChristianHolidays.__init__(self)
|
|
51
|
+
InternationalHolidays.__init__(self)
|
|
52
|
+
IslamicHolidays.__init__(
|
|
53
|
+
self, cls=RwandaIslamicHolidays, show_estimated=islamic_show_estimated
|
|
54
|
+
)
|
|
55
|
+
kwargs.setdefault("observed_since", 2017)
|
|
56
|
+
super().__init__(*args, **kwargs)
|
|
57
|
+
|
|
58
|
+
def _populate_observed(self, dts: set[date], multiple: bool = False) -> None:
|
|
59
|
+
"""
|
|
60
|
+
Applies `SAT_TO_NEXT_WORKDAY` instead of `SAT_SUN_TO_NEXT_WORKDAY`
|
|
61
|
+
observed_rule for Day after New Year's Day and Boxing Day.
|
|
62
|
+
"""
|
|
63
|
+
special_cases = {
|
|
64
|
+
# Day after New Year's Day.
|
|
65
|
+
self.tr("Umunsi ukurikira Ubunani"),
|
|
66
|
+
# Boxing Day.
|
|
67
|
+
self.tr("Umunsi ukurikira Noheli"),
|
|
68
|
+
}
|
|
69
|
+
for dt in sorted(dts):
|
|
70
|
+
for name in self.get_list(dt):
|
|
71
|
+
self._add_observed(
|
|
72
|
+
dt,
|
|
73
|
+
name,
|
|
74
|
+
SAT_TO_NEXT_WORKDAY if name in special_cases else SAT_SUN_TO_NEXT_WORKDAY,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def _populate_public_holidays(self):
|
|
78
|
+
dts_observed = set()
|
|
79
|
+
|
|
80
|
+
# New Year's Day.
|
|
81
|
+
dt = self._add_new_years_day(tr("Ubunani"))
|
|
82
|
+
if self._year >= 2018:
|
|
83
|
+
dts_observed.add(dt)
|
|
84
|
+
|
|
85
|
+
# Added via Presidential Order N° 42/03 of 30/06/2015.
|
|
86
|
+
if self._year >= 2016:
|
|
87
|
+
# Day after New Year's Day.
|
|
88
|
+
dts_observed.add(self._add_new_years_day_two(tr("Umunsi ukurikira Ubunani")))
|
|
89
|
+
|
|
90
|
+
# National Heroes' Day.
|
|
91
|
+
dts_observed.add(self._add_holiday_feb_1(tr("Umunsi w'Intwari")))
|
|
92
|
+
|
|
93
|
+
# Memorial Day of Genocide perpetrated against the Tutsi in 1994.
|
|
94
|
+
self._add_holiday_apr_7(tr("Umunsi wo Kwibuka Jenoside yakorewe Abatutsi mu 1994"))
|
|
95
|
+
|
|
96
|
+
# Good Friday.
|
|
97
|
+
self._add_good_friday(tr("Umunsi wa Gatanu Mutagatifu"))
|
|
98
|
+
|
|
99
|
+
# Added via Presidential Order N° 54/01 of 24/02/2017.
|
|
100
|
+
if self._year >= 2017:
|
|
101
|
+
# Easter Monday.
|
|
102
|
+
self._add_easter_monday(tr("Ku wa mbere wa Pasika"))
|
|
103
|
+
|
|
104
|
+
# Labor Day.
|
|
105
|
+
dts_observed.add(self._add_labor_day(tr("Umunsi Mukuru w'Umurimo")))
|
|
106
|
+
|
|
107
|
+
# Independence Day.
|
|
108
|
+
dts_observed.add(self._add_holiday_jul_1(tr("Umunsi w'Ubwigenge")))
|
|
109
|
+
|
|
110
|
+
# Liberation Day.
|
|
111
|
+
dts_observed.add(self._add_holiday_jul_4(tr("Umunsi wo Kwibohora")))
|
|
112
|
+
|
|
113
|
+
# Added via Presidential Order N° 42/03 of 30/06/2015.
|
|
114
|
+
if self._year >= 2015:
|
|
115
|
+
# Umuganura Day.
|
|
116
|
+
self._add_holiday_1st_fri_of_aug(tr("Umunsi w'Umuganura"))
|
|
117
|
+
|
|
118
|
+
# Assumption Day.
|
|
119
|
+
dts_observed.add(self._add_assumption_of_mary_day(tr("Ijyanwa mu Ijuru rya Bikiramariya")))
|
|
120
|
+
|
|
121
|
+
# Christmas Day.
|
|
122
|
+
dts_observed.add(self._add_christmas_day(tr("Noheli")))
|
|
123
|
+
|
|
124
|
+
# Boxing Day.
|
|
125
|
+
dts_observed.add(self._add_christmas_day_two(tr("Umunsi ukurikira Noheli")))
|
|
126
|
+
|
|
127
|
+
# Eid al-Fitr.
|
|
128
|
+
dts_observed.update(self._add_eid_al_fitr_day(tr("Eid El Fitr")))
|
|
129
|
+
|
|
130
|
+
# Added via Presidential Order N° 42/03 of 30/06/2015.
|
|
131
|
+
if self._year >= 2015:
|
|
132
|
+
# Eid al-Adha.
|
|
133
|
+
dts_observed.update(self._add_eid_al_adha_day(tr("Eid al-Adha")))
|
|
134
|
+
|
|
135
|
+
if self.observed:
|
|
136
|
+
self._populate_observed(dts_observed)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class RW(Rwanda):
|
|
140
|
+
pass
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class RWA(Rwanda):
|
|
144
|
+
pass
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class RwandaIslamicHolidays(_CustomIslamicHolidays):
|
|
148
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2018, 2025)
|
|
149
|
+
EID_AL_ADHA_DATES = {
|
|
150
|
+
2018: (AUG, 22),
|
|
151
|
+
2019: (AUG, 12),
|
|
152
|
+
2022: (JUL, 11),
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2012, 2025)
|
|
156
|
+
EID_AL_FITR_DATES = {
|
|
157
|
+
2014: (JUL, 29),
|
|
158
|
+
2015: (JUL, 18),
|
|
159
|
+
2016: (JUL, 7),
|
|
160
|
+
2017: (JUN, 26),
|
|
161
|
+
2025: (MAR, 31),
|
|
162
|
+
}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
|
+
from holidays.calendars import _CustomIslamicHolidays
|
|
15
16
|
from holidays.calendars.gregorian import JUN, AUG, NOV
|
|
16
|
-
from holidays.calendars.islamic import _CustomIslamicHolidays
|
|
17
17
|
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
18
18
|
from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_WORKDAY
|
|
19
19
|
|
holidays/countries/singapore.py
CHANGED
|
@@ -60,7 +60,11 @@ class Singapore(
|
|
|
60
60
|
"""
|
|
61
61
|
|
|
62
62
|
country = "SG"
|
|
63
|
+
# %s (estimated).
|
|
64
|
+
estimated_label = tr("%s (estimated)")
|
|
63
65
|
default_language = "en_SG"
|
|
66
|
+
# %s (observed, estimated).
|
|
67
|
+
observed_estimated_label = tr("%s (observed, estimated)")
|
|
64
68
|
# %s (observed).
|
|
65
69
|
observed_label = tr("%s (observed)")
|
|
66
70
|
supported_languages = ("en_SG", "en_US", "th")
|