holidays 0.76__py3-none-any.whl → 0.77__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/countries/__init__.py +19 -0
- holidays/countries/australia.py +6 -8
- holidays/countries/british_virgin_islands.py +6 -6
- holidays/countries/cabo_verde.py +293 -0
- holidays/countries/cayman_islands.py +162 -0
- holidays/countries/central_african_republic.py +143 -0
- holidays/countries/christmas_island.py +215 -0
- holidays/countries/cocos_islands.py +4 -4
- holidays/countries/dr_congo.py +139 -0
- holidays/countries/faroe_islands.py +102 -0
- holidays/countries/georgia.py +11 -5
- holidays/countries/gibraltar.py +219 -0
- holidays/countries/guernsey.py +6 -6
- holidays/countries/japan.py +6 -8
- holidays/countries/jersey.py +2 -2
- holidays/countries/lebanon.py +448 -0
- holidays/countries/mali.py +151 -0
- holidays/countries/montserrat.py +177 -0
- holidays/countries/nepal.py +8 -8
- holidays/countries/new_zealand.py +2 -2
- holidays/countries/niue.py +115 -0
- holidays/countries/norfolk_island.py +129 -0
- holidays/countries/palau.py +1 -1
- holidays/countries/palestine.py +177 -0
- holidays/countries/peru.py +12 -0
- holidays/countries/saint_vincent_and_the_grenadines.py +130 -0
- holidays/countries/seychelles.py +1 -1
- holidays/countries/solomon_islands.py +2 -2
- holidays/countries/tokelau.py +66 -0
- holidays/countries/turks_and_caicos_islands.py +2 -2
- holidays/countries/united_kingdom.py +2 -2
- holidays/countries/united_states.py +2 -5
- holidays/groups/christian.py +10 -10
- holidays/groups/hebrew.py +2 -2
- holidays/groups/islamic.py +17 -0
- holidays/holiday_base.py +1 -1
- holidays/locale/ar/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/da/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/de/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/en_CX/LC_MESSAGES/CX.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/GI.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/KY.mo +0 -0
- holidays/locale/en_MS/LC_MESSAGES/MS.mo +0 -0
- holidays/locale/en_NF/LC_MESSAGES/NF.mo +0 -0
- holidays/locale/en_NU/LC_MESSAGES/NU.mo +0 -0
- holidays/locale/en_TK/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CX.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/VC.mo +0 -0
- holidays/locale/en_VC/LC_MESSAGES/VC.mo +0 -0
- holidays/locale/es/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/fo/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CD.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CF.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/is/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/no/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/pt_CV/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/sv/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/tkl/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/PE.mo +0 -0
- holidays/observed_holiday_base.py +3 -1
- holidays/registry.py +15 -0
- holidays/version.py +1 -1
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/METADATA +107 -2
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/RECORD +85 -32
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/licenses/CONTRIBUTORS +3 -0
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/WHEEL +0 -0
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
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 gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars.gregorian import APR, MAY, JUN, JUL, SEP, DEC
|
|
16
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
17
|
+
from holidays.observed_holiday_base import (
|
|
18
|
+
ObservedHolidayBase,
|
|
19
|
+
MON_TO_NEXT_TUE,
|
|
20
|
+
SAT_TO_NEXT_MON,
|
|
21
|
+
SAT_SUN_TO_NEXT_MON,
|
|
22
|
+
SAT_SUN_TO_NEXT_MON_TUE,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Montserrat(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
27
|
+
"""Montserrat holidays.
|
|
28
|
+
|
|
29
|
+
References:
|
|
30
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Montserrat>
|
|
31
|
+
* [Public holidays Act, 2017](https://web.archive.org/web/20240619074948/http://agc.gov.ms/wp-content/uploads/2011/10/Act-No.-3-of-2017-Public-Holidays-Amendment-Act-20171.pdf)
|
|
32
|
+
* [Public holidays Act, 2019](https://web.archive.org/web/20241025070627/https://www.gov.ms/wp-content/uploads/2020/06/Public-Holidays-Act.pdf)
|
|
33
|
+
* [National Day of Prayer and Thanksgiving, 2021](https://web.archive.org/web/20220809144840/https://www.gov.ms/2021/07/16/wednesday-july-21-2021-public-holiday-national-day-of-prayer-thanksgiving/)
|
|
34
|
+
* [National Day of Prayer and Thanksgiving, 2022](https://web.archive.org/web/20220816124619/https://www.gov.ms/2022/07/19/public-holiday-for-national-day-of-prayer-and-thanksgiving-to-be-held-on-july-20-2022/)
|
|
35
|
+
* [National Day of Prayer and Thanksgiving](https://web.archive.org/web/20240711221313/https://www.gov.ms/wp-content/uploads/2023/05/SRO-No.-15-of-2023-Public-Holidays-Amendment-of-Schedule-Order.pdf)
|
|
36
|
+
* [Queen's Platinum Jubilee, 2022](https://web.archive.org/web/20250711160439/https://www.gov.ms/tag/public-holidays/)
|
|
37
|
+
* [Montserrat Public holidays, 2022](https://web.archive.org/web/20220809030551/https://www.gov.ms/wp-content/uploads/2021/12/Public-Holidays-2022-1.jpeg)
|
|
38
|
+
* [Montserrat Public holidays, 2023](https://web.archive.org/web/20241126232715/https://www.gov.ms/wp-content/uploads/2023/02/Public-Holidays-Montserrat-2023_page-0001.jpg)
|
|
39
|
+
* [Montserrat Public holidays, 2024](https://web.archive.org/web/20240421112540/https://www.gov.ms/wp-content/uploads/2023/12/Public-Holidays-Montserrat-2024.docx.pdf)
|
|
40
|
+
* [King's Birthday, 2024](https://web.archive.org/web/20250711202228/https://parliament.ms/wp-content/uploads/2024/09/SRO-No.-18-of-2024-PROCOLAMATION-APPOINTING-MONDAY-17-JUNE-2024-AS-A-PUBLIC-HOLIDAY.pdf)
|
|
41
|
+
* [Montserrat Public holidays, 2025](https://web.archive.org/web/20250711160324/https://www.gov.ms/wp-content/uploads/2025/01/2025-Public-Holidays-on-Montserrat.pdf)
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
country = "MS"
|
|
45
|
+
default_language = "en_MS"
|
|
46
|
+
# %s (observed).
|
|
47
|
+
observed_label = "%s (observed)"
|
|
48
|
+
# Public holidays Act, 2017.
|
|
49
|
+
start_year = 2017
|
|
50
|
+
supported_languages = ("en_MS", "en_US")
|
|
51
|
+
|
|
52
|
+
def __init__(self, *args, **kwargs):
|
|
53
|
+
ChristianHolidays.__init__(self)
|
|
54
|
+
InternationalHolidays.__init__(self)
|
|
55
|
+
StaticHolidays.__init__(self, MontserratStaticHolidays)
|
|
56
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
57
|
+
super().__init__(*args, **kwargs)
|
|
58
|
+
|
|
59
|
+
def _populate_public_holidays(self):
|
|
60
|
+
self._add_observed(
|
|
61
|
+
# New Year's Day.
|
|
62
|
+
self._add_new_years_day(tr("New Year's Day")),
|
|
63
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE + MON_TO_NEXT_TUE,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Saint Patrick's Day.
|
|
67
|
+
self._add_observed(self._add_holiday_mar_17(tr("Saint Patrick's Day")))
|
|
68
|
+
|
|
69
|
+
# Good Friday.
|
|
70
|
+
self._add_good_friday(tr("Good Friday"))
|
|
71
|
+
|
|
72
|
+
# Easter Monday.
|
|
73
|
+
self._add_easter_monday(tr("Easter Monday"))
|
|
74
|
+
|
|
75
|
+
# Labor Day.
|
|
76
|
+
self._add_holiday_1st_mon_of_may(tr("Labour Day"))
|
|
77
|
+
|
|
78
|
+
name = (
|
|
79
|
+
# King's Birthday.
|
|
80
|
+
tr("King's Birthday")
|
|
81
|
+
if self._year >= 2023
|
|
82
|
+
# Queen's Birthday.
|
|
83
|
+
else tr("Queen's Birthday")
|
|
84
|
+
)
|
|
85
|
+
sovereign_birthday_dts = {
|
|
86
|
+
2022: (JUN, 2),
|
|
87
|
+
2023: (JUN, 19),
|
|
88
|
+
2024: (JUN, 17),
|
|
89
|
+
}
|
|
90
|
+
sovereign_birthday_dt = (
|
|
91
|
+
self._add_holiday(name, dt)
|
|
92
|
+
if (dt := sovereign_birthday_dts.get(self._year))
|
|
93
|
+
else self._add_holiday_2_days_past_2nd_sat_of_jun(name)
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# Whit Monday.
|
|
97
|
+
name = tr("Whit Monday")
|
|
98
|
+
whit_monday_dt = self._add_whit_monday(name)
|
|
99
|
+
if whit_monday_dt == sovereign_birthday_dt:
|
|
100
|
+
self._add_observed(whit_monday_dt, name=name, rule=MON_TO_NEXT_TUE)
|
|
101
|
+
|
|
102
|
+
if self._year >= 2021:
|
|
103
|
+
day_of_prayer_dts = {
|
|
104
|
+
2021: (JUL, 21),
|
|
105
|
+
2022: (JUL, 20),
|
|
106
|
+
}
|
|
107
|
+
name = (
|
|
108
|
+
# National Day of Prayer and Thanksgiving.
|
|
109
|
+
tr("National Day of Prayer and Thanksgiving")
|
|
110
|
+
if self._year <= 2023
|
|
111
|
+
# Day of Prayer and Thanksgiving.
|
|
112
|
+
else tr("Day of Prayer and Thanksgiving")
|
|
113
|
+
)
|
|
114
|
+
if dt := day_of_prayer_dts.get(self._year):
|
|
115
|
+
self._add_holiday(name, dt)
|
|
116
|
+
else:
|
|
117
|
+
self._add_holiday_2nd_wed_of_jul(name)
|
|
118
|
+
|
|
119
|
+
# Emancipation Day.
|
|
120
|
+
self._add_holiday_1st_mon_of_aug(tr("Emancipation Day"))
|
|
121
|
+
|
|
122
|
+
self._add_observed(
|
|
123
|
+
# Christmas Day.
|
|
124
|
+
self._add_christmas_day(tr("Christmas Day")),
|
|
125
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
self._add_observed(
|
|
129
|
+
# Boxing Day.
|
|
130
|
+
self._add_christmas_day_two(tr("Boxing Day")),
|
|
131
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
# Festival Day.
|
|
135
|
+
name = tr("Festival Day")
|
|
136
|
+
self._add_new_years_eve(name)
|
|
137
|
+
self._add_observed((self._year - 1, DEC, 31), name, rule=SAT_TO_NEXT_MON)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class MS(Montserrat):
|
|
141
|
+
pass
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class MSR(Montserrat):
|
|
145
|
+
pass
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class MontserratStaticHolidays(StaticHolidays):
|
|
149
|
+
"""Montserrat special holidays.
|
|
150
|
+
|
|
151
|
+
References:
|
|
152
|
+
* [September 14th, 2018](https://web.archive.org/web/20220810224300/https://www.gov.ms/wp-content/uploads/2020/11/SRO.-No.-35-of-2018-Proclamation-Declaring-Friday-14-September-2018-as-a-public-holiday.pdf)
|
|
153
|
+
* [May 10th, 2019](https://web.archive.org/web/20240626113529/https://parliament.ms/wp-content/uploads/2022/02/SRO-No-13-of-2019-Proclamation-Declaring-Friday-10-May-2019-as-a-publi._.pdf)
|
|
154
|
+
* [July 15th, 2020](https://web.archive.org/web/20220810225456/https://www.gov.ms/wp-content/uploads/2020/08/SRO.-No.-40-of-2020-Proclamation-Declaring-Wednesday-15-July-2020-as-a-Public-Holiday.pdf)
|
|
155
|
+
* [National Day of Mourning](https://web.archive.org/web/20240617072858/https://www.parliament.ms/wp-content/uploads/2022/09/SRO-No.43-of-2022-Proclamation-Appointing-Monday-19-September-2022-a-Public-Holiday.pdf)
|
|
156
|
+
* [Coronation of King Charles III](https://web.archive.org/web/20241126232715/https://www.gov.ms/wp-content/uploads/2023/02/Public-Holidays-Montserrat-2023_page-0001.jpg)
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
# Special Public Holiday.
|
|
160
|
+
name = tr("Special Public Holiday")
|
|
161
|
+
|
|
162
|
+
special_public_holidays = {
|
|
163
|
+
2018: (SEP, 14, name),
|
|
164
|
+
2019: (MAY, 10, name),
|
|
165
|
+
2020: (JUL, 15, name),
|
|
166
|
+
2022: (
|
|
167
|
+
# Platinum Jubilee of Elizabeth II.
|
|
168
|
+
(JUN, 3, tr("Platinum Jubilee of Elizabeth II")),
|
|
169
|
+
# National Day of Mourning.
|
|
170
|
+
(SEP, 19, tr("National Day of Mourning")),
|
|
171
|
+
),
|
|
172
|
+
2023: (
|
|
173
|
+
(APR, 12, name),
|
|
174
|
+
# Coronation of King Charles III.
|
|
175
|
+
(MAY, 6, tr("Coronation of King Charles III")),
|
|
176
|
+
),
|
|
177
|
+
}
|
holidays/countries/nepal.py
CHANGED
|
@@ -97,9 +97,9 @@ class Nepal(
|
|
|
97
97
|
2032: (JAN, 30),
|
|
98
98
|
2033: (JAN, 29),
|
|
99
99
|
}
|
|
100
|
-
if self._year
|
|
100
|
+
if dt := martyrs_day_dates.get(self._year):
|
|
101
101
|
# Martyr's Day.
|
|
102
|
-
self._add_holiday("Martyr's Day",
|
|
102
|
+
self._add_holiday("Martyr's Day", dt)
|
|
103
103
|
|
|
104
104
|
democracy_day_dates = {
|
|
105
105
|
2010: (FEB, 19),
|
|
@@ -127,9 +127,9 @@ class Nepal(
|
|
|
127
127
|
2032: (FEB, 20),
|
|
128
128
|
2033: (FEB, 19),
|
|
129
129
|
}
|
|
130
|
-
if self._year
|
|
130
|
+
if dt := democracy_day_dates.get(self._year):
|
|
131
131
|
# National Democracy Day.
|
|
132
|
-
self._add_holiday("National Democracy Day",
|
|
132
|
+
self._add_holiday("National Democracy Day", dt)
|
|
133
133
|
|
|
134
134
|
republic_day_dates = {
|
|
135
135
|
2010: (MAY, 29),
|
|
@@ -156,10 +156,10 @@ class Nepal(
|
|
|
156
156
|
2031: (MAY, 29),
|
|
157
157
|
2032: (MAY, 28),
|
|
158
158
|
}
|
|
159
|
-
if self._year
|
|
159
|
+
if dt := republic_day_dates.get(self._year):
|
|
160
160
|
# Established in 2009.
|
|
161
161
|
# Republic Day.
|
|
162
|
-
self._add_holiday("Republic Day",
|
|
162
|
+
self._add_holiday("Republic Day", dt)
|
|
163
163
|
|
|
164
164
|
# Hindu Holidays.
|
|
165
165
|
|
|
@@ -211,9 +211,9 @@ class Nepal(
|
|
|
211
211
|
2031: (SEP, 19),
|
|
212
212
|
2032: (SEP, 19),
|
|
213
213
|
}
|
|
214
|
-
if self._year
|
|
214
|
+
if dt := constitution_day_dates.get(self._year):
|
|
215
215
|
# Constitution Day.
|
|
216
|
-
self._add_holiday("Constitution Day",
|
|
216
|
+
self._add_holiday("Constitution Day", dt)
|
|
217
217
|
|
|
218
218
|
# Christmas Day.
|
|
219
219
|
self._add_christmas_day("Christmas Day")
|
|
@@ -212,8 +212,8 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
212
212
|
2051: (JUN, 30),
|
|
213
213
|
2052: (JUN, 21),
|
|
214
214
|
}
|
|
215
|
-
if self._year
|
|
216
|
-
self._add_holiday("Matariki",
|
|
215
|
+
if dt := dates_obs.get(self._year):
|
|
216
|
+
self._add_holiday("Matariki", dt)
|
|
217
217
|
|
|
218
218
|
# Labour Day
|
|
219
219
|
if self._year >= 1900:
|
|
@@ -0,0 +1,115 @@
|
|
|
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 gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars.gregorian import SEP
|
|
16
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
17
|
+
from holidays.observed_holiday_base import (
|
|
18
|
+
ObservedHolidayBase,
|
|
19
|
+
SAT_SUN_TO_NEXT_MON,
|
|
20
|
+
SAT_SUN_TO_NEXT_MON_TUE,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Niue(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
25
|
+
"""Niue holidays.
|
|
26
|
+
|
|
27
|
+
References:
|
|
28
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Niue>
|
|
29
|
+
* <https://en.wikipedia.org/wiki/Niue_Constitution_Act>
|
|
30
|
+
* [Public Holidays Ordinance 1961](https://web.archive.org/web/20250102100637/http://www.paclii.org/nu/legis/num_act/nipho1961314.pdf)
|
|
31
|
+
* <https://web.archive.org/web/20250223114854/https://niuepocketguide.com/public-holidays-in-niue-other-important-dates/>
|
|
32
|
+
* [2021/2022 Public Holidays](https://web.archive.org/web/20250509105501/https://www.gov.nu/media/pages/information/1018c58017-1725838374/4nov2021-circular.pdf)
|
|
33
|
+
* [2025 Good Friday & Easter Monday and Anzac Day](https://web.archive.org/web/20250719195126/https://www.gov.nu/media/pages/gazette/3e02b3aa84-1746400484/official-psc-circular-easter-anzac-holiday.pdf)
|
|
34
|
+
* [2025 King's Birthday](https://web.archive.org/web/20250719195301/https://www.gov.nu/media/pages/public-service-circulars/3b9f44b6a0-1748573974/king-s-birthday-public-holiday-2025-circular.pdf)
|
|
35
|
+
* <http://archive.today/2025.07.14-145535/https://www.wipo.int/wipolex/en/text/427817>
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
country = "NU"
|
|
39
|
+
default_language = "en_NU"
|
|
40
|
+
# %s observed.
|
|
41
|
+
observed_label = tr("%s (observed)")
|
|
42
|
+
# Public Holidays Ordinance 1961.
|
|
43
|
+
start_year = 1962
|
|
44
|
+
supported_languages = ("en_NU", "en_US")
|
|
45
|
+
|
|
46
|
+
def __init__(self, *args, **kwargs):
|
|
47
|
+
ChristianHolidays.__init__(self)
|
|
48
|
+
InternationalHolidays.__init__(self)
|
|
49
|
+
StaticHolidays.__init__(self, cls=NiueStaticHolidays)
|
|
50
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON_TUE)
|
|
51
|
+
super().__init__(*args, **kwargs)
|
|
52
|
+
|
|
53
|
+
def _populate_public_holidays(self):
|
|
54
|
+
# New Year's Day.
|
|
55
|
+
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
|
|
56
|
+
|
|
57
|
+
# Takai Commission Holiday.
|
|
58
|
+
self._add_observed(self._add_new_years_day_two(tr("Takai Commission Holiday")))
|
|
59
|
+
|
|
60
|
+
# Good Friday.
|
|
61
|
+
self._add_good_friday(tr("Good Friday"))
|
|
62
|
+
|
|
63
|
+
# Easter Monday.
|
|
64
|
+
self._add_easter_monday(tr("Easter Monday"))
|
|
65
|
+
|
|
66
|
+
# ANZAC Day.
|
|
67
|
+
self._add_observed(self._add_anzac_day(tr("ANZAC Day")), rule=SAT_SUN_TO_NEXT_MON)
|
|
68
|
+
|
|
69
|
+
self._add_holiday_1st_mon_of_jun(
|
|
70
|
+
# King's Birthday.
|
|
71
|
+
tr("King's Birthday")
|
|
72
|
+
if self._year >= 2023
|
|
73
|
+
# Queen's Birthday.
|
|
74
|
+
else tr("Queen's Birthday")
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
if self._year >= 1974:
|
|
78
|
+
# Constitution Day.
|
|
79
|
+
self._add_observed(self._add_holiday_oct_19(tr("Constitution Day")))
|
|
80
|
+
|
|
81
|
+
# Constitution Day Holiday.
|
|
82
|
+
self._add_observed(self._add_holiday_oct_20(tr("Constitution Day Holiday")))
|
|
83
|
+
else:
|
|
84
|
+
# Annexation Day.
|
|
85
|
+
self._add_holiday_3rd_mon_of_oct(tr("Annexation Day"))
|
|
86
|
+
|
|
87
|
+
# Peniamina Gospel Day.
|
|
88
|
+
self._add_holiday_4th_mon_of_oct(tr("Peniamina Gospel Day"))
|
|
89
|
+
|
|
90
|
+
# Christmas Day.
|
|
91
|
+
self._add_observed(self._add_christmas_day(tr("Christmas Day")))
|
|
92
|
+
|
|
93
|
+
# Boxing Day.
|
|
94
|
+
self._add_observed(self._add_christmas_day_two(tr("Boxing Day")))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class NU(Niue):
|
|
98
|
+
pass
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class NIU(Niue):
|
|
102
|
+
pass
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class NiueStaticHolidays:
|
|
106
|
+
"""Niue special holidays.
|
|
107
|
+
|
|
108
|
+
References:
|
|
109
|
+
* [Queen Elizabeth II's Funeral](https://web.archive.org/web/20250617174022/https://tvniue.com/2022/09/premier-will-attend-hm-the-queens-funeral-while-monday-19th-is-declared-one-off-public-holiday/)
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
special_public_holidays = {
|
|
113
|
+
# Queen Elizabeth II's Funeral.
|
|
114
|
+
2022: (SEP, 19, tr("Queen Elizabeth II's Funeral")),
|
|
115
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
|
|
14
|
+
from gettext import gettext as tr
|
|
15
|
+
|
|
16
|
+
from holidays.calendars.gregorian import SEP
|
|
17
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
18
|
+
from holidays.observed_holiday_base import (
|
|
19
|
+
ObservedHolidayBase,
|
|
20
|
+
SAT_SUN_TO_NEXT_MON,
|
|
21
|
+
SAT_SUN_TO_NEXT_MON_TUE,
|
|
22
|
+
SUN_TO_NEXT_MON,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class NorfolkIsland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
27
|
+
"""Norfolk Island holidays.
|
|
28
|
+
|
|
29
|
+
References:
|
|
30
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Norfolk_Island>
|
|
31
|
+
* <https://web.archive.org/web/20250409233237/https://www.infrastructure.gov.au/territories-regions-cities/territories/norfolk-island/travel-information>
|
|
32
|
+
* [2020](https://web.archive.org/web/20220704121150/http://norfolkislander.com/images/2019_08_30_Gazette_No._38.pdf)
|
|
33
|
+
* [2021](https://web.archive.org/web/20250710234146/http://www.norfolkislander.com/images/2020_07_31_Gazette_No._35.pdf)
|
|
34
|
+
* [2022](https://web.archive.org/web/20250328071352/https://www.nirc.gov.au/files/assets/public/v/1/your-council/documents/nirc-gazettes/2021_07_09_gazette_no_29.pdf)
|
|
35
|
+
* [2023](https://web.archive.org/web/20250328071155/https://www.nirc.gov.au/files/assets/public/v/1/your-council/documents/nirc-gazettes/2022_07_21_gazette_no_29.pdf)
|
|
36
|
+
* [2024](https://web.archive.org/web/20250328070948/https://www.nirc.gov.au/files/assets/public/v/1/your-council/documents/nirc-gazettes/2023_07_13_gazette_no_40.pdf)
|
|
37
|
+
* [2025](https://web.archive.org/web/20250711000525/https://www.nirc.gov.au/files/assets/public/v/1/your-council/documents/nirc-gazettes/2024_07_05_gazette_no_25.pdf)
|
|
38
|
+
* [2026](https://web.archive.org/web/20250713192750/https://www.nirc.gov.au/files/assets/public/v/1/your-council/documents/nirc-gazettes/2025/2025-07-11-gazette-no-26.pdf)
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
country = "NF"
|
|
42
|
+
default_language = "en_NF"
|
|
43
|
+
# %s (observed).
|
|
44
|
+
observed_label = tr("%s (observed)")
|
|
45
|
+
supported_languages = ("en_NF", "en_US")
|
|
46
|
+
start_year = 2016
|
|
47
|
+
|
|
48
|
+
def __init__(self, *args, **kwargs):
|
|
49
|
+
ChristianHolidays.__init__(self)
|
|
50
|
+
InternationalHolidays.__init__(self)
|
|
51
|
+
StaticHolidays.__init__(self, NorfolkIslandStaticHolidays)
|
|
52
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
53
|
+
super().__init__(*args, **kwargs)
|
|
54
|
+
|
|
55
|
+
def _populate_public_holidays(self):
|
|
56
|
+
# New Year's Day.
|
|
57
|
+
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
|
|
58
|
+
|
|
59
|
+
# Australia Day.
|
|
60
|
+
self._add_observed(self._add_holiday_jan_26(tr("Australia Day")))
|
|
61
|
+
|
|
62
|
+
# Foundation Day.
|
|
63
|
+
self._add_observed(self._add_holiday_mar_6(tr("Foundation Day")), rule=SUN_TO_NEXT_MON)
|
|
64
|
+
|
|
65
|
+
# Good Friday.
|
|
66
|
+
self._add_good_friday(tr("Good Friday"))
|
|
67
|
+
|
|
68
|
+
# Easter Monday.
|
|
69
|
+
self._add_easter_monday(tr("Easter Monday"))
|
|
70
|
+
|
|
71
|
+
# ANZAC Day.
|
|
72
|
+
self._add_anzac_day(tr("ANZAC Day"))
|
|
73
|
+
|
|
74
|
+
# Bounty Day.
|
|
75
|
+
self._add_observed(bounty_day := self._add_holiday_jun_8(tr("Bounty Day")))
|
|
76
|
+
|
|
77
|
+
# Sovereign's Birthday.
|
|
78
|
+
name = (
|
|
79
|
+
# King's Birthday.
|
|
80
|
+
tr("King's Birthday")
|
|
81
|
+
if self._year >= 2023
|
|
82
|
+
# Queen's Birthday.
|
|
83
|
+
else tr("Queen's Birthday")
|
|
84
|
+
)
|
|
85
|
+
# If Sovereign's Birthday falls on the same day as Bounty Day (observed),
|
|
86
|
+
# it is moved to the next Monday.
|
|
87
|
+
if self._is_saturday(bounty_day):
|
|
88
|
+
self._add_holiday_2_days_past_3rd_sat_of_jun(name)
|
|
89
|
+
else:
|
|
90
|
+
self._add_holiday_2_days_past_2nd_sat_of_jun(name)
|
|
91
|
+
|
|
92
|
+
# Show Day.
|
|
93
|
+
self._add_holiday_2nd_mon_of_oct(tr("Show Day"))
|
|
94
|
+
|
|
95
|
+
# Thanksgiving Day.
|
|
96
|
+
self._add_holiday_last_wed_of_nov(tr("Thanksgiving Day"))
|
|
97
|
+
|
|
98
|
+
self._add_observed(
|
|
99
|
+
# Christmas Day.
|
|
100
|
+
self._add_christmas_day(tr("Christmas Day")),
|
|
101
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
self._add_observed(
|
|
105
|
+
# Boxing Day.
|
|
106
|
+
self._add_christmas_day_two(tr("Boxing Day")),
|
|
107
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class NF(NorfolkIsland):
|
|
112
|
+
pass
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class NFK(NorfolkIsland):
|
|
116
|
+
pass
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class NorfolkIslandStaticHolidays:
|
|
120
|
+
"""Norfolk Island special holidays.
|
|
121
|
+
|
|
122
|
+
References:
|
|
123
|
+
* [National Day of Mourning 2022](https://web.archive.org/web/20250711012623/https://www.infrastructure.gov.au/territories-regions-cities/territories/norfolk-island/media-releases/national-day-of-mourning-for-her-majesty-the-queen)
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
special_public_holidays = {
|
|
127
|
+
# National Day of Mourning for Queen Elizabeth II.
|
|
128
|
+
2022: (SEP, 22, tr("National Day of Mourning for Queen Elizabeth II")),
|
|
129
|
+
}
|
holidays/countries/palau.py
CHANGED
|
@@ -16,7 +16,7 @@ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHoli
|
|
|
16
16
|
from holidays.observed_holiday_base import ObservedHolidayBase, SAT_TO_PREV_FRI, SUN_TO_NEXT_MON
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class Palau(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
19
|
+
class Palau(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
20
20
|
"""Palau holidays.
|
|
21
21
|
|
|
22
22
|
References:
|
|
@@ -0,0 +1,177 @@
|
|
|
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 gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars import _CustomIslamicHolidays
|
|
16
|
+
from holidays.calendars.gregorian import GREGORIAN_CALENDAR, SEP
|
|
17
|
+
from holidays.calendars.julian import JULIAN_CALENDAR
|
|
18
|
+
from holidays.constants import CATHOLIC, ORTHODOX, PUBLIC
|
|
19
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
20
|
+
from holidays.holiday_base import HolidayBase
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Palestine(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
24
|
+
"""Palestine holidays.
|
|
25
|
+
|
|
26
|
+
References:
|
|
27
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Palestine>
|
|
28
|
+
* <https://web.archive.org/web/20250705114216/https://info.wafa.ps/pages/details/29601>
|
|
29
|
+
* [Declaration of Palestine independence](https://en.wikipedia.org/wiki/Palestine#Uprising,_declaration_and_peace_treaty)
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
country = "PS"
|
|
33
|
+
default_language = "ar"
|
|
34
|
+
# %s (estimated).
|
|
35
|
+
estimated_label = tr("%s (المقدرة)")
|
|
36
|
+
# State of Palestine declared in November 1988.
|
|
37
|
+
start_year = 1989
|
|
38
|
+
supported_categories = (CATHOLIC, ORTHODOX, PUBLIC)
|
|
39
|
+
supported_languages = ("ar", "en_US")
|
|
40
|
+
|
|
41
|
+
def __init__(self, *args, islamic_show_estimated: bool = False, **kwargs):
|
|
42
|
+
"""
|
|
43
|
+
Args:
|
|
44
|
+
islamic_show_estimated:
|
|
45
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
46
|
+
if holiday date is estimated.
|
|
47
|
+
"""
|
|
48
|
+
ChristianHolidays.__init__(self, calendar=JULIAN_CALENDAR)
|
|
49
|
+
InternationalHolidays.__init__(self)
|
|
50
|
+
IslamicHolidays.__init__(
|
|
51
|
+
self, cls=PalestineIslamicHolidays, show_estimated=islamic_show_estimated
|
|
52
|
+
)
|
|
53
|
+
super().__init__(*args, **kwargs)
|
|
54
|
+
|
|
55
|
+
def _populate_public_holidays(self):
|
|
56
|
+
# New Year's Day.
|
|
57
|
+
self._add_new_years_day(tr("رأس السنة الميلادي"))
|
|
58
|
+
|
|
59
|
+
# Orthodox Christmas Day.
|
|
60
|
+
self._add_christmas_day(tr("عيد الميلاد المجيد الشرقي"))
|
|
61
|
+
|
|
62
|
+
# International Women's Day.
|
|
63
|
+
self._add_womens_day(tr("يوم المراة العالمي"))
|
|
64
|
+
|
|
65
|
+
# Easter.
|
|
66
|
+
self._add_easter_sunday(tr("عيد الفصح المجيد"), GREGORIAN_CALENDAR)
|
|
67
|
+
|
|
68
|
+
# Easter.
|
|
69
|
+
self._add_easter_sunday(tr("عيد الفصح المجيد"))
|
|
70
|
+
|
|
71
|
+
# Labor Day.
|
|
72
|
+
self._add_labor_day(tr("عيد العمال"))
|
|
73
|
+
|
|
74
|
+
# Independence Day.
|
|
75
|
+
self._add_holiday_nov_15(tr("عيد الإستقلال"))
|
|
76
|
+
|
|
77
|
+
# Catholic Christmas Day.
|
|
78
|
+
self._add_christmas_day(tr("عيد الميلاد المجيد الغربي"), GREGORIAN_CALENDAR)
|
|
79
|
+
|
|
80
|
+
# Hijri New Year.
|
|
81
|
+
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
|
|
82
|
+
|
|
83
|
+
# Prophet's Birthday.
|
|
84
|
+
self._add_mawlid_day(tr("ذكرى المولد النبوي الشريف"))
|
|
85
|
+
|
|
86
|
+
# Isra' and Mi'raj.
|
|
87
|
+
self._add_isra_and_miraj_day(tr("ذكرى الإسراء والمعراج"))
|
|
88
|
+
|
|
89
|
+
# Eid al-Fitr.
|
|
90
|
+
name = tr("عيد الفطر السعيد")
|
|
91
|
+
self._add_eid_al_fitr_day(name)
|
|
92
|
+
self._add_eid_al_fitr_day_two(name)
|
|
93
|
+
self._add_eid_al_fitr_day_three(name)
|
|
94
|
+
|
|
95
|
+
# Eid al-Adha.
|
|
96
|
+
name = tr("عيد الأضحى المبارك")
|
|
97
|
+
self._add_eid_al_adha_day(name)
|
|
98
|
+
self._add_eid_al_adha_day_two(name)
|
|
99
|
+
self._add_eid_al_adha_day_three(name)
|
|
100
|
+
self._add_eid_al_adha_day_four(name)
|
|
101
|
+
|
|
102
|
+
def _populate_catholic_holidays(self):
|
|
103
|
+
# New Year's Day.
|
|
104
|
+
self._add_new_years_day(tr("رأس السنة الميلادي"))
|
|
105
|
+
|
|
106
|
+
# Epiphany.
|
|
107
|
+
self._add_epiphany_day(tr("عيد الغطاس"), GREGORIAN_CALENDAR)
|
|
108
|
+
|
|
109
|
+
# Palm Sunday.
|
|
110
|
+
self._add_palm_sunday(tr("أحد الشعانين"), GREGORIAN_CALENDAR)
|
|
111
|
+
|
|
112
|
+
# Holy Thursday.
|
|
113
|
+
self._add_holy_thursday(tr("خميس الغسل"), GREGORIAN_CALENDAR)
|
|
114
|
+
|
|
115
|
+
# Good Friday.
|
|
116
|
+
self._add_good_friday(tr("الجمعة العظيمة"), GREGORIAN_CALENDAR)
|
|
117
|
+
|
|
118
|
+
# Holy Saturday.
|
|
119
|
+
self._add_holy_saturday(tr("سبت النور"), GREGORIAN_CALENDAR)
|
|
120
|
+
|
|
121
|
+
# Easter.
|
|
122
|
+
self._add_easter_monday(tr("عيد الفصح المجيد"), GREGORIAN_CALENDAR)
|
|
123
|
+
|
|
124
|
+
# Ascension Day.
|
|
125
|
+
self._add_ascension_thursday(tr("خميس الصعود"), GREGORIAN_CALENDAR)
|
|
126
|
+
|
|
127
|
+
# Pentecost.
|
|
128
|
+
self._add_whit_sunday(tr("أحد العنصرة"), GREGORIAN_CALENDAR)
|
|
129
|
+
|
|
130
|
+
# Catholic Christmas Day.
|
|
131
|
+
self._add_christmas_day_two(tr("عيد الميلاد المجيد الغربي"), GREGORIAN_CALENDAR)
|
|
132
|
+
|
|
133
|
+
def _populate_orthodox_holidays(self):
|
|
134
|
+
# Orthodox New Year's Day.
|
|
135
|
+
self._add_holiday_jan_14(tr("عيد رأس السنة الشرقي"))
|
|
136
|
+
|
|
137
|
+
# Orthodox Christmas Day.
|
|
138
|
+
self._add_christmas_day_two(tr("عيد الميلاد المجيد الشرقي"))
|
|
139
|
+
|
|
140
|
+
# Epiphany.
|
|
141
|
+
self._add_epiphany_day(tr("عيد الغطاس"))
|
|
142
|
+
|
|
143
|
+
# Palm Sunday.
|
|
144
|
+
self._add_palm_sunday(tr("أحد الشعانين"))
|
|
145
|
+
|
|
146
|
+
# Holy Thursday.
|
|
147
|
+
self._add_holy_thursday(tr("خميس الغسل"))
|
|
148
|
+
|
|
149
|
+
# Good Friday.
|
|
150
|
+
self._add_good_friday(tr("الجمعة العظيمة"))
|
|
151
|
+
|
|
152
|
+
# Holy Saturday.
|
|
153
|
+
self._add_holy_saturday(tr("سبت النور"))
|
|
154
|
+
|
|
155
|
+
# Easter.
|
|
156
|
+
self._add_easter_monday(tr("عيد الفصح المجيد"))
|
|
157
|
+
|
|
158
|
+
# Ascension Day.
|
|
159
|
+
self._add_ascension_thursday(tr("خميس الصعود"))
|
|
160
|
+
|
|
161
|
+
# Pentecost.
|
|
162
|
+
self._add_whit_sunday(tr("أحد العنصرة"))
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class PS(Palestine):
|
|
166
|
+
pass
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class PSE(Palestine):
|
|
170
|
+
pass
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class PalestineIslamicHolidays(_CustomIslamicHolidays):
|
|
174
|
+
# All other dates follow Umm al-Qura calendar.
|
|
175
|
+
MAWLID_DATES = {
|
|
176
|
+
2023: (SEP, 27),
|
|
177
|
+
}
|