holidays 0.49__py3-none-any.whl → 0.51__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 +12 -1
- holidays/countries/__init__.py +1 -0
- holidays/countries/aruba.py +2 -2
- holidays/countries/azerbaijan.py +1 -1
- holidays/countries/bahamas.py +4 -4
- holidays/countries/bangladesh.py +1 -1
- holidays/countries/belarus.py +1 -1
- holidays/countries/belize.py +1 -1
- holidays/countries/botswana.py +19 -9
- holidays/countries/brazil.py +14 -8
- holidays/countries/brunei.py +1 -1
- holidays/countries/canada.py +3 -3
- holidays/countries/chile.py +14 -11
- holidays/countries/curacao.py +2 -2
- holidays/countries/georgia.py +17 -1
- holidays/countries/greenland.py +96 -0
- holidays/countries/hongkong.py +2 -2
- holidays/countries/india.py +29 -23
- holidays/countries/ireland.py +1 -1
- holidays/countries/isle_of_man.py +3 -8
- holidays/countries/israel.py +1 -2
- holidays/countries/italy.py +161 -129
- holidays/countries/japan.py +38 -30
- holidays/countries/jersey.py +9 -7
- holidays/countries/malaysia.py +5 -5
- holidays/countries/mexico.py +1 -1
- holidays/countries/monaco.py +5 -7
- holidays/countries/papua_new_guinea.py +7 -6
- holidays/countries/russia.py +18 -4
- holidays/countries/saudi_arabia.py +1 -2
- holidays/countries/sweden.py +1 -1
- holidays/countries/switzerland.py +17 -15
- holidays/countries/tanzania.py +10 -10
- holidays/countries/tonga.py +10 -10
- holidays/countries/turkey.py +1 -1
- holidays/countries/united_arab_emirates.py +3 -3
- holidays/countries/united_states.py +4 -5
- holidays/deprecation.py +33 -0
- holidays/locale/da/LC_MESSAGES/GL.mo +0 -0
- holidays/locale/da/LC_MESSAGES/GL.po +91 -0
- holidays/locale/en_US/LC_MESSAGES/GE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GE.po +8 -4
- holidays/locale/en_US/LC_MESSAGES/GL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GL.po +92 -0
- holidays/locale/en_US/LC_MESSAGES/RU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/RU.po +11 -2
- holidays/locale/ka/LC_MESSAGES/GE.mo +0 -0
- holidays/locale/ka/LC_MESSAGES/GE.po +8 -4
- holidays/locale/kl/LC_MESSAGES/GL.mo +0 -0
- holidays/locale/kl/LC_MESSAGES/GL.po +91 -0
- holidays/locale/{pap → pap_AW}/LC_MESSAGES/AW.mo +0 -0
- holidays/locale/{pap → pap_AW}/LC_MESSAGES/AW.po +1 -1
- holidays/locale/{pap → pap_CW}/LC_MESSAGES/CW.mo +0 -0
- holidays/locale/{pap → pap_CW}/LC_MESSAGES/CW.po +2 -2
- holidays/locale/ru/LC_MESSAGES/RU.mo +0 -0
- holidays/locale/ru/LC_MESSAGES/RU.po +11 -2
- holidays/locale/uk/LC_MESSAGES/GE.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/GE.po +8 -4
- holidays/observed_holiday_base.py +42 -25
- holidays/registry.py +11 -1
- holidays/utils.py +1 -1
- {holidays-0.49.dist-info → holidays-0.51.dist-info}/AUTHORS +3 -0
- {holidays-0.49.dist-info → holidays-0.51.dist-info}/METADATA +15 -10
- {holidays-0.49.dist-info → holidays-0.51.dist-info}/RECORD +67 -59
- {holidays-0.49.dist-info → holidays-0.51.dist-info}/LICENSE +0 -0
- {holidays-0.49.dist-info → holidays-0.51.dist-info}/WHEEL +0 -0
- {holidays-0.49.dist-info → holidays-0.51.dist-info}/top_level.txt +0 -0
holidays/__init__.py
CHANGED
|
@@ -12,13 +12,24 @@
|
|
|
12
12
|
|
|
13
13
|
# flake8: noqa: F403
|
|
14
14
|
|
|
15
|
+
import warnings
|
|
16
|
+
|
|
15
17
|
from holidays.constants import *
|
|
18
|
+
from holidays.deprecation import (
|
|
19
|
+
FUTURE_INCOMPATIBILITY_WARNING_TEMPLATE,
|
|
20
|
+
FutureIncompatibilityWarning,
|
|
21
|
+
)
|
|
16
22
|
from holidays.holiday_base import *
|
|
17
23
|
from holidays.registry import EntityLoader
|
|
18
24
|
from holidays.utils import *
|
|
19
25
|
|
|
20
|
-
__version__ = "0.
|
|
26
|
+
__version__ = "0.51"
|
|
21
27
|
|
|
22
28
|
|
|
23
29
|
EntityLoader.load("countries", globals())
|
|
24
30
|
EntityLoader.load("financial", globals())
|
|
31
|
+
|
|
32
|
+
warnings.warn(
|
|
33
|
+
FUTURE_INCOMPATIBILITY_WARNING_TEMPLATE.format(version=__version__),
|
|
34
|
+
FutureIncompatibilityWarning,
|
|
35
|
+
)
|
holidays/countries/__init__.py
CHANGED
|
@@ -67,6 +67,7 @@ from .georgia import Georgia, GE, GEO
|
|
|
67
67
|
from .germany import Germany, DE, DEU
|
|
68
68
|
from .ghana import Ghana, GH, GHA
|
|
69
69
|
from .greece import Greece, GR, GRC
|
|
70
|
+
from .greenland import Greenland, GL, GRL
|
|
70
71
|
from .guam import Guam, GU, GUM, HolidaysGU
|
|
71
72
|
from .guatemala import Guatemala, GT, GUA
|
|
72
73
|
from .honduras import Honduras, HN, HND
|
holidays/countries/aruba.py
CHANGED
|
@@ -30,8 +30,8 @@ class Aruba(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
30
30
|
"""
|
|
31
31
|
|
|
32
32
|
country = "AW"
|
|
33
|
-
default_language = "
|
|
34
|
-
supported_languages = ("en_US", "nl", "
|
|
33
|
+
default_language = "pap_AW"
|
|
34
|
+
supported_languages = ("en_US", "nl", "pap_AW", "uk")
|
|
35
35
|
|
|
36
36
|
def __init__(self, *args, **kwargs):
|
|
37
37
|
ChristianHolidays.__init__(self)
|
holidays/countries/azerbaijan.py
CHANGED
|
@@ -26,7 +26,7 @@ from holidays.observed_holiday_base import (
|
|
|
26
26
|
|
|
27
27
|
class Azerbaijan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays):
|
|
28
28
|
# [1] https://en.wikipedia.org/wiki/Public_holidays_in_Azerbaijan
|
|
29
|
-
# [2] https://az.wikipedia.org/wiki/Az%C9%99rbaycan%C4%B1n_d%C3%B6vl%C9%99t_bayramlar%C4%B1_v%C9%99_x%C3%BCsusi_g%C3%BCnl%C9%99ri
|
|
29
|
+
# [2] https://az.wikipedia.org/wiki/Az%C9%99rbaycan%C4%B1n_d%C3%B6vl%C9%99t_bayramlar%C4%B1_v%C9%99_x%C3%BCsusi_g%C3%BCnl%C9%99ri
|
|
30
30
|
# [3] https://www.sosial.gov.az/en/prod-calendar
|
|
31
31
|
|
|
32
32
|
country = "AZ"
|
holidays/countries/bahamas.py
CHANGED
|
@@ -26,9 +26,9 @@ class Bahamas(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
|
|
|
26
26
|
"""
|
|
27
27
|
References:
|
|
28
28
|
- https://en.wikipedia.org/wiki/Public_holidays_in_the_Bahamas
|
|
29
|
-
- https://laws.bahamas.gov.bs/cms/images/LEGISLATION/PRINCIPAL/1938/1938-0015/PublicHolidaysAct_1.pdf
|
|
30
|
-
- https://laws.bahamas.gov.bs/cms/images/LEGISLATION/PRINCIPAL/2013/2013-0040/MajorityRulePublicHolidayAct2013_1.pdf
|
|
31
|
-
- https://laws.bahamas.gov.bs/cms/images/LEGISLATION/PRINCIPAL/2013/2013-0009/RandolFawkesLabourDayAct2013_1.pdf
|
|
29
|
+
- https://laws.bahamas.gov.bs/cms/images/LEGISLATION/PRINCIPAL/1938/1938-0015/PublicHolidaysAct_1.pdf
|
|
30
|
+
- https://laws.bahamas.gov.bs/cms/images/LEGISLATION/PRINCIPAL/2013/2013-0040/MajorityRulePublicHolidayAct2013_1.pdf
|
|
31
|
+
- https://laws.bahamas.gov.bs/cms/images/LEGISLATION/PRINCIPAL/2013/2013-0009/RandolFawkesLabourDayAct2013_1.pdf
|
|
32
32
|
- http://www.tribune242.com/news/2013/oct/12/national-heroes-day-formally-established/
|
|
33
33
|
- https://eleutheranews.com/?p=3594
|
|
34
34
|
Checked With:
|
|
@@ -127,7 +127,7 @@ class BHS(Bahamas):
|
|
|
127
127
|
|
|
128
128
|
class BahamasStaticHolidays:
|
|
129
129
|
special_public_holidays = {
|
|
130
|
-
# https://www.bahamas.gov.bs/wps/portal/public/gov/government/notices/national%20holiday%2019th%20september/
|
|
130
|
+
# https://www.bahamas.gov.bs/wps/portal/public/gov/government/notices/national%20holiday%2019th%20september/
|
|
131
131
|
2022: (SEP, 19, "State Funeral of Queen Elizabeth II"),
|
|
132
132
|
}
|
|
133
133
|
|
holidays/countries/bangladesh.py
CHANGED
|
@@ -17,7 +17,7 @@ from holidays.holiday_base import HolidayBase
|
|
|
17
17
|
class Bangladesh(HolidayBase, InternationalHolidays):
|
|
18
18
|
"""
|
|
19
19
|
References:
|
|
20
|
-
- https://mopa.gov.bd/sites/default/files/files/mopa.gov.bd/public_holiday/61c35b73_e335_462a_9bcf_4695b23b6d82/reg4-2019-212.PDF
|
|
20
|
+
- https://mopa.gov.bd/sites/default/files/files/mopa.gov.bd/public_holiday/61c35b73_e335_462a_9bcf_4695b23b6d82/reg4-2019-212.PDF
|
|
21
21
|
- https://en.wikipedia.org/wiki/Public_holidays_in_Bangladesh
|
|
22
22
|
"""
|
|
23
23
|
|
holidays/countries/belarus.py
CHANGED
|
@@ -27,7 +27,7 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
27
27
|
- http://www.belarus.by/en/about-belarus/national-holidays
|
|
28
28
|
- http://laws.newsby.org/documents/ukazp/pos05/ukaz05806.htm
|
|
29
29
|
- http://president.gov.by/uploads/documents/2019/464uk.pdf
|
|
30
|
-
- https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%91%D0%B5%D0%BB%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%B8%D0%B8
|
|
30
|
+
- https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%91%D0%B5%D0%BB%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%B8%D0%B8
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
33
|
country = "BY"
|
holidays/countries/belize.py
CHANGED
|
@@ -25,7 +25,7 @@ class Belize(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
25
25
|
- https://en.wikipedia.org/wiki/Public_holidays_in_Belize
|
|
26
26
|
- http://www.belizelaw.org/web/lawadmin/PDF%20files/cap289.pdf
|
|
27
27
|
- https://www.pressoffice.gov.bz/public-and-bank-holidays-2022-updated/
|
|
28
|
-
- https://www.pressoffice.gov.bz/government-of-belize-establishes-new-public-and-bank-holidays/
|
|
28
|
+
- https://www.pressoffice.gov.bz/government-of-belize-establishes-new-public-and-bank-holidays/
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
31
|
country = "BZ"
|
holidays/countries/botswana.py
CHANGED
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
from holidays.calendars.gregorian import JUL
|
|
14
14
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
15
|
-
from holidays.observed_holiday_base import
|
|
15
|
+
from holidays.observed_holiday_base import (
|
|
16
|
+
ObservedHolidayBase,
|
|
17
|
+
SAT_TO_NEXT_MON,
|
|
18
|
+
SUN_TO_NEXT_MON,
|
|
19
|
+
SUN_TO_NEXT_TUE,
|
|
20
|
+
)
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
class Botswana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
@@ -41,16 +46,19 @@ class Botswana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, St
|
|
|
41
46
|
self._add_observed(self._add_new_years_day("New Year's Day"), rule=SUN_TO_NEXT_TUE)
|
|
42
47
|
self._add_observed(self._add_new_years_day_two("New Year's Day Holiday"))
|
|
43
48
|
|
|
44
|
-
# Easter and easter related calculations
|
|
45
49
|
self._add_good_friday("Good Friday")
|
|
50
|
+
|
|
46
51
|
self._add_holy_saturday("Holy Saturday")
|
|
52
|
+
|
|
47
53
|
self._add_easter_monday("Easter Monday")
|
|
48
|
-
self._add_ascension_thursday("Ascension Day")
|
|
49
54
|
|
|
50
|
-
may_1
|
|
51
|
-
self.
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
self._add_observed(may_1 := self._add_labor_day("Labour Day"))
|
|
56
|
+
if self._year >= 2016:
|
|
57
|
+
self._add_observed(
|
|
58
|
+
may_1, name="Labour Day Holiday", rule=SAT_TO_NEXT_MON, show_observed_label=False
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
self._add_ascension_thursday("Ascension Day")
|
|
54
62
|
|
|
55
63
|
self._add_observed(self._add_holiday_jul_1("Sir Seretse Khama Day"))
|
|
56
64
|
|
|
@@ -63,8 +71,10 @@ class Botswana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, St
|
|
|
63
71
|
self._add_observed(self._add_christmas_day("Christmas Day"), rule=SUN_TO_NEXT_TUE)
|
|
64
72
|
self._add_observed(dec_26 := self._add_christmas_day_two("Boxing Day"))
|
|
65
73
|
|
|
66
|
-
if self.
|
|
67
|
-
self.
|
|
74
|
+
if self._year >= 2016:
|
|
75
|
+
self._add_observed(
|
|
76
|
+
dec_26, name="Boxing Day Holiday", rule=SAT_TO_NEXT_MON, show_observed_label=False
|
|
77
|
+
)
|
|
68
78
|
|
|
69
79
|
|
|
70
80
|
class BW(Botswana):
|
holidays/countries/brazil.py
CHANGED
|
@@ -22,8 +22,9 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
22
22
|
"""
|
|
23
23
|
References:
|
|
24
24
|
- https://pt.wikipedia.org/wiki/Feriados_no_Brasil
|
|
25
|
-
- `Decreto n. 155-B, de 14.01.1890 <https://www2.camara.leg.br/legin/fed/decret/1824-1899/decreto-155-b-14-janeiro-1890-517534-publicacaooriginal-1-pe.html>`_
|
|
26
|
-
- `Decreto n. 19.488, de 15.12.1930 <https://www2.camara.leg.br/legin/fed/decret/1930-1939/decreto-19488-15-dezembro-1930-508040-republicacao-85201-pe.html>`_
|
|
25
|
+
- `Decreto n. 155-B, de 14.01.1890 <https://www2.camara.leg.br/legin/fed/decret/1824-1899/decreto-155-b-14-janeiro-1890-517534-publicacaooriginal-1-pe.html>`_
|
|
26
|
+
- `Decreto n. 19.488, de 15.12.1930 <https://www2.camara.leg.br/legin/fed/decret/1930-1939/decreto-19488-15-dezembro-1930-508040-republicacao-85201-pe.html>`_
|
|
27
|
+
- `Lei n. 14.759/23 <https://www2.camara.leg.br/legin/fed/lei/2023/lei-14759-21-dezembro-2023-795091-publicacaooriginal-170522-pl.html>`_
|
|
27
28
|
"""
|
|
28
29
|
|
|
29
30
|
country = "BR"
|
|
@@ -109,6 +110,10 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
109
110
|
# Republic Proclamation Day.
|
|
110
111
|
self._add_holiday_nov_15("Proclamação da República")
|
|
111
112
|
|
|
113
|
+
if self._year >= 2024:
|
|
114
|
+
# National Day of Zumbi and Black Awareness.
|
|
115
|
+
self._add_holiday_nov_20("Dia Nacional de Zumbi e da Consciência Negra")
|
|
116
|
+
|
|
112
117
|
if self._year >= 1922:
|
|
113
118
|
# Christmas Day.
|
|
114
119
|
self._add_christmas_day("Natal")
|
|
@@ -179,8 +184,9 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
179
184
|
# Political Emancipation of Alagoas.
|
|
180
185
|
self._add_holiday_sep_16("Emancipação Política de Alagoas")
|
|
181
186
|
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
if self._year <= 2023:
|
|
188
|
+
# Black Awareness Day.
|
|
189
|
+
self._add_holiday_nov_20("Consciência Negra")
|
|
184
190
|
|
|
185
191
|
if self._year >= 2013:
|
|
186
192
|
self._add_holiday_nov_30("Dia do Evangélico")
|
|
@@ -189,7 +195,7 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
189
195
|
# Elevation of Amazonas to province.
|
|
190
196
|
self._add_holiday_sep_5("Elevação do Amazonas à categoria de província")
|
|
191
197
|
|
|
192
|
-
if self._year
|
|
198
|
+
if 2010 <= self._year <= 2023:
|
|
193
199
|
self._add_holiday_nov_20("Consciência Negra")
|
|
194
200
|
|
|
195
201
|
def _populate_subdiv_ap_public_holidays(self):
|
|
@@ -204,7 +210,7 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
204
210
|
# Creation of the Federal Territory.
|
|
205
211
|
self._add_holiday_sep_13("Criação do Território Federal")
|
|
206
212
|
|
|
207
|
-
if self._year
|
|
213
|
+
if 2008 <= self._year <= 2023:
|
|
208
214
|
self._add_holiday_nov_20("Consciência Negra")
|
|
209
215
|
|
|
210
216
|
def _populate_subdiv_ba_public_holidays(self):
|
|
@@ -252,7 +258,7 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
252
258
|
self._add_holiday_oct_11("Criação do Estado")
|
|
253
259
|
|
|
254
260
|
def _populate_subdiv_mt_public_holidays(self):
|
|
255
|
-
if self._year
|
|
261
|
+
if 2003 <= self._year <= 2023:
|
|
256
262
|
self._add_holiday_nov_20("Consciência Negra")
|
|
257
263
|
|
|
258
264
|
def _populate_subdiv_pa_public_holidays(self):
|
|
@@ -281,7 +287,7 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
281
287
|
# Saint George's Day.
|
|
282
288
|
self._add_saint_georges_day("São Jorge")
|
|
283
289
|
|
|
284
|
-
if self._year
|
|
290
|
+
if 2002 <= self._year <= 2023:
|
|
285
291
|
self._add_holiday_nov_20("Consciência Negra")
|
|
286
292
|
|
|
287
293
|
def _populate_subdiv_rn_public_holidays(self):
|
holidays/countries/brunei.py
CHANGED
|
@@ -45,7 +45,7 @@ class Brunei(
|
|
|
45
45
|
References:
|
|
46
46
|
|
|
47
47
|
- Based on: http://www.labour.gov.bn/Lists/Upcomming%20events/AllItems.aspx
|
|
48
|
-
http://www.labour.gov.bn/Download/GUIDE%20TO%20BRUNEI%20EMPLOYMENT%20LAWS%20-%20english%20version-3.pdf
|
|
48
|
+
http://www.labour.gov.bn/Download/GUIDE%20TO%20BRUNEI%20EMPLOYMENT%20LAWS%20-%20english%20version-3.pdf
|
|
49
49
|
- Checked with: https://asean.org/wp-content/uploads/2021/12/ASEAN-National-Holidays-2022.pdf
|
|
50
50
|
https://asean.org/wp-content/uploads/2022/12/ASEAN-Public-Holidays-2023.pdf
|
|
51
51
|
https://www.timeanddate.com/holidays/brunei/
|
holidays/countries/canada.py
CHANGED
|
@@ -31,11 +31,11 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
|
|
|
31
31
|
"""
|
|
32
32
|
References:
|
|
33
33
|
- https://en.wikipedia.org/wiki/Public_holidays_in_Canada
|
|
34
|
-
- https://web.archive.org/web/20130703014214/http://www.hrsdc.gc.ca/eng/labour/overviews/employment_standards/holidays.shtml
|
|
34
|
+
- https://web.archive.org/web/20130703014214/http://www.hrsdc.gc.ca/eng/labour/overviews/employment_standards/holidays.shtml
|
|
35
35
|
- https://www.alberta.ca/alberta-general-holidays
|
|
36
|
-
- https://www2.gov.bc.ca/gov/content/employment-business/employment-standards-advice/employment-standards/statutory-holidays
|
|
36
|
+
- https://www2.gov.bc.ca/gov/content/employment-business/employment-standards-advice/employment-standards/statutory-holidays
|
|
37
37
|
- http://web2.gov.mb.ca/laws/statutes/ccsm/r120e.php
|
|
38
|
-
- https://www2.gnb.ca/content/gnb/en/departments/elg/local_government/content/governance/content/days_of_rest_act.html
|
|
38
|
+
- https://www2.gnb.ca/content/gnb/en/departments/elg/local_government/content/governance/content/days_of_rest_act.html
|
|
39
39
|
- https://www.ontario.ca/document/your-guide-employment-standards-act-0/public-holidays
|
|
40
40
|
- https://www.officeholidays.com/countries/canada/
|
|
41
41
|
- https://www.timeanddate.com/holidays/canada/
|
holidays/countries/chile.py
CHANGED
|
@@ -17,8 +17,11 @@ from holidays.calendars.gregorian import JUN, SEP
|
|
|
17
17
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
18
18
|
from holidays.observed_holiday_base import (
|
|
19
19
|
ObservedHolidayBase,
|
|
20
|
+
MON_ONLY,
|
|
21
|
+
MON_FRI_ONLY,
|
|
20
22
|
TUE_TO_PREV_FRI,
|
|
21
23
|
WED_TO_NEXT_FRI,
|
|
24
|
+
FRI_ONLY,
|
|
22
25
|
WORKDAY_TO_NEAREST_MON,
|
|
23
26
|
)
|
|
24
27
|
|
|
@@ -84,9 +87,9 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
84
87
|
return None
|
|
85
88
|
|
|
86
89
|
# New Year's Day.
|
|
87
|
-
|
|
88
|
-
if self._year >= 2017
|
|
89
|
-
self._add_new_years_day_two(tr("Feriado nacional"))
|
|
90
|
+
self._add_new_years_day(tr("Año Nuevo"))
|
|
91
|
+
if self._year >= 2017:
|
|
92
|
+
self._add_observed(self._add_new_years_day_two(tr("Feriado nacional")), rule=MON_ONLY)
|
|
90
93
|
|
|
91
94
|
# Good Friday.
|
|
92
95
|
self._add_good_friday(tr("Viernes Santo"))
|
|
@@ -141,12 +144,12 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
141
144
|
tr("Día de la Unidad Nacional")
|
|
142
145
|
)
|
|
143
146
|
|
|
144
|
-
if self._year >=
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
if self._year >= 2007:
|
|
148
|
+
self._add_observed(
|
|
149
|
+
# National Holiday.
|
|
150
|
+
self._add_holiday_sep_17(tr("Fiestas Patrias")),
|
|
151
|
+
rule=MON_FRI_ONLY if self._year >= 2017 else MON_ONLY,
|
|
152
|
+
)
|
|
150
153
|
|
|
151
154
|
# Independence Day.
|
|
152
155
|
self._add_holiday_sep_18(tr("Día de la Independencia"))
|
|
@@ -154,8 +157,8 @@ class Chile(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
|
|
|
154
157
|
# Army Day.
|
|
155
158
|
self._add_holiday_sep_19(tr("Día de las Glorias del Ejército"))
|
|
156
159
|
|
|
157
|
-
if self._year >= 2008
|
|
158
|
-
self._add_holiday_sep_20(tr("Fiestas Patrias"))
|
|
160
|
+
if self._year >= 2008:
|
|
161
|
+
self._add_observed(self._add_holiday_sep_20(tr("Fiestas Patrias")), rule=FRI_ONLY)
|
|
159
162
|
|
|
160
163
|
if 1932 <= self._year <= 1944:
|
|
161
164
|
self._add_holiday_sep_20(tr("Fiestas Patrias"))
|
holidays/countries/curacao.py
CHANGED
|
@@ -28,8 +28,8 @@ class Curacao(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
country = "CW"
|
|
31
|
-
default_language = "
|
|
32
|
-
supported_languages = ("en_US", "nl", "
|
|
31
|
+
default_language = "pap_CW"
|
|
32
|
+
supported_languages = ("en_US", "nl", "pap_CW", "uk")
|
|
33
33
|
|
|
34
34
|
def __init__(self, *args, **kwargs):
|
|
35
35
|
ChristianHolidays.__init__(self)
|
holidays/countries/georgia.py
CHANGED
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
from gettext import gettext as tr
|
|
14
14
|
|
|
15
|
+
from holidays.calendars.gregorian import MAY
|
|
15
16
|
from holidays.calendars.julian import JULIAN_CALENDAR
|
|
16
|
-
from holidays.
|
|
17
|
+
from holidays.constants import GOVERNMENT, PUBLIC
|
|
18
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
17
19
|
from holidays.holiday_base import HolidayBase
|
|
18
20
|
|
|
19
21
|
|
|
@@ -27,12 +29,14 @@ class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
27
29
|
"""
|
|
28
30
|
|
|
29
31
|
country = "GE"
|
|
32
|
+
supported_categories = (GOVERNMENT, PUBLIC)
|
|
30
33
|
default_language = "ka"
|
|
31
34
|
supported_languages = ("en_US", "ka", "uk")
|
|
32
35
|
|
|
33
36
|
def __init__(self, *args, **kwargs):
|
|
34
37
|
ChristianHolidays.__init__(self, JULIAN_CALENDAR)
|
|
35
38
|
InternationalHolidays.__init__(self)
|
|
39
|
+
StaticHolidays.__init__(self, GeorgiaStaticHolidays)
|
|
36
40
|
super().__init__(*args, **kwargs)
|
|
37
41
|
|
|
38
42
|
def _populate_public_holidays(self):
|
|
@@ -96,3 +100,15 @@ class GE(Georgia):
|
|
|
96
100
|
|
|
97
101
|
class GEO(Georgia):
|
|
98
102
|
pass
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class GeorgiaStaticHolidays:
|
|
106
|
+
"""
|
|
107
|
+
References:
|
|
108
|
+
- https://www.matsne.gov.ge/ka/document/view/6173967
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
special_government_holidays = {
|
|
112
|
+
# Day of Family Sanctity and Respect for Parents.
|
|
113
|
+
2024: (MAY, 17, tr("ოჯახის სიწმინდისა და მშობლების პატივისცემის დღე")),
|
|
114
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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.constants import OPTIONAL, PUBLIC
|
|
16
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
17
|
+
from holidays.holiday_base import HolidayBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Greenland(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
21
|
+
"""
|
|
22
|
+
Greenlandic holidays.
|
|
23
|
+
|
|
24
|
+
References:
|
|
25
|
+
- https://en.wikipedia.org/wiki/Public_holidays_in_Greenland
|
|
26
|
+
- https://www.norden.org/en/info-norden/public-holidays-greenland
|
|
27
|
+
- https://www.timeanddate.com/holidays/greenland/
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
country = "GL"
|
|
31
|
+
default_language = "kl"
|
|
32
|
+
supported_categories = (OPTIONAL, PUBLIC)
|
|
33
|
+
supported_languages = ("da", "en_US", "kl")
|
|
34
|
+
|
|
35
|
+
def __init__(self, *args, **kwargs):
|
|
36
|
+
ChristianHolidays.__init__(self)
|
|
37
|
+
InternationalHolidays.__init__(self)
|
|
38
|
+
super().__init__(*args, **kwargs)
|
|
39
|
+
|
|
40
|
+
def _populate_public_holidays(self):
|
|
41
|
+
# New Year's Day.
|
|
42
|
+
self._add_new_years_day(tr("Ukioq nutaaq"))
|
|
43
|
+
|
|
44
|
+
# Maundy Thursday.
|
|
45
|
+
self._add_holy_thursday(tr("Sisamanngornermi illernartumi"))
|
|
46
|
+
|
|
47
|
+
# Good Friday.
|
|
48
|
+
self._add_good_friday(tr("Tallimanngorneq ajortorsiorneq"))
|
|
49
|
+
|
|
50
|
+
# Easter Sunday.
|
|
51
|
+
self._add_easter_sunday(tr("Poorskimi"))
|
|
52
|
+
|
|
53
|
+
# Easter Monday.
|
|
54
|
+
self._add_easter_monday(tr("Poorskimi ullut aappaat"))
|
|
55
|
+
|
|
56
|
+
# Great Day of Prayers.
|
|
57
|
+
self._add_holiday_26_days_past_easter(tr("Ulloq qinuffiusoq"))
|
|
58
|
+
|
|
59
|
+
# Ascension Day.
|
|
60
|
+
self._add_ascension_thursday(tr("Ulloq Kristusip qilaliarnera"))
|
|
61
|
+
|
|
62
|
+
# Whit Sunday.
|
|
63
|
+
self._add_whit_sunday(tr("Piinsip ullua"))
|
|
64
|
+
|
|
65
|
+
# Whit Monday.
|
|
66
|
+
self._add_whit_monday(tr("Piinsip ulluisa aappaanni"))
|
|
67
|
+
|
|
68
|
+
# Christmas Day.
|
|
69
|
+
self._add_christmas_day(tr("Juulli"))
|
|
70
|
+
|
|
71
|
+
# Second Day of Christmas.
|
|
72
|
+
self._add_christmas_day_two(tr("Juullip aappaa"))
|
|
73
|
+
|
|
74
|
+
def _populate_optional_holidays(self):
|
|
75
|
+
# Epiphany.
|
|
76
|
+
self._add_epiphany_day(tr("Mitaarneq"))
|
|
77
|
+
|
|
78
|
+
# International Workers' Day.
|
|
79
|
+
self._add_labor_day(tr("Sulisartut ulluat"))
|
|
80
|
+
|
|
81
|
+
# National Day.
|
|
82
|
+
self._add_holiday_jun_21(tr("Ullortuneq"))
|
|
83
|
+
|
|
84
|
+
# Christmas Eve.
|
|
85
|
+
self._add_christmas_eve(tr("Juulliaqqami"))
|
|
86
|
+
|
|
87
|
+
# New Year's Eve.
|
|
88
|
+
self._add_new_years_eve(tr("Ukiortaami"))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class GL(Greenland):
|
|
92
|
+
pass
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class GRL(Greenland):
|
|
96
|
+
pass
|
holidays/countries/hongkong.py
CHANGED
|
@@ -56,10 +56,10 @@ class HongKong(
|
|
|
56
56
|
- `English Wikipedia <https://en.wikipedia.org/wiki/Public_holidays_in_Hong_Kong>`_
|
|
57
57
|
- `Chinese Wikipedia <https://zh.wikipedia.org/wiki/香港節日與公眾假期>`_
|
|
58
58
|
Statutory Holidays:
|
|
59
|
-
- `Section 39 of Cap. 57 Employment Ordinance <https://www.elegislation.gov.hk/hk/cap57!en-zh-Hant-HK?INDEX_CS=N&xpid=ID_1438403463460_002>`_
|
|
59
|
+
- `Section 39 of Cap. 57 Employment Ordinance <https://www.elegislation.gov.hk/hk/cap57!en-zh-Hant-HK?INDEX_CS=N&xpid=ID_1438403463460_002>`_
|
|
60
60
|
- `Holidays for 2010-2024 <https://www.labour.gov.hk/eng/news/holidays_list.htm>`_
|
|
61
61
|
General Holidays:
|
|
62
|
-
- `Cap. 149 General Holidays Ordinance <https://www.elegislation.gov.hk/hk/cap149!en-zh-Hant-HK?INDEX_CS=N>`_
|
|
62
|
+
- `Cap. 149 General Holidays Ordinance <https://www.elegislation.gov.hk/hk/cap149!en-zh-Hant-HK?INDEX_CS=N>`_
|
|
63
63
|
- `Holidays for 2007–2024 <https://www.gov.hk/en/about/abouthk/holiday/index.htm>`_
|
|
64
64
|
"""
|
|
65
65
|
|
holidays/countries/india.py
CHANGED
|
@@ -31,42 +31,45 @@ class India(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida
|
|
|
31
31
|
subdivisions = (
|
|
32
32
|
"AN", # Andaman and Nicobar Islands.
|
|
33
33
|
"AP", # Andhra Pradesh.
|
|
34
|
-
"AR", #
|
|
34
|
+
"AR", # Arunāchal Pradesh.
|
|
35
35
|
"AS", # Assam.
|
|
36
|
-
"BR", #
|
|
37
|
-
"CG", #
|
|
38
|
-
"CH", #
|
|
39
|
-
"
|
|
40
|
-
"DH", # Dadra and Nagar Haveli.
|
|
36
|
+
"BR", # Bihār.
|
|
37
|
+
"CG", # Chhattīsgarh.
|
|
38
|
+
"CH", # Chandīgarh.
|
|
39
|
+
"DH", # Dādra and Nagar Haveli and Damān and Diu.
|
|
41
40
|
"DL", # Delhi.
|
|
42
41
|
"GA", # Goa.
|
|
43
|
-
"GJ", #
|
|
44
|
-
"HP", #
|
|
45
|
-
"HR", #
|
|
46
|
-
"JH", #
|
|
47
|
-
"JK", # Jammu and
|
|
48
|
-
"KA", #
|
|
42
|
+
"GJ", # Gujarāt.
|
|
43
|
+
"HP", # Himāchal Pradesh.
|
|
44
|
+
"HR", # Haryāna.
|
|
45
|
+
"JH", # Jhārkhand.
|
|
46
|
+
"JK", # Jammu and Kashmīr.
|
|
47
|
+
"KA", # Karnātaka.
|
|
49
48
|
"KL", # Kerala.
|
|
50
|
-
"LA", #
|
|
49
|
+
"LA", # Ladākh.
|
|
51
50
|
"LD", # Lakshadweep.
|
|
52
|
-
"MH", #
|
|
53
|
-
"ML", #
|
|
51
|
+
"MH", # Mahārāshtra.
|
|
52
|
+
"ML", # Meghālaya.
|
|
54
53
|
"MN", # Manipur.
|
|
55
54
|
"MP", # Madhya Pradesh.
|
|
56
55
|
"MZ", # Mizoram.
|
|
57
|
-
"NL", #
|
|
58
|
-
"
|
|
56
|
+
"NL", # Nāgāland.
|
|
57
|
+
"OD", # Odisha.
|
|
59
58
|
"PB", # Punjab.
|
|
60
|
-
"PY", #
|
|
61
|
-
"RJ", #
|
|
59
|
+
"PY", # Puducherry.
|
|
60
|
+
"RJ", # Rājasthān.
|
|
62
61
|
"SK", # Sikkim.
|
|
63
|
-
"TN", # Tamil
|
|
62
|
+
"TN", # Tamil Nādu.
|
|
64
63
|
"TR", # Tripura.
|
|
65
|
-
"TS", #
|
|
66
|
-
"UK", #
|
|
64
|
+
"TS", # Telangāna.
|
|
65
|
+
"UK", # Uttarākhand.
|
|
67
66
|
"UP", # Uttar Pradesh.
|
|
68
67
|
"WB", # West Bengal.
|
|
69
68
|
)
|
|
69
|
+
_deprecated_subdivisions = (
|
|
70
|
+
"DD", # Daman and Diu.
|
|
71
|
+
"OR", # Orissa.
|
|
72
|
+
)
|
|
70
73
|
|
|
71
74
|
def __init__(self, *args, **kwargs):
|
|
72
75
|
ChristianHolidays.__init__(self)
|
|
@@ -197,6 +200,9 @@ class India(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida
|
|
|
197
200
|
self._add_whit_sunday("Feast of Pentecost")
|
|
198
201
|
self._add_christmas_day("Christmas Day")
|
|
199
202
|
|
|
203
|
+
if self.subdiv == "OR":
|
|
204
|
+
self._populate_subdiv_od_public_holidays()
|
|
205
|
+
|
|
200
206
|
# Andhra Pradesh.
|
|
201
207
|
def _populate_subdiv_ap_public_holidays(self):
|
|
202
208
|
self._add_holiday_apr_14("Dr. B. R. Ambedkar's Jayanti")
|
|
@@ -246,7 +252,7 @@ class India(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida
|
|
|
246
252
|
self._add_holiday_nov_1("Madhya Pradesh Foundation Day")
|
|
247
253
|
|
|
248
254
|
# Orissa / Odisha.
|
|
249
|
-
def
|
|
255
|
+
def _populate_subdiv_od_public_holidays(self):
|
|
250
256
|
self._add_holiday_apr_1("Odisha Day (Utkala Dibasa)")
|
|
251
257
|
self._add_holiday_apr_14("Dr. B. R. Ambedkar's Jayanti")
|
|
252
258
|
self._add_holiday_apr_15("Maha Vishuva Sankranti / Pana Sankranti")
|
holidays/countries/ireland.py
CHANGED
|
@@ -19,7 +19,7 @@ class Ireland(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid
|
|
|
19
19
|
"""
|
|
20
20
|
References:
|
|
21
21
|
- https://en.wikipedia.org/wiki/Public_holidays_in_the_Republic_of_Ireland
|
|
22
|
-
- https://www.citizensinformation.ie/en/employment/employment_rights_and_conditions/leave_and_holidays/public_holidays_in_ireland.html
|
|
22
|
+
- https://www.citizensinformation.ie/en/employment/employment_rights_and_conditions/leave_and_holidays/public_holidays_in_ireland.html
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
country = "IE"
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
# Website: https://github.com/vacanza/python-holidays
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
-
from datetime import date
|
|
14
|
-
|
|
15
|
-
from holidays.calendars.gregorian import JUL
|
|
16
13
|
from holidays.countries.united_kingdom import UnitedKingdom, UnitedKingdomStaticHolidays
|
|
17
14
|
from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
|
|
18
15
|
from holidays.observed_holiday_base import ObservedHolidayBase, SAT_SUN_TO_NEXT_MON
|
|
@@ -50,11 +47,9 @@ class IsleOfMan(UnitedKingdom):
|
|
|
50
47
|
|
|
51
48
|
# Tynwald Day
|
|
52
49
|
# Move to the next Monday if falls on a weekend.
|
|
53
|
-
|
|
54
|
-
self.
|
|
55
|
-
|
|
56
|
-
self._get_observed_date(dt, SAT_SUN_TO_NEXT_MON) if self._year >= 1992 else dt,
|
|
57
|
-
)
|
|
50
|
+
jul_5 = self._add_holiday_jul_5("Tynwald Day")
|
|
51
|
+
if self._year >= 1992:
|
|
52
|
+
self._move_holiday(jul_5, show_observed_label=False)
|
|
58
53
|
|
|
59
54
|
|
|
60
55
|
class IM(IsleOfMan):
|
holidays/countries/israel.py
CHANGED
|
@@ -44,8 +44,7 @@ class Israel(ObservedHolidayBase):
|
|
|
44
44
|
|
|
45
45
|
References:
|
|
46
46
|
- https://en.wikipedia.org/wiki/Public_holidays_in_Israel
|
|
47
|
-
- https://web.archive.org/web/20190923042619/https://www.knesset.gov.il/laws/special/heb/jerusalem_day_law.htm
|
|
48
|
-
|
|
47
|
+
- https://web.archive.org/web/20190923042619/https://www.knesset.gov.il/laws/special/heb/jerusalem_day_law.htm
|
|
49
48
|
"""
|
|
50
49
|
|
|
51
50
|
country = "IL"
|