holidays 0.42__py3-none-any.whl → 0.44__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/__init__.py +1 -1
- holidays/constants.py +1 -0
- holidays/countries/american_samoa.py +6 -0
- holidays/countries/austria.py +82 -9
- holidays/countries/ethiopia.py +70 -44
- holidays/countries/guam.py +6 -0
- holidays/countries/ireland.py +27 -23
- holidays/countries/northern_mariana_islands.py +6 -0
- holidays/countries/portugal.py +1 -1
- holidays/countries/puerto_rico.py +6 -0
- holidays/countries/taiwan.py +114 -24
- holidays/countries/thailand.py +4 -1
- holidays/countries/united_states.py +42 -0
- holidays/countries/united_states_minor_outlying_islands.py +6 -0
- holidays/countries/united_states_virgin_islands.py +6 -0
- holidays/holiday_base.py +32 -14
- holidays/locale/am/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/am/LC_MESSAGES/ET.po +31 -27
- holidays/locale/ar/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/ET.po +31 -27
- holidays/locale/de/LC_MESSAGES/AT.mo +0 -0
- holidays/locale/de/LC_MESSAGES/AT.po +25 -1
- holidays/locale/en_US/LC_MESSAGES/AT.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AT.po +25 -1
- holidays/locale/en_US/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ET.po +38 -34
- holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TW.po +14 -5
- holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TW.po +14 -5
- holidays/locale/uk/LC_MESSAGES/AT.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AT.po +25 -1
- holidays/locale/uk/LC_MESSAGES/CL.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/CL.po +5 -5
- holidays/locale/uk/LC_MESSAGES/LT.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/LT.po +5 -5
- holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/TW.po +15 -6
- holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/zh_TW/LC_MESSAGES/TW.po +14 -5
- holidays/utils.py +2 -2
- holidays-0.44.dist-info/AUTHORS +131 -0
- {holidays-0.42.dist-info → holidays-0.44.dist-info}/METADATA +25 -21
- {holidays-0.42.dist-info → holidays-0.44.dist-info}/RECORD +47 -46
- {holidays-0.42.dist-info → holidays-0.44.dist-info}/LICENSE +0 -0
- {holidays-0.42.dist-info → holidays-0.44.dist-info}/WHEEL +0 -0
- {holidays-0.42.dist-info → holidays-0.44.dist-info}/top_level.txt +0 -0
holidays/__init__.py
CHANGED
holidays/constants.py
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
10
|
# License: MIT (see LICENSE file)
|
|
11
11
|
|
|
12
|
+
from holidays.constants import PUBLIC, UNOFFICIAL
|
|
12
13
|
from holidays.countries.united_states import US
|
|
13
14
|
|
|
14
15
|
|
|
@@ -18,12 +19,17 @@ class HolidaysAS(US):
|
|
|
18
19
|
# https://en.wikipedia.org/wiki/ISO_3166-2:US#Subdivisions_included_in_ISO_3166-1
|
|
19
20
|
|
|
20
21
|
country = "AS"
|
|
22
|
+
supported_categories = (PUBLIC, UNOFFICIAL)
|
|
21
23
|
subdivisions = () # Override US subdivisions.
|
|
22
24
|
|
|
23
25
|
def _populate_public_holidays(self) -> None:
|
|
24
26
|
self.subdiv = "AS"
|
|
25
27
|
super()._populate_public_holidays()
|
|
26
28
|
|
|
29
|
+
def _populate_unofficial_holidays(self) -> None:
|
|
30
|
+
self.subdiv = "AS"
|
|
31
|
+
super()._populate_unofficial_holidays()
|
|
32
|
+
|
|
27
33
|
|
|
28
34
|
class AS(HolidaysAS):
|
|
29
35
|
pass
|
holidays/countries/austria.py
CHANGED
|
@@ -21,16 +21,48 @@ class Austria(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
21
21
|
default_language = "de"
|
|
22
22
|
supported_categories = (BANK, PUBLIC)
|
|
23
23
|
supported_languages = ("de", "en_US", "uk")
|
|
24
|
-
subdivisions = (
|
|
24
|
+
subdivisions = (
|
|
25
|
+
"1", # Burgenland.
|
|
26
|
+
"2", # Kärnten.
|
|
27
|
+
"3", # Niederösterreich.
|
|
28
|
+
"4", # Oberösterreich.
|
|
29
|
+
"5", # Salzburg.
|
|
30
|
+
"6", # Steiermark.
|
|
31
|
+
"7", # Tirol.
|
|
32
|
+
"8", # Vorarlberg.
|
|
33
|
+
"9", # Wien.
|
|
34
|
+
)
|
|
35
|
+
subdivisions_aliases = {
|
|
36
|
+
"Burgenland": "1",
|
|
37
|
+
"Bgld": "1",
|
|
38
|
+
"B": "1",
|
|
39
|
+
"Kärnten": "2",
|
|
40
|
+
"Ktn": "2",
|
|
41
|
+
"K": "2",
|
|
42
|
+
"Niederösterreich": "3",
|
|
43
|
+
"NÖ": "3",
|
|
44
|
+
"N": "3",
|
|
45
|
+
"Oberösterreich": "4",
|
|
46
|
+
"OÖ": "4",
|
|
47
|
+
"O": "4",
|
|
48
|
+
"Salzburg": "5",
|
|
49
|
+
"Sbg": "5",
|
|
50
|
+
"S": "5",
|
|
51
|
+
"Steiermark": "6",
|
|
52
|
+
"Stmk": "6",
|
|
53
|
+
"St": "6",
|
|
54
|
+
"Tirol": "7",
|
|
55
|
+
"T": "7",
|
|
56
|
+
"Vorarlberg": "8",
|
|
57
|
+
"Vbg": "8",
|
|
58
|
+
"V": "8",
|
|
59
|
+
"Wien": "9",
|
|
60
|
+
"W": "9",
|
|
61
|
+
}
|
|
25
62
|
|
|
26
63
|
def __init__(self, *args, **kwargs) -> None:
|
|
27
64
|
ChristianHolidays.__init__(self)
|
|
28
65
|
InternationalHolidays.__init__(self)
|
|
29
|
-
|
|
30
|
-
# Set the default subdivision.
|
|
31
|
-
if not kwargs.get("subdiv", kwargs.get("state")):
|
|
32
|
-
kwargs["subdiv"] = "9"
|
|
33
|
-
|
|
34
66
|
super().__init__(*args, **kwargs)
|
|
35
67
|
|
|
36
68
|
def _populate_public_holidays(self):
|
|
@@ -58,11 +90,12 @@ class Austria(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
58
90
|
# Assumption Day.
|
|
59
91
|
self._add_assumption_of_mary_day(tr("Mariä Himmelfahrt"))
|
|
60
92
|
|
|
93
|
+
# National Day.
|
|
94
|
+
national_day = tr("Nationalfeiertag")
|
|
61
95
|
if 1919 <= self._year <= 1934:
|
|
62
|
-
|
|
63
|
-
self._add_holiday_nov_12(tr("Nationalfeiertag"))
|
|
96
|
+
self._add_holiday_nov_12(national_day)
|
|
64
97
|
if self._year >= 1967:
|
|
65
|
-
self._add_holiday_oct_26(
|
|
98
|
+
self._add_holiday_oct_26(national_day)
|
|
66
99
|
|
|
67
100
|
# All Saints' Day.
|
|
68
101
|
self._add_all_saints_day(tr("Allerheiligen"))
|
|
@@ -86,6 +119,46 @@ class Austria(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
86
119
|
# New Year's Eve.
|
|
87
120
|
self._add_new_years_eve(tr("Silvester"))
|
|
88
121
|
|
|
122
|
+
def _populate_subdiv_1_bank_holidays(self):
|
|
123
|
+
# St. Martin's Day.
|
|
124
|
+
self._add_holiday_nov_11(tr("Hl. Martin"))
|
|
125
|
+
|
|
126
|
+
def _populate_subdiv_2_bank_holidays(self):
|
|
127
|
+
# St. Joseph's Day.
|
|
128
|
+
self._add_saint_josephs_day(tr("Hl. Josef"))
|
|
129
|
+
|
|
130
|
+
# 1920 Carinthian plebiscite.
|
|
131
|
+
self._add_holiday_oct_10(tr("Tag der Volksabstimmung"))
|
|
132
|
+
|
|
133
|
+
def _populate_subdiv_3_bank_holidays(self):
|
|
134
|
+
# St. Leopold's Day.
|
|
135
|
+
self._add_holiday_nov_15(tr("Hl. Leopold"))
|
|
136
|
+
|
|
137
|
+
def _populate_subdiv_4_bank_holidays(self):
|
|
138
|
+
if self._year >= 2004:
|
|
139
|
+
# St. Florian's Day.
|
|
140
|
+
self._add_holiday_may_4(tr("Hl. Florian"))
|
|
141
|
+
|
|
142
|
+
def _populate_subdiv_5_bank_holidays(self):
|
|
143
|
+
# St. Rupert's Day.
|
|
144
|
+
self._add_holiday_sep_24(tr("Hl. Rupert"))
|
|
145
|
+
|
|
146
|
+
def _populate_subdiv_6_bank_holidays(self):
|
|
147
|
+
# St. Joseph's Day.
|
|
148
|
+
self._add_saint_josephs_day(tr("Hl. Josef"))
|
|
149
|
+
|
|
150
|
+
def _populate_subdiv_7_bank_holidays(self):
|
|
151
|
+
# St. Joseph's Day.
|
|
152
|
+
self._add_saint_josephs_day(tr("Hl. Josef"))
|
|
153
|
+
|
|
154
|
+
def _populate_subdiv_8_bank_holidays(self):
|
|
155
|
+
# St. Joseph's Day.
|
|
156
|
+
self._add_saint_josephs_day(tr("Hl. Josef"))
|
|
157
|
+
|
|
158
|
+
def _populate_subdiv_9_bank_holidays(self):
|
|
159
|
+
# St. Leopold's Day.
|
|
160
|
+
self._add_holiday_nov_15(tr("Hl. Leopold"))
|
|
161
|
+
|
|
89
162
|
|
|
90
163
|
class AT(Austria):
|
|
91
164
|
pass
|
holidays/countries/ethiopia.py
CHANGED
|
@@ -12,13 +12,19 @@
|
|
|
12
12
|
from calendar import isleap
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
|
-
from holidays.calendars
|
|
15
|
+
from holidays.calendars import _CustomIslamicHolidays
|
|
16
|
+
from holidays.calendars.gregorian import JAN, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV
|
|
16
17
|
from holidays.calendars.julian import JULIAN_CALENDAR
|
|
17
18
|
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
18
19
|
from holidays.holiday_base import HolidayBase
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
23
|
+
"""
|
|
24
|
+
References:
|
|
25
|
+
- https://en.wikipedia.org/wiki/Public_holidays_in_Ethiopia
|
|
26
|
+
"""
|
|
27
|
+
|
|
22
28
|
country = "ET"
|
|
23
29
|
default_language = "am"
|
|
24
30
|
# %s (estimated).
|
|
@@ -27,80 +33,71 @@ class Ethiopia(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHol
|
|
|
27
33
|
|
|
28
34
|
def _is_leap_year(self):
|
|
29
35
|
"""
|
|
30
|
-
Ethiopian leap years are coincident with leap years in the Gregorian
|
|
31
|
-
|
|
32
|
-
year
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function we intentionally add 1 to the leap year to offset the
|
|
36
|
-
difference.
|
|
36
|
+
Ethiopian leap years are coincident with leap years in the Gregorian calendar until
|
|
37
|
+
the end of February 2100. It starts earlier from new year of western calendar.
|
|
38
|
+
Ethiopian leap year starts on Sep 11, so it has an effect on holidays between
|
|
39
|
+
Sep 11 and Jan 1. Therefore, here on the following function we intentionally add 1
|
|
40
|
+
to the leap year to offset the difference.
|
|
37
41
|
"""
|
|
38
42
|
return isleap(self._year + 1)
|
|
39
43
|
|
|
40
44
|
def __init__(self, *args, **kwargs):
|
|
41
45
|
ChristianHolidays.__init__(self, JULIAN_CALENDAR)
|
|
42
46
|
InternationalHolidays.__init__(self)
|
|
43
|
-
IslamicHolidays.__init__(self)
|
|
47
|
+
IslamicHolidays.__init__(self, EthiopiaIslamicHolidays)
|
|
44
48
|
super().__init__(*args, **kwargs)
|
|
45
49
|
|
|
46
50
|
def _populate_public_holidays(self):
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Tigrinya, while in Amharic,
|
|
50
|
-
# the official language of Ethiopia it is called Enkutatash.
|
|
51
|
-
# It occurs on September 11 in the Gregorian Calendar;
|
|
52
|
-
# except for the year preceding a leap year, when it occurs on
|
|
53
|
-
# September 12.
|
|
54
|
-
|
|
55
|
-
# Ethiopian New Year.
|
|
56
|
-
self._add_holiday(tr("አዲስ ዓመት እንቁጣጣሽ"), SEP, 12 if self._is_leap_year() else 11)
|
|
57
|
-
|
|
58
|
-
# Finding of True Cross.
|
|
59
|
-
self._add_holiday(tr("መስቀል"), SEP, 28 if self._is_leap_year() else 27)
|
|
51
|
+
if self._year <= 1897:
|
|
52
|
+
return None
|
|
60
53
|
|
|
61
|
-
#
|
|
54
|
+
# Christmas Day.
|
|
62
55
|
self._add_christmas_day(tr("ገና"))
|
|
63
56
|
|
|
64
|
-
#
|
|
65
|
-
self.
|
|
57
|
+
# Epiphany.
|
|
58
|
+
self._add_holiday(tr("ጥምቀት"), JAN, 20 if super()._is_leap_year() else 19)
|
|
66
59
|
|
|
67
|
-
#
|
|
60
|
+
# Adwa Victory Day.
|
|
61
|
+
self._add_holiday_mar_2(tr("አድዋ"))
|
|
62
|
+
|
|
63
|
+
# Good Friday.
|
|
68
64
|
self._add_good_friday(tr("ስቅለት"))
|
|
69
65
|
|
|
70
|
-
#
|
|
66
|
+
# Easter Sunday.
|
|
71
67
|
self._add_easter_sunday(tr("ፋሲካ"))
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
# Adwa Victory Day.
|
|
75
|
-
self._add_holiday_mar_2(tr("አድዋ"))
|
|
76
|
-
|
|
77
|
-
# Labor Day.
|
|
69
|
+
# Workers' Day.
|
|
78
70
|
self._add_labor_day(tr("የሰራተኞች ቀን"))
|
|
79
71
|
|
|
80
|
-
if self._year
|
|
81
|
-
# Patriots Day.
|
|
72
|
+
if self._year >= 1942:
|
|
73
|
+
# Patriots' Day.
|
|
82
74
|
self._add_holiday_may_5(tr("የአርበኞች ቀን"))
|
|
83
75
|
|
|
84
|
-
if self._year
|
|
76
|
+
if self._year >= 1992:
|
|
85
77
|
# Downfall of Dergue Regime Day.
|
|
86
78
|
self._add_holiday_may_28(tr("ደርግ የወደቀበት ቀን"))
|
|
87
79
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
# Ethiopian New Year.
|
|
81
|
+
self._add_holiday(tr("እንቁጣጣሽ"), SEP, 12 if self._is_leap_year() else 11)
|
|
82
|
+
|
|
83
|
+
# Finding of True Cross.
|
|
84
|
+
self._add_holiday(tr("መስቀል"), SEP, 28 if self._is_leap_year() else 27)
|
|
85
|
+
|
|
86
|
+
if 1975 <= self._year <= 1990:
|
|
87
|
+
# Revolution Day.
|
|
88
|
+
self._add_holiday(tr("የአብዮት ቀን"), SEP, 13 if self._is_leap_year() else 12)
|
|
89
|
+
|
|
90
|
+
# October Revolution Day.
|
|
91
|
+
self._add_holiday_nov_7(tr("የጥቅምት አብዮት ቀን"))
|
|
91
92
|
|
|
92
93
|
# Eid al-Fitr.
|
|
93
94
|
self._add_eid_al_fitr_day(tr("ኢድ አልፈጥር"))
|
|
94
95
|
|
|
95
96
|
# Eid al-Adha.
|
|
96
|
-
|
|
97
|
-
self._add_eid_al_adha_day(name)
|
|
98
|
-
self._add_eid_al_adha_day_two(name)
|
|
97
|
+
self._add_eid_al_adha_day(tr("አረፋ"))
|
|
99
98
|
|
|
100
99
|
# Prophet's Birthday.
|
|
101
|
-
|
|
102
|
-
self._add_mawlid_day(name)
|
|
103
|
-
self._add_mawlid_day_two(name)
|
|
100
|
+
self._add_mawlid_day(tr("መውሊድ"))
|
|
104
101
|
|
|
105
102
|
|
|
106
103
|
class ET(Ethiopia):
|
|
@@ -109,3 +106,32 @@ class ET(Ethiopia):
|
|
|
109
106
|
|
|
110
107
|
class ETH(Ethiopia):
|
|
111
108
|
pass
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class EthiopiaIslamicHolidays(_CustomIslamicHolidays):
|
|
112
|
+
EID_AL_ADHA_DATES = {
|
|
113
|
+
2018: (AUG, 22),
|
|
114
|
+
2019: (AUG, 11),
|
|
115
|
+
2020: (JUL, 31),
|
|
116
|
+
2021: (JUL, 20),
|
|
117
|
+
2022: (JUL, 9),
|
|
118
|
+
2023: (JUN, 28),
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
EID_AL_FITR_DATES = {
|
|
122
|
+
2018: (JUN, 15),
|
|
123
|
+
2019: (JUN, 4),
|
|
124
|
+
2020: (MAY, 24),
|
|
125
|
+
2021: (MAY, 13),
|
|
126
|
+
2022: (MAY, 2),
|
|
127
|
+
2023: (APR, 21),
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
MAWLID_DATES = {
|
|
131
|
+
2018: (NOV, 21),
|
|
132
|
+
2019: (NOV, 10),
|
|
133
|
+
2020: (OCT, 29),
|
|
134
|
+
2021: (OCT, 18),
|
|
135
|
+
2022: (OCT, 8),
|
|
136
|
+
2023: (SEP, 27),
|
|
137
|
+
}
|
holidays/countries/guam.py
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
10
|
# License: MIT (see LICENSE file)
|
|
11
11
|
|
|
12
|
+
from holidays.constants import PUBLIC, UNOFFICIAL
|
|
12
13
|
from holidays.countries.united_states import US
|
|
13
14
|
|
|
14
15
|
|
|
@@ -18,12 +19,17 @@ class HolidaysGU(US):
|
|
|
18
19
|
# https://en.wikipedia.org/wiki/ISO_3166-2:US#Subdivisions_included_in_ISO_3166-1
|
|
19
20
|
|
|
20
21
|
country = "GU"
|
|
22
|
+
supported_categories = (PUBLIC, UNOFFICIAL)
|
|
21
23
|
subdivisions = () # Override US subdivisions.
|
|
22
24
|
|
|
23
25
|
def _populate_public_holidays(self) -> None:
|
|
24
26
|
self.subdiv = "GU"
|
|
25
27
|
super()._populate_public_holidays()
|
|
26
28
|
|
|
29
|
+
def _populate_unofficial_holidays(self) -> None:
|
|
30
|
+
self.subdiv = "GU"
|
|
31
|
+
super()._populate_unofficial_holidays()
|
|
32
|
+
|
|
27
33
|
|
|
28
34
|
class GU(HolidaysGU):
|
|
29
35
|
pass
|
holidays/countries/ireland.py
CHANGED
|
@@ -9,35 +9,33 @@
|
|
|
9
9
|
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
10
|
# License: MIT (see LICENSE file)
|
|
11
11
|
|
|
12
|
-
from holidays.calendars.gregorian import FEB, MAR
|
|
12
|
+
from holidays.calendars.gregorian import FEB, MAR, SEP, DEC
|
|
13
13
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
14
|
-
from holidays.
|
|
15
|
-
ObservedHolidayBase,
|
|
16
|
-
SAT_SUN_TO_NEXT_MON,
|
|
17
|
-
SAT_SUN_TO_NEXT_MON_TUE,
|
|
18
|
-
)
|
|
14
|
+
from holidays.holiday_base import HolidayBase
|
|
19
15
|
|
|
20
16
|
|
|
21
|
-
class Ireland(
|
|
17
|
+
class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
22
18
|
"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
References:
|
|
20
|
+
- https://en.wikipedia.org/wiki/Public_holidays_in_the_Republic_of_Ireland
|
|
21
|
+
- https://www.citizensinformation.ie/en/employment/employment_rights_and_conditions/leave_and_holidays/public_holidays_in_ireland.html # noqa: E501
|
|
26
22
|
"""
|
|
27
23
|
|
|
28
24
|
country = "IE"
|
|
29
|
-
observed_label = "%s (observed)"
|
|
30
25
|
|
|
31
26
|
def __init__(self, *args, **kwargs):
|
|
32
27
|
ChristianHolidays.__init__(self)
|
|
33
28
|
InternationalHolidays.__init__(self)
|
|
34
29
|
StaticHolidays.__init__(self, IrelandStaticHolidays)
|
|
35
|
-
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
36
30
|
super().__init__(*args, **kwargs)
|
|
37
31
|
|
|
38
32
|
def _populate_public_holidays(self):
|
|
33
|
+
if self._year <= 1871:
|
|
34
|
+
return None
|
|
35
|
+
|
|
39
36
|
# New Year's Day.
|
|
40
|
-
self.
|
|
37
|
+
if self._year >= 1975:
|
|
38
|
+
self._add_new_years_day("New Year's Day")
|
|
41
39
|
|
|
42
40
|
# St. Brigid's Day.
|
|
43
41
|
if self._year >= 2023:
|
|
@@ -48,35 +46,39 @@ class Ireland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
|
|
|
48
46
|
self._add_holiday_1st_mon_from_feb_1(name)
|
|
49
47
|
|
|
50
48
|
# St. Patrick's Day.
|
|
51
|
-
self.
|
|
49
|
+
if self._year >= 1903:
|
|
50
|
+
self._add_holiday_mar_17("St. Patrick's Day")
|
|
52
51
|
|
|
53
52
|
# Easter Monday.
|
|
54
53
|
self._add_easter_monday("Easter Monday")
|
|
55
54
|
|
|
56
55
|
# May Day.
|
|
57
|
-
if self._year >=
|
|
56
|
+
if self._year >= 1994:
|
|
58
57
|
name = "May Day"
|
|
59
58
|
if self._year == 1995:
|
|
60
59
|
self._add_holiday_may_8(name)
|
|
61
60
|
else:
|
|
62
61
|
self._add_holiday_1st_mon_of_may(name)
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
if self._year >= 1973:
|
|
64
|
+
# June Bank Holiday.
|
|
65
|
+
self._add_holiday_1st_mon_of_jun("June Bank Holiday")
|
|
66
|
+
else:
|
|
67
|
+
# Whit Monday.
|
|
68
|
+
self._add_whit_monday("Whit Monday")
|
|
66
69
|
|
|
67
|
-
#
|
|
70
|
+
# August Bank Holiday.
|
|
68
71
|
self._add_holiday_1st_mon_of_aug("August Bank Holiday")
|
|
69
72
|
|
|
70
73
|
# October Bank Holiday.
|
|
71
|
-
self.
|
|
74
|
+
if self._year >= 1977:
|
|
75
|
+
self._add_holiday_last_mon_of_oct("October Bank Holiday")
|
|
72
76
|
|
|
73
77
|
# Christmas Day.
|
|
74
|
-
self.
|
|
78
|
+
self._add_christmas_day("Christmas Day")
|
|
75
79
|
|
|
76
80
|
# St. Stephen's Day.
|
|
77
|
-
self.
|
|
78
|
-
self._add_christmas_day_two("St. Stephen's Day"), rule=SAT_SUN_TO_NEXT_MON_TUE
|
|
79
|
-
)
|
|
81
|
+
self._add_christmas_day_two("St. Stephen's Day")
|
|
80
82
|
|
|
81
83
|
|
|
82
84
|
class IE(Ireland):
|
|
@@ -89,5 +91,7 @@ class IRL(Ireland):
|
|
|
89
91
|
|
|
90
92
|
class IrelandStaticHolidays:
|
|
91
93
|
special_public_holidays = {
|
|
94
|
+
1999: (DEC, 31, "Millennium Celebrations"),
|
|
95
|
+
2011: (SEP, 14, "National Day of Mourning"),
|
|
92
96
|
2022: (MAR, 18, "Day of Remembrance and Recognition"),
|
|
93
97
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
10
|
# License: MIT (see LICENSE file)
|
|
11
11
|
|
|
12
|
+
from holidays.constants import PUBLIC, UNOFFICIAL
|
|
12
13
|
from holidays.countries.united_states import US
|
|
13
14
|
|
|
14
15
|
|
|
@@ -18,12 +19,17 @@ class HolidaysMP(US):
|
|
|
18
19
|
# https://en.wikipedia.org/wiki/ISO_3166-2:US#Subdivisions_included_in_ISO_3166-1
|
|
19
20
|
|
|
20
21
|
country = "MP"
|
|
22
|
+
supported_categories = (PUBLIC, UNOFFICIAL)
|
|
21
23
|
subdivisions = () # Override US subdivisions.
|
|
22
24
|
|
|
23
25
|
def _populate_public_holidays(self) -> None:
|
|
24
26
|
self.subdiv = "MP"
|
|
25
27
|
super()._populate_public_holidays()
|
|
26
28
|
|
|
29
|
+
def _populate_unofficial_holidays(self) -> None:
|
|
30
|
+
self.subdiv = "MP"
|
|
31
|
+
super()._populate_unofficial_holidays()
|
|
32
|
+
|
|
27
33
|
|
|
28
34
|
class MP(HolidaysMP):
|
|
29
35
|
pass
|
holidays/countries/portugal.py
CHANGED
|
@@ -145,7 +145,7 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
145
145
|
# - get Holidays that occur on Thursday and add Friday (+1 day)
|
|
146
146
|
|
|
147
147
|
# Carnival.
|
|
148
|
-
self.
|
|
148
|
+
self._add_carnival_tuesday(tr("Carnaval"))
|
|
149
149
|
|
|
150
150
|
# St. Anthony's Day.
|
|
151
151
|
self._add_holiday_jun_13(tr("Dia de Santo António"))
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
# Website: https://github.com/dr-prodigy/python-holidays
|
|
10
10
|
# License: MIT (see LICENSE file)
|
|
11
11
|
|
|
12
|
+
from holidays.constants import PUBLIC, UNOFFICIAL
|
|
12
13
|
from holidays.countries.united_states import US
|
|
13
14
|
|
|
14
15
|
|
|
@@ -18,12 +19,17 @@ class HolidaysPR(US):
|
|
|
18
19
|
# https://en.wikipedia.org/wiki/ISO_3166-2:US#Subdivisions_included_in_ISO_3166-1
|
|
19
20
|
|
|
20
21
|
country = "PR"
|
|
22
|
+
supported_categories = (PUBLIC, UNOFFICIAL)
|
|
21
23
|
subdivisions = () # Override US subdivisions.
|
|
22
24
|
|
|
23
25
|
def _populate_public_holidays(self) -> None:
|
|
24
26
|
self.subdiv = "PR"
|
|
25
27
|
super()._populate_public_holidays()
|
|
26
28
|
|
|
29
|
+
def _populate_unofficial_holidays(self) -> None:
|
|
30
|
+
self.subdiv = "PR"
|
|
31
|
+
super()._populate_unofficial_holidays()
|
|
32
|
+
|
|
27
33
|
|
|
28
34
|
class PR(HolidaysPR):
|
|
29
35
|
pass
|