holidays 0.46__py3-none-any.whl → 0.48__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/calendars/gregorian.py +9 -0
- holidays/countries/__init__.py +2 -0
- holidays/countries/andorra.py +18 -20
- holidays/countries/australia.py +19 -4
- holidays/countries/azerbaijan.py +1 -0
- holidays/countries/belgium.py +1 -2
- holidays/countries/bolivia.py +1 -2
- holidays/countries/bosnia_and_herzegovina.py +1 -0
- holidays/countries/botswana.py +5 -8
- holidays/countries/brazil.py +1 -2
- holidays/countries/brunei.py +1 -0
- holidays/countries/burkina_faso.py +1 -0
- holidays/countries/cameroon.py +1 -0
- holidays/countries/chad.py +1 -0
- holidays/countries/chile.py +6 -6
- holidays/countries/colombia.py +1 -2
- holidays/countries/cyprus.py +1 -2
- holidays/countries/denmark.py +1 -2
- holidays/countries/ethiopia.py +1 -0
- holidays/countries/finland.py +1 -1
- holidays/countries/france.py +1 -2
- holidays/countries/gabon.py +1 -0
- holidays/countries/greece.py +11 -6
- holidays/countries/honduras.py +3 -4
- holidays/countries/indonesia.py +1 -0
- holidays/countries/jordan.py +81 -0
- holidays/countries/latvia.py +4 -5
- holidays/countries/moldova.py +1 -2
- holidays/countries/new_zealand.py +5 -6
- holidays/countries/pakistan.py +1 -0
- holidays/countries/palau.py +127 -0
- holidays/countries/poland.py +1 -2
- holidays/countries/portugal.py +2 -6
- holidays/countries/south_africa.py +2 -0
- holidays/countries/south_korea.py +1 -1
- holidays/countries/tanzania.py +1 -0
- holidays/countries/timor_leste.py +24 -1
- holidays/countries/united_arab_emirates.py +1 -0
- holidays/countries/united_states.py +1 -1
- holidays/countries/uruguay.py +3 -4
- holidays/countries/uzbekistan.py +1 -0
- holidays/financial/european_central_bank.py +17 -3
- holidays/groups/international.py +10 -0
- holidays/holiday_base.py +129 -65
- holidays/locale/ar/LC_MESSAGES/JO.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/JO.po +79 -0
- holidays/locale/en_US/LC_MESSAGES/JO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/JO.po +79 -0
- holidays/registry.py +2 -0
- {holidays-0.46.dist-info → holidays-0.48.dist-info}/AUTHORS +1 -0
- {holidays-0.46.dist-info → holidays-0.48.dist-info}/METADATA +28 -18
- {holidays-0.46.dist-info → holidays-0.48.dist-info}/RECORD +56 -50
- {holidays-0.46.dist-info → holidays-0.48.dist-info}/LICENSE +0 -0
- {holidays-0.46.dist-info → holidays-0.48.dist-info}/WHEEL +0 -0
- {holidays-0.46.dist-info → holidays-0.48.dist-info}/top_level.txt +0 -0
holidays/__init__.py
CHANGED
holidays/calendars/gregorian.py
CHANGED
|
@@ -20,6 +20,15 @@ WEEKEND = (SAT, SUN)
|
|
|
20
20
|
|
|
21
21
|
JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC = range(1, 13)
|
|
22
22
|
|
|
23
|
+
DAYS = set(str(d) for d in range(1, 32))
|
|
24
|
+
MONTHS = {
|
|
25
|
+
m: i
|
|
26
|
+
for i, m in enumerate(
|
|
27
|
+
("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"), 1
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
WEEKDAYS = {w: i for i, w in enumerate(("mon", "tue", "wed", "thu", "fri", "sat", "sun"))}
|
|
31
|
+
|
|
23
32
|
|
|
24
33
|
def _get_nth_weekday_from(n: int, weekday: int, from_dt: date) -> date:
|
|
25
34
|
"""
|
holidays/countries/__init__.py
CHANGED
|
@@ -83,6 +83,7 @@ from .italy import Italy, IT, ITA
|
|
|
83
83
|
from .jamaica import Jamaica, JM, JAM
|
|
84
84
|
from .japan import Japan, JP, JPN
|
|
85
85
|
from .jersey import Jersey, JE, JEY
|
|
86
|
+
from .jordan import Jordan, JO, JOR
|
|
86
87
|
from .kazakhstan import Kazakhstan, KZ, KAZ
|
|
87
88
|
from .kenya import Kenya, KE, KEN
|
|
88
89
|
from .kuwait import Kuwait, KW, KWT
|
|
@@ -114,6 +115,7 @@ from .north_macedonia import NorthMacedonia, MK, MKD
|
|
|
114
115
|
from .northern_mariana_islands import NorthernMarianaIslands, MP, MNP, HolidaysMP
|
|
115
116
|
from .norway import Norway, NO, NOR
|
|
116
117
|
from .pakistan import Pakistan, PK, PAK
|
|
118
|
+
from .palau import Palau, PW, PLW
|
|
117
119
|
from .panama import Panama, PA, PAN
|
|
118
120
|
from .papua_new_guinea import PapuaNewGuinea, PG, PNG
|
|
119
121
|
from .paraguay import Paraguay, PY, PRY
|
holidays/countries/andorra.py
CHANGED
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
|
-
|
|
15
13
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
16
14
|
from holidays.holiday_base import HolidayBase
|
|
17
15
|
|
|
@@ -85,48 +83,48 @@ class Andorra(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
85
83
|
# Canillo.
|
|
86
84
|
def _populate_subdiv_02_public_holidays(self):
|
|
87
85
|
name = "Canillo Annual Festival"
|
|
88
|
-
|
|
89
|
-
self.
|
|
90
|
-
self.
|
|
86
|
+
self._add_holiday_3rd_sat_of_jul(name)
|
|
87
|
+
self._add_holiday_1_day_past_3rd_sat_of_jul(name)
|
|
88
|
+
self._add_holiday_2_days_past_3rd_sat_of_jul(name)
|
|
91
89
|
|
|
92
90
|
# Encamp.
|
|
93
91
|
def _populate_subdiv_03_public_holidays(self):
|
|
94
92
|
name = "Encamp Annual Festival"
|
|
95
|
-
|
|
96
|
-
self.
|
|
93
|
+
self._add_holiday_aug_15(name)
|
|
94
|
+
self._add_holiday_aug_16(name)
|
|
97
95
|
|
|
98
96
|
# La Massana.
|
|
99
97
|
def _populate_subdiv_04_public_holidays(self):
|
|
100
98
|
name = "La Massana Annual Festival"
|
|
101
|
-
|
|
102
|
-
self.
|
|
99
|
+
self._add_holiday_aug_15(name)
|
|
100
|
+
self._add_holiday_aug_16(name)
|
|
103
101
|
|
|
104
102
|
# Ordino.
|
|
105
103
|
def _populate_subdiv_05_public_holidays(self):
|
|
106
104
|
name = "Ordino Annual Festival"
|
|
107
|
-
|
|
108
|
-
self.
|
|
105
|
+
self._add_holiday_aug_15(name)
|
|
106
|
+
self._add_holiday_aug_16(name)
|
|
109
107
|
|
|
110
108
|
# Sant Julià de Lòria.
|
|
111
109
|
def _populate_subdiv_06_public_holidays(self):
|
|
112
110
|
name = "Sant Julià de Lòria Annual Festival"
|
|
113
|
-
|
|
114
|
-
self.
|
|
115
|
-
self.
|
|
116
|
-
self.
|
|
111
|
+
self._add_holiday_1st_fri_before_jul_29(name)
|
|
112
|
+
self._add_holiday_1st_sat_before_jul_30(name)
|
|
113
|
+
self._add_holiday_1st_sun_before_jul_31(name)
|
|
114
|
+
self._add_holiday_1st_mon_before_aug_1(name)
|
|
117
115
|
|
|
118
116
|
# Andorra la Vella.
|
|
119
117
|
def _populate_subdiv_07_public_holidays(self):
|
|
120
118
|
name = "Andorra la Vella Annual Festival"
|
|
121
|
-
|
|
122
|
-
self.
|
|
123
|
-
self.
|
|
119
|
+
self._add_holiday_1st_sat_of_aug(name)
|
|
120
|
+
self._add_holiday_1_day_past_1st_sat_of_aug(name)
|
|
121
|
+
self._add_holiday_2_days_past_1st_sat_of_aug(name)
|
|
124
122
|
|
|
125
123
|
# Escaldes-Engordany.
|
|
126
124
|
def _populate_subdiv_08_public_holidays(self):
|
|
127
125
|
name = "Escaldes-Engordany Annual Festival"
|
|
128
|
-
|
|
129
|
-
self.
|
|
126
|
+
self._add_holiday_jul_25(name)
|
|
127
|
+
self._add_holiday_jul_26(name)
|
|
130
128
|
|
|
131
129
|
|
|
132
130
|
class AD(Andorra):
|
holidays/countries/australia.py
CHANGED
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
|
-
|
|
15
13
|
from holidays.calendars.gregorian import JAN, APR, JUN, AUG, SEP, OCT, DEC
|
|
16
14
|
from holidays.constants import BANK, HALF_DAY, PUBLIC
|
|
17
15
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
@@ -698,7 +696,7 @@ class Australia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
|
|
|
698
696
|
|
|
699
697
|
# Easter Tuesday.
|
|
700
698
|
if self._year <= 2010:
|
|
701
|
-
self.
|
|
699
|
+
self._add_holiday_2_days_past_easter("Easter Tuesday")
|
|
702
700
|
|
|
703
701
|
# ANZAC Day.
|
|
704
702
|
if self._year >= 1921:
|
|
@@ -891,7 +889,19 @@ class Australia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
|
|
|
891
889
|
# Sovereign's Birthday.
|
|
892
890
|
if self._year >= 1936:
|
|
893
891
|
if self._year >= 1984:
|
|
894
|
-
|
|
892
|
+
# Celebration Day for the Anniversary of the Birthday of the Reigning Sovereign
|
|
893
|
+
# to be appointed for each year by proclamation published in the Government Gazette
|
|
894
|
+
sovereign_birthday_dates = {
|
|
895
|
+
2011: (OCT, 28),
|
|
896
|
+
2012: (OCT, 1),
|
|
897
|
+
2024: (SEP, 23),
|
|
898
|
+
}
|
|
899
|
+
if self._year in sovereign_birthday_dates:
|
|
900
|
+
self._add_holiday(
|
|
901
|
+
self.sovereign_birthday, sovereign_birthday_dates[self._year]
|
|
902
|
+
)
|
|
903
|
+
else:
|
|
904
|
+
self._add_holiday_last_mon_of_sep(self.sovereign_birthday)
|
|
895
905
|
else:
|
|
896
906
|
self._add_holiday_2nd_mon_of_oct(self.sovereign_birthday)
|
|
897
907
|
|
|
@@ -945,3 +955,8 @@ class AustraliaStaticHolidays:
|
|
|
945
955
|
2010: (DEC, 28, "Christmas Day"),
|
|
946
956
|
2011: (JAN, 3, "New Year's Day"),
|
|
947
957
|
}
|
|
958
|
+
|
|
959
|
+
special_wa_public_holidays = {
|
|
960
|
+
# In 2011 both ANZAC Day and Easter Monday fell on Monday 25 April.
|
|
961
|
+
2011: (APR, 26, "Special public holiday"),
|
|
962
|
+
}
|
holidays/countries/azerbaijan.py
CHANGED
holidays/countries/belgium.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.constants import BANK, PUBLIC
|
|
@@ -78,7 +77,7 @@ class Belgium(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
78
77
|
self._add_good_friday(tr("Goede Vrijdag"))
|
|
79
78
|
|
|
80
79
|
# Friday after Ascension Day.
|
|
81
|
-
self.
|
|
80
|
+
self._add_holiday_40_days_past_easter(tr("Vrijdag na O. L. H. Hemelvaart"))
|
|
82
81
|
|
|
83
82
|
# Bank Holiday.
|
|
84
83
|
self._add_christmas_day_two(tr("Banksluitingsdag"))
|
holidays/countries/bolivia.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
@@ -147,7 +146,7 @@ class Bolivia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
147
146
|
|
|
148
147
|
def _populate_subdiv_o_public_holidays(self):
|
|
149
148
|
# Carnival in Oruro.
|
|
150
|
-
self.
|
|
149
|
+
self._add_holiday_51_days_prior_easter(tr("Carnaval de Oruro"))
|
|
151
150
|
|
|
152
151
|
def _populate_subdiv_s_public_holidays(self):
|
|
153
152
|
# Santa Cruz Day.
|
holidays/countries/botswana.py
CHANGED
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
|
-
|
|
15
13
|
from holidays.calendars.gregorian import JUL
|
|
16
14
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
17
15
|
from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_NEXT_MON, SUN_TO_NEXT_TUE
|
|
@@ -56,18 +54,17 @@ class Botswana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, St
|
|
|
56
54
|
|
|
57
55
|
self._add_observed(self._add_holiday_jul_1("Sir Seretse Khama Day"))
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
self.
|
|
57
|
+
self._add_holiday_3rd_mon_of_jul("President's Day")
|
|
58
|
+
self._add_holiday_1_day_past_3rd_mon_of_jul("President's Day Holiday")
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
self._add_observed(
|
|
64
|
-
self._add_observed(self._add_holiday("Botswana Day Holiday", sep_30 + td(days=+1)))
|
|
60
|
+
self._add_observed(self._add_holiday_sep_30("Botswana Day"), rule=SUN_TO_NEXT_TUE)
|
|
61
|
+
self._add_observed(self._add_holiday_oct_1("Botswana Day Holiday"))
|
|
65
62
|
|
|
66
63
|
self._add_observed(self._add_christmas_day("Christmas Day"), rule=SUN_TO_NEXT_TUE)
|
|
67
64
|
self._add_observed(dec_26 := self._add_christmas_day_two("Boxing Day"))
|
|
68
65
|
|
|
69
66
|
if self.observed and self._year >= 2016 and self._is_saturday(dec_26):
|
|
70
|
-
self.
|
|
67
|
+
self._add_holiday_dec_28("Boxing Day Holiday")
|
|
71
68
|
|
|
72
69
|
|
|
73
70
|
class BW(Botswana):
|
holidays/countries/brazil.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from datetime import date
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.gregorian import JAN, MAR, SEP, NOV, FRI, _get_nth_weekday_from
|
|
@@ -231,7 +230,7 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
231
230
|
def _populate_subdiv_es_public_holidays(self):
|
|
232
231
|
if self._year >= 2020:
|
|
233
232
|
# Our Lady of Penha.
|
|
234
|
-
self.
|
|
233
|
+
self._add_holiday_8_days_past_easter("Nossa Senhora da Penha")
|
|
235
234
|
|
|
236
235
|
def _populate_subdiv_go_public_holidays(self):
|
|
237
236
|
# Foundation of Goiás city.
|
holidays/countries/brunei.py
CHANGED
holidays/countries/cameroon.py
CHANGED
holidays/countries/chad.py
CHANGED
holidays/countries/chile.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
from typing import Tuple
|
|
16
15
|
|
|
@@ -100,11 +99,12 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
100
99
|
self._add_ascension_thursday(tr("Ascensión del Señor"))
|
|
101
100
|
|
|
102
101
|
if self._year <= 1967 or 1987 <= self._year <= 2006:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
self.
|
|
107
|
-
|
|
102
|
+
# Corpus Christi.
|
|
103
|
+
name = tr("Corpus Christi")
|
|
104
|
+
if self._year <= 1999:
|
|
105
|
+
self._add_corpus_christi_day(name)
|
|
106
|
+
else:
|
|
107
|
+
self._add_holiday_57_days_past_easter(name)
|
|
108
108
|
|
|
109
109
|
if self._year >= 1932:
|
|
110
110
|
# Labor Day.
|
holidays/countries/colombia.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
@@ -81,7 +80,7 @@ class Colombia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
81
80
|
if self._year >= 1984:
|
|
82
81
|
self._move_holiday(
|
|
83
82
|
# Sacred Heart.
|
|
84
|
-
self.
|
|
83
|
+
self._add_holiday_68_days_past_easter(tr("Sagrado Corazón"))
|
|
85
84
|
)
|
|
86
85
|
|
|
87
86
|
if self._year >= 1951:
|
holidays/countries/cyprus.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR
|
|
@@ -93,7 +92,7 @@ class Cyprus(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
93
92
|
return None
|
|
94
93
|
|
|
95
94
|
# Easter Tuesday.
|
|
96
|
-
self.
|
|
95
|
+
self._add_holiday_2_days_past_easter(tr("Τρίτη της Διακαινησίμου"))
|
|
97
96
|
|
|
98
97
|
def _populate_optional_holidays(self):
|
|
99
98
|
if self._year <= 1960:
|
holidays/countries/denmark.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.constants import OPTIONAL, PUBLIC
|
|
@@ -56,7 +55,7 @@ class Denmark(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
56
55
|
|
|
57
56
|
if self._year <= 2023:
|
|
58
57
|
# Great Day of Prayers.
|
|
59
|
-
self.
|
|
58
|
+
self._add_holiday_26_days_past_easter(tr("Store bededag"))
|
|
60
59
|
|
|
61
60
|
# Ascension Day.
|
|
62
61
|
self._add_ascension_thursday(tr("Kristi himmelfartsdag"))
|
holidays/countries/ethiopia.py
CHANGED
holidays/countries/finland.py
CHANGED
|
@@ -57,7 +57,7 @@ class Finland(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
57
57
|
# Ascension Day.
|
|
58
58
|
name = tr("Helatorstai")
|
|
59
59
|
if 1973 <= self._year <= 1990:
|
|
60
|
-
self.
|
|
60
|
+
self._add_holiday_34_days_past_easter(name)
|
|
61
61
|
else:
|
|
62
62
|
self._add_ascension_thursday(name)
|
|
63
63
|
|
holidays/countries/france.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
@@ -158,7 +157,7 @@ class France(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
158
157
|
self._add_good_friday(tr("Vendredi saint"))
|
|
159
158
|
|
|
160
159
|
# Mi-Careme.
|
|
161
|
-
self.
|
|
160
|
+
self._add_holiday_24_days_prior_easter(tr("Mi-Carême"))
|
|
162
161
|
|
|
163
162
|
# Abolition of slavery.
|
|
164
163
|
self._add_holiday_may_27(tr("Abolition de l'esclavage"))
|
holidays/countries/gabon.py
CHANGED
holidays/countries/greece.py
CHANGED
|
@@ -27,7 +27,8 @@ class Greece(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
27
27
|
Greece holidays.
|
|
28
28
|
|
|
29
29
|
References:
|
|
30
|
-
|
|
30
|
+
- https://en.wikipedia.org/wiki/Public_holidays_in_Greece
|
|
31
|
+
- `2024 Labor Day transfer <https://www.et.gr/api/DownloadFeksApi/?fek_pdf=20240201406>`_
|
|
31
32
|
"""
|
|
32
33
|
|
|
33
34
|
country = "GR"
|
|
@@ -66,11 +67,15 @@ class Greece(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
66
67
|
# Whit Monday.
|
|
67
68
|
self._add_whit_monday(tr("Δευτέρα του Αγίου Πνεύματος"))
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
# Labor Day.
|
|
71
|
+
name = tr("Εργατική Πρωτομαγιά")
|
|
72
|
+
if self._year == 2024:
|
|
73
|
+
self._add_holiday_may_7(name)
|
|
74
|
+
else:
|
|
75
|
+
self._add_observed(
|
|
76
|
+
may_1 := self._add_labor_day(name),
|
|
77
|
+
rule=MON_TO_NEXT_TUE if may_1 == easter_monday else SAT_SUN_TO_NEXT_WORKDAY,
|
|
78
|
+
)
|
|
74
79
|
|
|
75
80
|
# Dormition of the Mother of God.
|
|
76
81
|
self._add_assumption_of_mary_day(tr("Κοίμηση της Θεοτόκου"))
|
holidays/countries/honduras.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
@@ -66,9 +65,9 @@ class Honduras(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
66
65
|
# Morazan Weekend.
|
|
67
66
|
name = tr("Semana Morazánica")
|
|
68
67
|
# First Wednesday of October from 12 noon to Saturday 12 noon.
|
|
69
|
-
|
|
70
|
-
self.
|
|
71
|
-
self.
|
|
68
|
+
self._add_holiday_1st_wed_of_oct(name)
|
|
69
|
+
self._add_holiday_1_day_past_1st_wed_of_oct(name)
|
|
70
|
+
self._add_holiday_2_days_past_1st_wed_of_oct(name)
|
|
72
71
|
|
|
73
72
|
# Christmas Day.
|
|
74
73
|
self._add_christmas_day(tr("Navidad"))
|
holidays/countries/indonesia.py
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
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 AUTHORS 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/python-holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
16
|
+
from holidays.holiday_base import HolidayBase
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Jordan(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
|
|
20
|
+
"""
|
|
21
|
+
References:
|
|
22
|
+
- https://en.wikipedia.org/wiki/Public_holidays_in_Jordan
|
|
23
|
+
- https://www.mfa.gov.jo/content/public-holidays
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
country = "JO"
|
|
27
|
+
default_language = "ar"
|
|
28
|
+
# %s (estimated).
|
|
29
|
+
estimated_label = tr("(تقدير) %s")
|
|
30
|
+
supported_languages = ("ar", "en_US")
|
|
31
|
+
|
|
32
|
+
def __init__(self, *args, **kwargs):
|
|
33
|
+
ChristianHolidays.__init__(self)
|
|
34
|
+
InternationalHolidays.__init__(self)
|
|
35
|
+
IslamicHolidays.__init__(self)
|
|
36
|
+
super().__init__(*args, **kwargs)
|
|
37
|
+
|
|
38
|
+
def _populate_public_holidays(self):
|
|
39
|
+
# New Year's Day.
|
|
40
|
+
self._add_new_years_day(tr("رأس السنة الميلادية"))
|
|
41
|
+
|
|
42
|
+
# Labor Day.
|
|
43
|
+
self._add_labor_day(tr("عيد العمال"))
|
|
44
|
+
|
|
45
|
+
# Independence Day.
|
|
46
|
+
self._add_holiday_may_25(tr("عيد الإستقلال"))
|
|
47
|
+
|
|
48
|
+
# Christmas Day.
|
|
49
|
+
self._add_christmas_day(tr("عيد الميلاد المجيد"))
|
|
50
|
+
|
|
51
|
+
# Islamic New Year.
|
|
52
|
+
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))
|
|
53
|
+
|
|
54
|
+
# Prophet's Birthday.
|
|
55
|
+
self._add_mawlid_day(tr("عيد المولد النبوي"))
|
|
56
|
+
|
|
57
|
+
# Isra and Miraj.
|
|
58
|
+
self._add_isra_and_miraj_day(tr("ليلة المعراج"))
|
|
59
|
+
|
|
60
|
+
# Eid al-Fitr.
|
|
61
|
+
self._add_eid_al_fitr_day(tr("عيد الفطر"))
|
|
62
|
+
# Eid al-Fitr Holiday.
|
|
63
|
+
self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر"))
|
|
64
|
+
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))
|
|
65
|
+
|
|
66
|
+
# Arafat Day.
|
|
67
|
+
self._add_arafah_day(tr("يوم عرفة"))
|
|
68
|
+
|
|
69
|
+
# Eid al-Adha.
|
|
70
|
+
self._add_eid_al_adha_day(tr("عيد الأضحى"))
|
|
71
|
+
# Eid al-Adha Holiday.
|
|
72
|
+
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
|
|
73
|
+
self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى"))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class JO(Jordan):
|
|
77
|
+
pass
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class JOR(Jordan):
|
|
81
|
+
pass
|
holidays/countries/latvia.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.gregorian import MAY, JUL, SEP
|
|
@@ -68,11 +67,11 @@ class Latvia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
68
67
|
# Mother's Day.
|
|
69
68
|
self._add_holiday_2nd_sun_of_may(tr("Mātes diena"))
|
|
70
69
|
|
|
71
|
-
# Midsummer Day.
|
|
72
|
-
jun_24 = self._add_saint_johns_day(tr("Jāņu diena"))
|
|
73
|
-
|
|
74
70
|
# Midsummer Eve.
|
|
75
|
-
self.
|
|
71
|
+
self._add_holiday_jun_23(tr("Līgo diena"))
|
|
72
|
+
|
|
73
|
+
# Midsummer Day.
|
|
74
|
+
self._add_saint_johns_day(tr("Jāņu diena"))
|
|
76
75
|
|
|
77
76
|
# Republic of Latvia Proclamation Day.
|
|
78
77
|
dt = self._add_holiday_nov_18(tr("Latvijas Republikas proklamēšanas diena"))
|
holidays/countries/moldova.py
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import timedelta as td
|
|
14
13
|
from gettext import gettext as tr
|
|
15
14
|
|
|
16
15
|
from holidays.calendars.gregorian import GREGORIAN_CALENDAR
|
|
@@ -60,7 +59,7 @@ class Moldova(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
60
59
|
self._add_easter_monday(name)
|
|
61
60
|
|
|
62
61
|
# Day of Rejoicing.
|
|
63
|
-
self.
|
|
62
|
+
self._add_holiday_8_days_past_easter(tr("Paștele blajinilor"))
|
|
64
63
|
|
|
65
64
|
# International Workers' Solidarity Day.
|
|
66
65
|
self._add_labor_day(tr("Ziua internaţională a solidarităţii oamenilor muncii"))
|
|
@@ -251,12 +251,11 @@ class NewZealand(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
|
|
|
251
251
|
self._add_holiday_4th_mon_of_sep("South Canterbury Anniversary Day")
|
|
252
252
|
|
|
253
253
|
def _populate_subdiv_stl_public_holidays(self):
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
self._add_holiday("Southland Anniversary Day", dt)
|
|
254
|
+
name = "Southland Anniversary Day"
|
|
255
|
+
if self._year >= 2012:
|
|
256
|
+
self._add_holiday_2_days_past_easter(name)
|
|
257
|
+
else:
|
|
258
|
+
self._add_holiday(name, self._get_nearest_monday(JAN, 17))
|
|
260
259
|
|
|
261
260
|
def _populate_subdiv_tki_public_holidays(self):
|
|
262
261
|
self._add_holiday_2nd_mon_of_mar("Taranaki Anniversary Day")
|
holidays/countries/pakistan.py
CHANGED