holidays 0.76__py3-none-any.whl → 0.78__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/islamic.py +32 -1
- holidays/countries/__init__.py +20 -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/egypt.py +203 -47
- holidays/countries/faroe_islands.py +102 -0
- holidays/countries/georgia.py +11 -5
- holidays/countries/germany.py +41 -0
- holidays/countries/gibraltar.py +219 -0
- holidays/countries/guernsey.py +6 -6
- holidays/countries/indonesia.py +5 -2
- holidays/countries/japan.py +6 -8
- holidays/countries/jersey.py +2 -2
- holidays/countries/lebanon.py +448 -0
- holidays/countries/luxembourg.py +13 -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/pakistan.py +7 -5
- holidays/countries/palau.py +1 -1
- holidays/countries/palestine.py +177 -0
- holidays/countries/peru.py +12 -0
- holidays/countries/pitcairn_islands.py +85 -0
- holidays/countries/saint_vincent_and_the_grenadines.py +130 -0
- holidays/countries/saudi_arabia.py +43 -35
- 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 -10
- holidays/holiday_base.py +73 -92
- holidays/locale/ar/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/{ar → ar_EG}/LC_MESSAGES/EG.mo +0 -0
- holidays/locale/da/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/de/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/de/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/de/LC_MESSAGES/LU.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/DE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/EG.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/LU.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/EG.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/is/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/lb/LC_MESSAGES/LU.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/th/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/tkl/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/DE.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/LU.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/PE.mo +0 -0
- holidays/observed_holiday_base.py +3 -1
- holidays/registry.py +16 -0
- holidays/utils.py +18 -18
- holidays/version.py +1 -1
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/METADATA +118 -6
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/RECORD +106 -51
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/licenses/CONTRIBUTORS +4 -0
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/WHEEL +0 -0
- {holidays-0.76.dist-info → holidays-0.78.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.76.dist-info → holidays-0.78.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/pakistan.py
CHANGED
|
@@ -32,6 +32,7 @@ class Pakistan(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
|
32
32
|
default_language = "en_PK"
|
|
33
33
|
# %s (estimated).
|
|
34
34
|
estimated_label = tr("%s (estimated)")
|
|
35
|
+
# Achieved Independence on August 14th, 1947.
|
|
35
36
|
start_year = 1948
|
|
36
37
|
supported_languages = ("en_PK", "en_US", "ur_PK")
|
|
37
38
|
|
|
@@ -105,8 +106,7 @@ class PAK(Pakistan):
|
|
|
105
106
|
|
|
106
107
|
|
|
107
108
|
class PakistanIslamicHolidays(_CustomIslamicHolidays):
|
|
108
|
-
# https://web.archive.org/web/
|
|
109
|
-
|
|
109
|
+
# https://web.archive.org/web/20250724060822/https://www.timeanddate.com/holidays/pakistan/ashura
|
|
110
110
|
ASHURA_DATES = {
|
|
111
111
|
2005: (FEB, 18),
|
|
112
112
|
2006: (FEB, 8),
|
|
@@ -128,9 +128,10 @@ class PakistanIslamicHolidays(_CustomIslamicHolidays):
|
|
|
128
128
|
2022: (AUG, 9),
|
|
129
129
|
2023: (JUL, 28),
|
|
130
130
|
2024: (JUL, 16),
|
|
131
|
+
2025: (JUL, 6),
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
# https://web.archive.org/web/
|
|
134
|
+
# https://web.archive.org/web/20250724060629/https://www.timeanddate.com/holidays/pakistan/eid-ul-azha
|
|
134
135
|
EID_AL_ADHA_DATES = {
|
|
135
136
|
2005: (JAN, 21),
|
|
136
137
|
2006: ((JAN, 10), (DEC, 31)),
|
|
@@ -152,9 +153,10 @@ class PakistanIslamicHolidays(_CustomIslamicHolidays):
|
|
|
152
153
|
2022: (JUL, 10),
|
|
153
154
|
2023: (JUN, 29),
|
|
154
155
|
2024: (JUN, 17),
|
|
156
|
+
2025: (JUN, 7),
|
|
155
157
|
}
|
|
156
158
|
|
|
157
|
-
# https://web.archive.org/web/
|
|
159
|
+
# https://web.archive.org/web/20250724060834/https://www.timeanddate.com/holidays/pakistan/eid-ul-fitr-1
|
|
158
160
|
EID_AL_FITR_DATES = {
|
|
159
161
|
2005: (NOV, 4),
|
|
160
162
|
2006: (OCT, 24),
|
|
@@ -179,7 +181,7 @@ class PakistanIslamicHolidays(_CustomIslamicHolidays):
|
|
|
179
181
|
2025: (MAR, 31),
|
|
180
182
|
}
|
|
181
183
|
|
|
182
|
-
# https://web.archive.org/web/
|
|
184
|
+
# https://web.archive.org/web/20250724061027/https://www.timeanddate.com/holidays/pakistan/eid-milad-un-nabi
|
|
183
185
|
MAWLID_DATES = {
|
|
184
186
|
2005: (APR, 22),
|
|
185
187
|
2006: (APR, 11),
|
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:
|