holidays 0.82__py3-none-any.whl → 0.84__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/balinese_saka.py +2 -3
- holidays/calendars/buddhist.py +3 -4
- holidays/calendars/burmese.py +9 -10
- holidays/calendars/chinese.py +8 -9
- holidays/calendars/hebrew.py +10 -11
- holidays/calendars/hindu.py +27 -28
- holidays/calendars/islamic.py +26 -6
- holidays/calendars/mandaean.py +2 -3
- holidays/calendars/mongolian.py +4 -5
- holidays/calendars/persian.py +2 -3
- holidays/calendars/sinhala.py +25 -14
- holidays/calendars/thai.py +13 -14
- holidays/calendars/tibetan.py +12 -13
- holidays/countries/__init__.py +1 -0
- holidays/countries/angola.py +1 -2
- holidays/countries/austria.py +1 -1
- holidays/countries/azerbaijan.py +1 -1
- holidays/countries/canada.py +27 -13
- holidays/countries/denmark.py +18 -6
- holidays/countries/fiji.py +2 -3
- holidays/countries/finland.py +3 -6
- holidays/countries/guernsey.py +1 -2
- holidays/countries/guyana.py +24 -32
- holidays/countries/india.py +21 -78
- holidays/countries/iran.py +133 -269
- holidays/countries/ireland.py +1 -1
- holidays/countries/israel.py +1 -1
- holidays/countries/italy.py +2 -2
- holidays/countries/jersey.py +1 -2
- holidays/countries/macau.py +5 -8
- holidays/countries/malta.py +1 -1
- holidays/countries/mauritius.py +10 -9
- holidays/countries/montserrat.py +1 -1
- holidays/countries/myanmar.py +9 -10
- holidays/countries/nepal.py +11 -30
- holidays/countries/netherlands.py +28 -24
- holidays/countries/new_zealand.py +75 -31
- holidays/countries/nigeria.py +53 -75
- holidays/countries/norway.py +1 -1
- holidays/countries/portugal.py +6 -3
- holidays/countries/rwanda.py +2 -2
- holidays/countries/sint_maarten.py +1 -1
- holidays/countries/slovakia.py +23 -4
- holidays/countries/spain.py +418 -214
- holidays/countries/sri_lanka.py +58 -91
- holidays/countries/suriname.py +1 -2
- holidays/countries/sweden.py +1 -1
- holidays/countries/switzerland.py +86 -3
- holidays/countries/taiwan.py +3 -3
- holidays/countries/tanzania.py +19 -29
- holidays/countries/thailand.py +8 -7
- holidays/countries/trinidad_and_tobago.py +1 -1
- holidays/countries/ukraine.py +1 -1
- holidays/countries/united_kingdom.py +2 -3
- holidays/countries/united_states.py +3 -4
- holidays/countries/western_sahara.py +92 -0
- holidays/groups/balinese_saka.py +2 -3
- holidays/groups/buddhist.py +6 -7
- holidays/groups/burmese.py +11 -12
- holidays/groups/chinese.py +23 -21
- holidays/groups/christian.py +30 -0
- holidays/groups/eastern.py +5 -4
- holidays/groups/hebrew.py +7 -10
- holidays/groups/hindu.py +45 -40
- holidays/groups/international.py +1 -1
- holidays/groups/islamic.py +10 -3
- holidays/groups/mandaean.py +13 -14
- holidays/groups/mongolian.py +12 -10
- holidays/groups/persian.py +14 -15
- holidays/groups/sinhala.py +19 -17
- holidays/groups/thai.py +12 -13
- holidays/groups/tibetan.py +21 -19
- holidays/holiday_base.py +54 -54
- holidays/ical.py +1 -2
- holidays/locale/ar/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/ca/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/de/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/es/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/EH.mo +0 -0
- holidays/locale/fy/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/it/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/nl/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/si_LK/LC_MESSAGES/LK.mo +0 -0
- holidays/locale/ta_LK/LC_MESSAGES/LK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/th/LC_MESSAGES/CN.mo +0 -0
- holidays/locale/th/LC_MESSAGES/DK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/KR.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/NL.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CH.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/NL.mo +0 -0
- holidays/mixins/child_entity.py +1 -3
- holidays/observed_holiday_base.py +25 -14
- holidays/registry.py +5 -3
- holidays/utils.py +13 -14
- holidays/version.py +1 -1
- {holidays-0.82.dist-info → holidays-0.84.dist-info}/METADATA +20 -19
- {holidays-0.82.dist-info → holidays-0.84.dist-info}/RECORD +113 -104
- {holidays-0.82.dist-info → holidays-0.84.dist-info}/WHEEL +0 -0
- {holidays-0.82.dist-info → holidays-0.84.dist-info}/licenses/CONTRIBUTORS +0 -0
- {holidays-0.82.dist-info → holidays-0.84.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.82.dist-info → holidays-0.84.dist-info}/top_level.txt +0 -0
holidays/countries/myanmar.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
15
|
from holidays.calendars import _CustomIslamicHolidays
|
|
16
|
-
from holidays.calendars.gregorian import JAN, MAR,
|
|
16
|
+
from holidays.calendars.gregorian import JAN, MAR, NOV, DEC
|
|
17
17
|
from holidays.groups import (
|
|
18
18
|
BurmeseCalendarHolidays,
|
|
19
19
|
ChineseCalendarHolidays,
|
|
@@ -60,13 +60,19 @@ class Myanmar(
|
|
|
60
60
|
islamic_show_estimated:
|
|
61
61
|
Whether to add "estimated" label to Islamic holidays name
|
|
62
62
|
if holiday date is estimated.
|
|
63
|
+
|
|
64
|
+
In Myanmar, the dates of the Islamic calendar usually fall a day later than
|
|
65
|
+
the corresponding dates in the Umm al-Qura calendar.
|
|
63
66
|
"""
|
|
64
67
|
BurmeseCalendarHolidays.__init__(self)
|
|
65
68
|
ChineseCalendarHolidays.__init__(self)
|
|
66
69
|
ChristianHolidays.__init__(self)
|
|
67
70
|
InternationalHolidays.__init__(self)
|
|
68
71
|
IslamicHolidays.__init__(
|
|
69
|
-
self,
|
|
72
|
+
self,
|
|
73
|
+
cls=MyanmarIslamicHolidays,
|
|
74
|
+
show_estimated=islamic_show_estimated,
|
|
75
|
+
calendar_delta_days=+1,
|
|
70
76
|
)
|
|
71
77
|
StaticHolidays.__init__(self, cls=MyanmarStaticHolidays)
|
|
72
78
|
super().__init__(*args, **kwargs)
|
|
@@ -161,14 +167,7 @@ class MMR(Myanmar):
|
|
|
161
167
|
|
|
162
168
|
|
|
163
169
|
class MyanmarIslamicHolidays(_CustomIslamicHolidays):
|
|
164
|
-
|
|
165
|
-
2020: (AUG, 1),
|
|
166
|
-
2021: (JUL, 21),
|
|
167
|
-
2022: (JUL, 10),
|
|
168
|
-
2023: (JUN, 29),
|
|
169
|
-
2024: (JUN, 17),
|
|
170
|
-
2025: (JUN, 7),
|
|
171
|
-
}
|
|
170
|
+
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2020, 2025)
|
|
172
171
|
|
|
173
172
|
|
|
174
173
|
class MyanmarStaticHolidays:
|
holidays/countries/nepal.py
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
13
|
from holidays.calendars import _CustomIslamicHolidays, _CustomHinduHolidays
|
|
14
|
-
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY,
|
|
14
|
+
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, AUG, SEP, OCT, NOV
|
|
15
15
|
from holidays.constants import PUBLIC, WORKDAY
|
|
16
16
|
from holidays.groups import (
|
|
17
17
|
ChristianHolidays,
|
|
@@ -58,17 +58,23 @@ class Nepal(
|
|
|
58
58
|
islamic_show_estimated:
|
|
59
59
|
Whether to add "estimated" label to Islamic holidays name
|
|
60
60
|
if holiday date is estimated.
|
|
61
|
+
|
|
62
|
+
In Nepal, the dates of the Islamic calendar usually fall a day later than
|
|
63
|
+
the corresponding dates in the Umm al-Qura calendar.
|
|
61
64
|
"""
|
|
62
65
|
ChristianHolidays.__init__(self)
|
|
63
66
|
HinduCalendarHolidays.__init__(self, cls=NepalHinduHolidays)
|
|
64
67
|
InternationalHolidays.__init__(self)
|
|
65
68
|
IslamicHolidays.__init__(
|
|
66
|
-
self,
|
|
69
|
+
self,
|
|
70
|
+
cls=NepalIslamicHolidays,
|
|
71
|
+
show_estimated=islamic_show_estimated,
|
|
72
|
+
calendar_delta_days=+1,
|
|
67
73
|
)
|
|
68
74
|
StaticHolidays.__init__(self, cls=NepalStaticHolidays)
|
|
69
75
|
super().__init__(*args, **kwargs)
|
|
70
76
|
|
|
71
|
-
def _add_non_continuous_holidays(self, is_workday: bool = False):
|
|
77
|
+
def _add_non_continuous_holidays(self, *, is_workday: bool = False):
|
|
72
78
|
"""Holidays removed by MoHA between 2019-2020."""
|
|
73
79
|
if (2019 <= self._year <= 2020) == is_workday:
|
|
74
80
|
martyrs_day_dates = {
|
|
@@ -367,40 +373,15 @@ class NepalHinduHolidays(_CustomHinduHolidays):
|
|
|
367
373
|
class NepalIslamicHolidays(_CustomIslamicHolidays):
|
|
368
374
|
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2010, 2025)
|
|
369
375
|
EID_AL_ADHA_DATES = {
|
|
370
|
-
2010: (NOV, 17),
|
|
371
|
-
2011: (NOV, 7),
|
|
372
|
-
2012: (OCT, 27),
|
|
373
|
-
2013: (OCT, 16),
|
|
374
376
|
2014: (OCT, 6),
|
|
375
377
|
2015: (SEP, 25),
|
|
376
378
|
2016: (SEP, 13),
|
|
377
|
-
2017: (SEP, 2),
|
|
378
|
-
2018: (AUG, 22),
|
|
379
|
-
2019: (AUG, 12),
|
|
380
|
-
2020: (AUG, 1),
|
|
381
|
-
2021: (JUL, 21),
|
|
382
|
-
2022: (JUL, 10),
|
|
383
|
-
2023: (JUN, 29),
|
|
384
|
-
2024: (JUN, 17),
|
|
385
|
-
2025: (JUN, 7),
|
|
386
379
|
}
|
|
387
380
|
|
|
388
381
|
EID_AL_FITR_DATES_CONFIRMED_YEARS = (2010, 2025)
|
|
389
382
|
EID_AL_FITR_DATES = {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
2014: (JUL, 29),
|
|
393
|
-
2015: (JUL, 18),
|
|
394
|
-
2016: (JUL, 7),
|
|
395
|
-
2017: (JUN, 26),
|
|
396
|
-
2018: (JUN, 16),
|
|
397
|
-
2019: (JUN, 5),
|
|
398
|
-
2020: (MAY, 25),
|
|
399
|
-
2021: (MAY, 14),
|
|
400
|
-
2022: (MAY, 3),
|
|
401
|
-
2023: (APR, 22),
|
|
402
|
-
2024: (APR, 11),
|
|
403
|
-
2025: (MAR, 31),
|
|
383
|
+
2010: (SEP, 10),
|
|
384
|
+
2013: (AUG, 8),
|
|
404
385
|
}
|
|
405
386
|
|
|
406
387
|
|
|
@@ -20,17 +20,25 @@ from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_PREV_SAT,
|
|
|
20
20
|
class Netherlands(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
21
21
|
"""Netherlands holidays.
|
|
22
22
|
|
|
23
|
+
Easter Sunday and Whit Sunday are always on Sunday and are therefore not mentioned separately
|
|
24
|
+
in the Algemene termijnenwet (Atw).
|
|
25
|
+
|
|
23
26
|
References:
|
|
24
27
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Netherlands>
|
|
25
28
|
* <https://nl.wikipedia.org/wiki/Feestdagen_in_Nederland>
|
|
26
|
-
* <https://
|
|
29
|
+
* <https://nl.wikipedia.org/wiki/Algemene_termijnenwet>
|
|
30
|
+
* <https://web.archive.org/web/20251015082530/https://business.gov.nl/regulation/holiday-entitlement/>
|
|
31
|
+
* <https://web.archive.org/save/https://wetten.overheid.nl/BWBR0002448/2010-10-10>
|
|
32
|
+
* <https://web.archive.org/web/20250123145153/https://repository.overheid.nl/frbr/sgd/19811982/0000151909/1/pdf/SGD_19811982_0002862.pdf>
|
|
33
|
+
* <https://web.archive.org/web/20251015082056/https://www.facebook.com/photo.php?fbid=5357926707591435&id=190259871024837&set=a.342400825810740>
|
|
27
34
|
"""
|
|
28
35
|
|
|
29
36
|
country = "NL"
|
|
30
37
|
default_language = "nl"
|
|
31
38
|
supported_categories = (OPTIONAL, PUBLIC)
|
|
32
|
-
supported_languages = ("en_US", "fy", "nl", "uk")
|
|
33
|
-
|
|
39
|
+
supported_languages = ("en_US", "fy", "nl", "th", "uk")
|
|
40
|
+
# Algemene termijnenwet (Atw) entered into force on April 1st, 1965.
|
|
41
|
+
start_year = 1966
|
|
34
42
|
|
|
35
43
|
def __init__(self, *args, **kwargs):
|
|
36
44
|
ChristianHolidays.__init__(self)
|
|
@@ -42,29 +50,28 @@ class Netherlands(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
|
|
|
42
50
|
# New Year's Day.
|
|
43
51
|
self._add_new_years_day(tr("Nieuwjaarsdag"))
|
|
44
52
|
|
|
53
|
+
# Good Friday.
|
|
54
|
+
self._add_good_friday(tr("Goede Vrijdag"))
|
|
55
|
+
|
|
45
56
|
# Easter Sunday.
|
|
46
57
|
self._add_easter_sunday(tr("Eerste paasdag"))
|
|
47
58
|
|
|
48
59
|
# Easter Monday.
|
|
49
60
|
self._add_easter_monday(tr("Tweede paasdag"))
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
dt = self._add_holiday_aug_31(name)
|
|
65
|
-
self._move_holiday(dt, rule=SUN_TO_PREV_SAT if self._year >= 1980 else SUN_TO_NEXT_MON)
|
|
66
|
-
|
|
67
|
-
if self._year >= 1950 and self._year % 5 == 0:
|
|
62
|
+
self._move_holiday(
|
|
63
|
+
# King's Day.
|
|
64
|
+
self._add_holiday_apr_27(tr("Koningsdag"))
|
|
65
|
+
if self._year >= 2014
|
|
66
|
+
# Queen's Day.
|
|
67
|
+
else self._add_holiday_apr_30(tr("Koninginnedag")),
|
|
68
|
+
rule=SUN_TO_PREV_SAT if self._year >= 1980 else SUN_TO_NEXT_MON,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Officially adopted as an annual national holiday in the Atw on January 5th, 1982.
|
|
72
|
+
# In practice, many collective labor agreements (CAOs) stipulate that May 5th is
|
|
73
|
+
# a day off only once every five years (e.g., 2030, 2035, etc.).
|
|
74
|
+
if self._year % 5 == 0:
|
|
68
75
|
# Liberation Day.
|
|
69
76
|
self._add_holiday_may_5(tr("Bevrijdingsdag"))
|
|
70
77
|
|
|
@@ -84,10 +91,7 @@ class Netherlands(ObservedHolidayBase, ChristianHolidays, InternationalHolidays)
|
|
|
84
91
|
self._add_christmas_day_two(tr("Tweede Kerstdag"))
|
|
85
92
|
|
|
86
93
|
def _populate_optional_holidays(self):
|
|
87
|
-
|
|
88
|
-
self._add_good_friday(tr("Goede Vrijdag"))
|
|
89
|
-
|
|
90
|
-
if self._year >= 1990:
|
|
94
|
+
if self._year >= 1982:
|
|
91
95
|
# Liberation Day.
|
|
92
96
|
self._add_holiday_may_5(tr("Bevrijdingsdag"))
|
|
93
97
|
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
13
|
from datetime import date
|
|
14
|
-
from typing import Optional
|
|
15
14
|
|
|
16
|
-
from holidays.calendars.gregorian import
|
|
15
|
+
from holidays.calendars.gregorian import MAR, JUN, JUL, SEP, _timedelta
|
|
17
16
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
18
17
|
from holidays.observed_holiday_base import (
|
|
19
18
|
ObservedHolidayBase,
|
|
@@ -27,6 +26,7 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
27
26
|
"""New Zealand holidays."""
|
|
28
27
|
|
|
29
28
|
country = "NZ"
|
|
29
|
+
# %s (observed).
|
|
30
30
|
observed_label = "%s (observed)"
|
|
31
31
|
start_year = 1894
|
|
32
32
|
subdivisions = (
|
|
@@ -123,9 +123,6 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
123
123
|
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
124
124
|
super().__init__(*args, **kwargs)
|
|
125
125
|
|
|
126
|
-
def _get_nearest_monday(self, *args) -> Optional[date]:
|
|
127
|
-
return self._get_observed_date(date(self._year, *args), rule=ALL_TO_NEAREST_MON)
|
|
128
|
-
|
|
129
126
|
def _populate_public_holidays(self):
|
|
130
127
|
# Bank Holidays Act 1873
|
|
131
128
|
# The Employment of Females Act 1873
|
|
@@ -138,32 +135,46 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
138
135
|
# Sovereign's Birthday Observance Act 1937, 1952
|
|
139
136
|
# Holidays Act 1981, 2003
|
|
140
137
|
|
|
141
|
-
# New Year's Day
|
|
138
|
+
# New Year's Day.
|
|
142
139
|
self._add_observed(self._add_new_years_day("New Year's Day"), rule=SAT_SUN_TO_NEXT_MON_TUE)
|
|
143
140
|
self._add_observed(
|
|
144
|
-
|
|
141
|
+
# Day after New Year's Day.
|
|
142
|
+
self._add_new_years_day_two("Day after New Year's Day"),
|
|
143
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE,
|
|
145
144
|
)
|
|
146
145
|
|
|
147
|
-
# Waitangi Day
|
|
148
146
|
if self._year >= 1974:
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
feb_6 = self._add_holiday_feb_6(
|
|
148
|
+
# Waitangi Day.
|
|
149
|
+
"Waitangi Day"
|
|
150
|
+
if self._year >= 1977
|
|
151
|
+
# New Zealand Day.
|
|
152
|
+
else "New Zealand Day"
|
|
153
|
+
)
|
|
151
154
|
if self._year >= 2014:
|
|
152
155
|
self._add_observed(feb_6)
|
|
153
156
|
|
|
154
|
-
# Anzac Day
|
|
155
157
|
if self._year >= 1921:
|
|
158
|
+
# Anzac Day.
|
|
156
159
|
apr_25 = self._add_anzac_day("Anzac Day")
|
|
157
160
|
if self._year >= 2014:
|
|
158
161
|
self._add_observed(apr_25)
|
|
159
162
|
|
|
160
|
-
#
|
|
163
|
+
# Good Friday.
|
|
161
164
|
self._add_good_friday("Good Friday")
|
|
165
|
+
|
|
166
|
+
# Easter Monday.
|
|
162
167
|
self._add_easter_monday("Easter Monday")
|
|
163
168
|
|
|
164
169
|
# Sovereign's Birthday
|
|
165
170
|
if self._year >= 1902:
|
|
166
|
-
name =
|
|
171
|
+
name = (
|
|
172
|
+
# Queen's Birthday.
|
|
173
|
+
"Queen's Birthday"
|
|
174
|
+
if 1952 <= self._year <= 2022
|
|
175
|
+
# King's Birthday.
|
|
176
|
+
else "King's Birthday"
|
|
177
|
+
)
|
|
167
178
|
if self._year == 1952:
|
|
168
179
|
self._add_holiday_jun_2(name) # Elizabeth II
|
|
169
180
|
elif self._year >= 1938:
|
|
@@ -213,20 +224,21 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
213
224
|
2052: (JUN, 21),
|
|
214
225
|
}
|
|
215
226
|
if dt := dates_obs.get(self._year):
|
|
227
|
+
# Matariki.
|
|
216
228
|
self._add_holiday("Matariki", dt)
|
|
217
229
|
|
|
218
|
-
# Labour Day
|
|
219
230
|
if self._year >= 1900:
|
|
231
|
+
# Labour Day.
|
|
220
232
|
name = "Labour Day"
|
|
221
233
|
if self._year >= 1910:
|
|
222
234
|
self._add_holiday_4th_mon_of_oct(name)
|
|
223
235
|
else:
|
|
224
236
|
self._add_holiday_2nd_wed_of_oct(name)
|
|
225
237
|
|
|
226
|
-
# Christmas Day
|
|
238
|
+
# Christmas Day.
|
|
227
239
|
self._add_observed(self._add_christmas_day("Christmas Day"), rule=SAT_SUN_TO_NEXT_MON_TUE)
|
|
228
240
|
|
|
229
|
-
# Boxing Day
|
|
241
|
+
# Boxing Day.
|
|
230
242
|
self._add_observed(self._add_christmas_day_two("Boxing Day"), rule=SAT_SUN_TO_NEXT_MON_TUE)
|
|
231
243
|
|
|
232
244
|
if self.subdiv == "New Plymouth":
|
|
@@ -237,59 +249,90 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
237
249
|
self._populate_subdiv_wtc_public_holidays()
|
|
238
250
|
|
|
239
251
|
def _populate_subdiv_auk_public_holidays(self):
|
|
240
|
-
self.
|
|
252
|
+
self._move_holiday_forced(
|
|
253
|
+
# Auckland Anniversary Day.
|
|
254
|
+
self._add_holiday_jan_29("Auckland Anniversary Day"),
|
|
255
|
+
rule=ALL_TO_NEAREST_MON,
|
|
256
|
+
)
|
|
241
257
|
|
|
242
258
|
def _populate_subdiv_can_public_holidays(self):
|
|
259
|
+
# Canterbury Anniversary Day.
|
|
243
260
|
self._add_holiday_10_days_past_1st_tue_of_nov("Canterbury Anniversary Day")
|
|
244
261
|
|
|
245
262
|
def _populate_subdiv_cit_public_holidays(self):
|
|
246
|
-
self.
|
|
263
|
+
self._move_holiday_forced(
|
|
264
|
+
# Chatham Islands Anniversary Day.
|
|
265
|
+
self._add_holiday_nov_30("Chatham Islands Anniversary Day"),
|
|
266
|
+
rule=ALL_TO_NEAREST_MON,
|
|
267
|
+
)
|
|
247
268
|
|
|
248
269
|
def _populate_subdiv_hkb_public_holidays(self):
|
|
270
|
+
# Hawke's Bay Anniversary Day.
|
|
249
271
|
self._add_holiday_3_days_prior_4th_mon_of_oct("Hawke's Bay Anniversary Day")
|
|
250
272
|
|
|
251
273
|
def _populate_subdiv_mbh_public_holidays(self):
|
|
274
|
+
# Marlborough Anniversary Day.
|
|
252
275
|
self._add_holiday_7_days_past_4th_mon_of_oct("Marlborough Anniversary Day")
|
|
253
276
|
|
|
254
277
|
def _populate_subdiv_nsn_public_holidays(self):
|
|
255
|
-
self.
|
|
278
|
+
self._move_holiday_forced(
|
|
279
|
+
# Nelson Anniversary Day.
|
|
280
|
+
self._add_holiday_feb_1("Nelson Anniversary Day"),
|
|
281
|
+
rule=ALL_TO_NEAREST_MON,
|
|
282
|
+
)
|
|
256
283
|
|
|
257
284
|
def _populate_subdiv_ntl_public_holidays(self):
|
|
258
285
|
if 1964 <= self._year <= 1973:
|
|
259
|
-
self.
|
|
286
|
+
self._move_holiday_forced(
|
|
287
|
+
# Waitangi Day.
|
|
288
|
+
self._add_holiday_feb_6("Waitangi Day"),
|
|
289
|
+
rule=ALL_TO_NEAREST_MON,
|
|
290
|
+
)
|
|
260
291
|
else:
|
|
261
|
-
self.
|
|
292
|
+
self._move_holiday_forced(
|
|
293
|
+
# Auckland Anniversary Day.
|
|
294
|
+
self._add_holiday_jan_29("Auckland Anniversary Day"),
|
|
295
|
+
rule=ALL_TO_NEAREST_MON,
|
|
296
|
+
)
|
|
262
297
|
|
|
263
298
|
def _populate_subdiv_ota_public_holidays(self):
|
|
264
299
|
# there is no easily determined single day of local observance?!?!
|
|
265
|
-
|
|
266
|
-
|
|
300
|
+
# If Easter Monday, observed on Easter Tuesday instead.
|
|
301
|
+
dt = self._get_observed_date(date(self._year, MAR, 23), rule=ALL_TO_NEAREST_MON)
|
|
302
|
+
if dt == _timedelta(self._easter_sunday, +1):
|
|
267
303
|
dt = _timedelta(dt, +1)
|
|
304
|
+
# Otago Anniversary Day.
|
|
268
305
|
self._add_holiday("Otago Anniversary Day", dt)
|
|
269
306
|
|
|
270
307
|
def _populate_subdiv_stc_public_holidays(self):
|
|
271
308
|
self._add_holiday_4th_mon_of_sep("South Canterbury Anniversary Day")
|
|
272
309
|
|
|
273
310
|
def _populate_subdiv_stl_public_holidays(self):
|
|
311
|
+
# Southland Anniversary Day.
|
|
274
312
|
name = "Southland Anniversary Day"
|
|
275
313
|
if self._year >= 2012:
|
|
276
314
|
self._add_easter_tuesday(name)
|
|
277
315
|
else:
|
|
278
|
-
self.
|
|
316
|
+
self._move_holiday_forced(self._add_holiday_jan_17(name), rule=ALL_TO_NEAREST_MON)
|
|
279
317
|
|
|
280
318
|
def _populate_subdiv_tki_public_holidays(self):
|
|
319
|
+
# Taranaki Anniversary Day.
|
|
281
320
|
self._add_holiday_2nd_mon_of_mar("Taranaki Anniversary Day")
|
|
282
321
|
|
|
283
322
|
def _populate_subdiv_wgn_public_holidays(self):
|
|
284
|
-
self.
|
|
323
|
+
self._move_holiday_forced(
|
|
324
|
+
# Wellington Anniversary Day.
|
|
325
|
+
self._add_holiday_jan_22("Wellington Anniversary Day"),
|
|
326
|
+
rule=ALL_TO_NEAREST_MON,
|
|
327
|
+
)
|
|
285
328
|
|
|
286
329
|
def _populate_subdiv_wtc_public_holidays(self):
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
330
|
+
# West Coast Anniversary Day.
|
|
331
|
+
name = "West Coast Anniversary Day"
|
|
332
|
+
if self._year == 2005:
|
|
333
|
+
self._add_holiday_dec_5(name)
|
|
334
|
+
else:
|
|
335
|
+
self._move_holiday_forced(self._add_holiday_dec_1(name), rule=ALL_TO_NEAREST_MON)
|
|
293
336
|
|
|
294
337
|
|
|
295
338
|
class NZ(NewZealand):
|
|
@@ -302,5 +345,6 @@ class NZL(NewZealand):
|
|
|
302
345
|
|
|
303
346
|
class NewZelandStaticHolidays:
|
|
304
347
|
special_public_holidays = {
|
|
348
|
+
# Queen Elizabeth II Memorial Day.
|
|
305
349
|
2022: (SEP, 26, "Queen Elizabeth II Memorial Day"),
|
|
306
350
|
}
|
holidays/countries/nigeria.py
CHANGED
|
@@ -64,11 +64,17 @@ class Nigeria(
|
|
|
64
64
|
islamic_show_estimated:
|
|
65
65
|
Whether to add "estimated" label to Islamic holidays name
|
|
66
66
|
if holiday date is estimated.
|
|
67
|
+
|
|
68
|
+
In Nigeria, the dates of the Islamic calendar usually fall a day later than
|
|
69
|
+
the corresponding dates in the Umm al-Qura calendar.
|
|
67
70
|
"""
|
|
68
71
|
ChristianHolidays.__init__(self)
|
|
69
72
|
InternationalHolidays.__init__(self)
|
|
70
73
|
IslamicHolidays.__init__(
|
|
71
|
-
self,
|
|
74
|
+
self,
|
|
75
|
+
cls=NigeriaIslamicHolidays,
|
|
76
|
+
show_estimated=islamic_show_estimated,
|
|
77
|
+
calendar_delta_days=+1,
|
|
72
78
|
)
|
|
73
79
|
StaticHolidays.__init__(self, NigeriaStaticHolidays)
|
|
74
80
|
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
|
|
@@ -147,112 +153,84 @@ class NigeriaIslamicHolidays(_CustomIslamicHolidays):
|
|
|
147
153
|
# https://web.archive.org/web/20250829051803/https://www.timeanddate.com/holidays/nigeria/id-el-kabir
|
|
148
154
|
EID_AL_ADHA_DATES_CONFIRMED_YEARS = (1979, 2025)
|
|
149
155
|
EID_AL_ADHA_DATES = {
|
|
150
|
-
1979: (NOV, 1),
|
|
151
|
-
1980: (OCT, 20),
|
|
152
|
-
1981: (OCT, 9),
|
|
153
156
|
1982: (SEP, 29),
|
|
154
|
-
1983: (SEP, 18),
|
|
155
|
-
1984: (SEP, 6),
|
|
156
|
-
1985: (AUG, 27),
|
|
157
|
-
1986: (AUG, 16),
|
|
158
157
|
1987: (AUG, 6),
|
|
159
158
|
1988: (JUL, 25),
|
|
160
|
-
1989: (JUL, 14),
|
|
161
159
|
1990: (JUL, 4),
|
|
162
|
-
|
|
163
|
-
1993: (JUN, 1),
|
|
164
|
-
1994: (MAY, 21),
|
|
165
|
-
1995: (MAY, 10),
|
|
160
|
+
1992: (JUN, 11),
|
|
166
161
|
1996: (APR, 29),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
2001: (MAR, 6),
|
|
171
|
-
2002: (FEB, 23),
|
|
172
|
-
2003: (FEB, 12),
|
|
173
|
-
2004: (FEB, 2),
|
|
162
|
+
2000: (MAR, 16),
|
|
163
|
+
2005: (JAN, 21),
|
|
164
|
+
2006: ((JAN, 10), (DEC, 31)),
|
|
174
165
|
2007: (DEC, 19),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
2010: (NOV, 17),
|
|
178
|
-
2011: (NOV, 7),
|
|
166
|
+
2012: (OCT, 26),
|
|
167
|
+
2013: (OCT, 15),
|
|
179
168
|
2014: (OCT, 6),
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
169
|
+
2020: (JUL, 31),
|
|
170
|
+
2021: (JUL, 20),
|
|
171
|
+
2022: (JUL, 9),
|
|
172
|
+
2023: (JUN, 28),
|
|
173
|
+
2024: (JUN, 16),
|
|
174
|
+
2025: (JUN, 6),
|
|
185
175
|
}
|
|
186
176
|
|
|
187
177
|
# https://web.archive.org/web/20250829052410/https://www.timeanddate.com/holidays/nigeria/id-el-fitr
|
|
188
178
|
EID_AL_FITR_DATES_CONFIRMED_YEARS = (1979, 2025)
|
|
189
179
|
EID_AL_FITR_DATES = {
|
|
190
180
|
1979: (AUG, 25),
|
|
191
|
-
1980: (AUG, 13),
|
|
192
|
-
1981: (AUG, 2),
|
|
193
181
|
1982: (JUL, 23),
|
|
194
|
-
|
|
195
|
-
1985: (JUN, 20),
|
|
196
|
-
1986: (JUN, 9),
|
|
182
|
+
1984: (JUN, 30),
|
|
197
183
|
1987: (MAY, 30),
|
|
198
184
|
1988: (MAY, 18),
|
|
199
|
-
|
|
200
|
-
1990: (APR, 27),
|
|
201
|
-
1991: (APR, 16),
|
|
202
|
-
1993: (MAR, 25),
|
|
203
|
-
1994: (MAR, 14),
|
|
204
|
-
1995: (MAR, 3),
|
|
185
|
+
1992: (APR, 4),
|
|
205
186
|
1996: (FEB, 21),
|
|
206
|
-
1997: (FEB, 9),
|
|
207
|
-
1998: (JAN, 30),
|
|
208
|
-
1999: (JAN, 19),
|
|
209
187
|
2000: ((JAN, 8), (DEC, 28)),
|
|
210
|
-
|
|
211
|
-
2002: (DEC, 6),
|
|
212
|
-
2003: (NOV, 26),
|
|
213
|
-
2005: (NOV, 4),
|
|
214
|
-
2006: (OCT, 24),
|
|
188
|
+
2004: (NOV, 14),
|
|
215
189
|
2007: (OCT, 12),
|
|
216
190
|
2008: (SEP, 29),
|
|
217
|
-
2009: (SEP, 21),
|
|
218
191
|
2010: (SEP, 9),
|
|
219
|
-
|
|
220
|
-
|
|
192
|
+
2011: (AUG, 30),
|
|
193
|
+
2013: (AUG, 8),
|
|
194
|
+
2014: (JUL, 28),
|
|
195
|
+
2015: (JUL, 17),
|
|
196
|
+
2016: (JUL, 6),
|
|
197
|
+
2018: (JUN, 15),
|
|
198
|
+
2019: (JUN, 4),
|
|
199
|
+
2020: (MAY, 24),
|
|
200
|
+
2021: (MAY, 13),
|
|
201
|
+
2022: (MAY, 2),
|
|
202
|
+
2023: (APR, 21),
|
|
203
|
+
2024: (APR, 10),
|
|
204
|
+
2025: (MAR, 30),
|
|
221
205
|
}
|
|
222
206
|
|
|
223
207
|
# https://web.archive.org/web/20250829053435/https://www.timeanddate.com/holidays/nigeria/id-el-maulud
|
|
224
208
|
# https://web.archive.org/web/20250829054319/https://pmnewsnigeria.com/2012/02/03/fg-declares-6-feb-public-holiday/
|
|
225
209
|
MAWLID_DATES_CONFIRMED_YEARS = (1979, 2025)
|
|
226
210
|
MAWLID_DATES = {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
1983: (DEC, 17),
|
|
211
|
+
1980: (JAN, 30),
|
|
212
|
+
1981: (JAN, 18),
|
|
230
213
|
1984: (DEC, 6),
|
|
231
|
-
1985: (NOV, 25),
|
|
232
|
-
1986: (NOV, 15),
|
|
233
|
-
1987: (NOV, 4),
|
|
234
|
-
1988: (OCT, 23),
|
|
235
214
|
1989: (OCT, 13),
|
|
236
|
-
|
|
237
|
-
1991: (SEP, 21),
|
|
238
|
-
1992: (SEP, 10),
|
|
239
|
-
1993: (AUG, 30),
|
|
240
|
-
1995: (AUG, 9),
|
|
241
|
-
1996: (JUL, 28),
|
|
215
|
+
1994: (AUG, 19),
|
|
242
216
|
1997: (JUL, 18),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
217
|
+
1999: (JUN, 26),
|
|
218
|
+
2001: (JUN, 4),
|
|
219
|
+
2002: (MAY, 24),
|
|
220
|
+
2005: (APR, 21),
|
|
221
|
+
2007: (MAR, 31),
|
|
222
|
+
2008: (MAR, 20),
|
|
223
|
+
2009: (MAR, 9),
|
|
224
|
+
2010: (FEB, 26),
|
|
249
225
|
2012: (FEB, 6),
|
|
226
|
+
2013: (JAN, 24),
|
|
227
|
+
2014: (JAN, 13),
|
|
250
228
|
2015: ((JAN, 2), (DEC, 24)),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
229
|
+
2018: (NOV, 20),
|
|
230
|
+
2019: (NOV, 9),
|
|
231
|
+
2020: (OCT, 29),
|
|
232
|
+
2022: (OCT, 8),
|
|
233
|
+
2023: (SEP, 27),
|
|
256
234
|
}
|
|
257
235
|
|
|
258
236
|
|
holidays/countries/norway.py
CHANGED
|
@@ -84,7 +84,7 @@ class Norway(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
84
84
|
"54",
|
|
85
85
|
)
|
|
86
86
|
|
|
87
|
-
def __init__(self, include_sundays: bool = False,
|
|
87
|
+
def __init__(self, *args, include_sundays: bool = False, **kwargs):
|
|
88
88
|
"""
|
|
89
89
|
Args:
|
|
90
90
|
include_sundays:
|
holidays/countries/portugal.py
CHANGED
|
@@ -166,7 +166,7 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
166
166
|
self._add_carnival_tuesday(tr("Carnaval"))
|
|
167
167
|
|
|
168
168
|
# Saint Anthony's Day.
|
|
169
|
-
self.
|
|
169
|
+
self._add_saint_anthonys_day(tr("Dia de Santo António"))
|
|
170
170
|
|
|
171
171
|
# Christmas Eve.
|
|
172
172
|
self._add_christmas_eve(tr("Véspera de Natal"))
|
|
@@ -225,13 +225,15 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
225
225
|
self._add_holiday_may_22(tr("Dia do Município de Leiria"))
|
|
226
226
|
|
|
227
227
|
def _populate_subdiv_11_public_holidays(self):
|
|
228
|
-
|
|
228
|
+
# Saint Anthony's Day.
|
|
229
|
+
self._add_saint_anthonys_day(tr("Dia de Santo António"))
|
|
229
230
|
|
|
230
231
|
def _populate_subdiv_12_public_holidays(self):
|
|
231
232
|
# Municipal Holiday of Portalegre.
|
|
232
233
|
self._add_holiday_may_23(tr("Dia do Município de Portalegre"))
|
|
233
234
|
|
|
234
235
|
def _populate_subdiv_13_public_holidays(self):
|
|
236
|
+
# Saint John's Day.
|
|
235
237
|
self._add_saint_johns_day(tr("Dia de São João"))
|
|
236
238
|
|
|
237
239
|
def _populate_subdiv_14_public_holidays(self):
|
|
@@ -247,7 +249,8 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
247
249
|
self._add_holiday_aug_20(tr("Dia de Nossa Senhora da Agonia"))
|
|
248
250
|
|
|
249
251
|
def _populate_subdiv_17_public_holidays(self):
|
|
250
|
-
|
|
252
|
+
# Saint Anthony's Day.
|
|
253
|
+
self._add_saint_anthonys_day(tr("Dia de Santo António"))
|
|
251
254
|
|
|
252
255
|
def _populate_subdiv_18_public_holidays(self):
|
|
253
256
|
# Saint Matthew's Day.
|
holidays/countries/rwanda.py
CHANGED
|
@@ -60,7 +60,7 @@ class Rwanda(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Isla
|
|
|
60
60
|
kwargs.setdefault("observed_since", 2017)
|
|
61
61
|
super().__init__(*args, **kwargs)
|
|
62
62
|
|
|
63
|
-
def _populate_observed(self, dts: set[date], multiple: bool = False) -> None:
|
|
63
|
+
def _populate_observed(self, dts: set[date], *, multiple: bool = False) -> None:
|
|
64
64
|
"""
|
|
65
65
|
Applies `SAT_TO_NEXT_WORKDAY` instead of `SAT_SUN_TO_NEXT_WORKDAY`
|
|
66
66
|
observed_rule for Day after New Year's Day and Boxing Day.
|
|
@@ -76,7 +76,7 @@ class Rwanda(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Isla
|
|
|
76
76
|
self._add_observed(
|
|
77
77
|
dt,
|
|
78
78
|
name,
|
|
79
|
-
SAT_TO_NEXT_WORKDAY if name in special_cases else SAT_SUN_TO_NEXT_WORKDAY,
|
|
79
|
+
rule=SAT_TO_NEXT_WORKDAY if name in special_cases else SAT_SUN_TO_NEXT_WORKDAY,
|
|
80
80
|
)
|
|
81
81
|
|
|
82
82
|
def _populate_public_holidays(self):
|