holidays 0.70__py3-none-any.whl → 0.72__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 -2
- holidays/calendars/__init__.py +1 -1
- holidays/calendars/balinese_saka.py +1 -1
- holidays/calendars/buddhist.py +5 -3
- holidays/calendars/chinese.py +101 -13
- holidays/calendars/custom.py +1 -1
- holidays/calendars/gregorian.py +1 -1
- holidays/calendars/hebrew.py +1 -1
- holidays/calendars/hindu.py +47 -3
- holidays/calendars/islamic.py +1 -1
- holidays/calendars/julian.py +1 -1
- holidays/calendars/julian_revised.py +1 -1
- holidays/calendars/persian.py +1 -1
- holidays/calendars/sinhala.py +1 -1
- holidays/calendars/thai.py +1 -1
- holidays/constants.py +1 -1
- holidays/countries/__init__.py +7 -1
- holidays/countries/afghanistan.py +1 -1
- holidays/countries/albania.py +2 -2
- holidays/countries/algeria.py +1 -1
- holidays/countries/american_samoa.py +2 -1
- holidays/countries/andorra.py +10 -1
- holidays/countries/angola.py +1 -1
- holidays/countries/antigua_and_barbuda.py +1 -1
- holidays/countries/argentina.py +5 -5
- holidays/countries/armenia.py +1 -1
- holidays/countries/aruba.py +1 -1
- holidays/countries/australia.py +16 -5
- holidays/countries/austria.py +3 -3
- holidays/countries/azerbaijan.py +1 -1
- holidays/countries/bahamas.py +1 -1
- holidays/countries/bahrain.py +1 -1
- holidays/countries/bangladesh.py +1 -1
- holidays/countries/barbados.py +1 -1
- holidays/countries/belarus.py +1 -1
- holidays/countries/belgium.py +1 -1
- holidays/countries/belize.py +1 -1
- holidays/countries/bolivia.py +23 -12
- holidays/countries/bosnia_and_herzegovina.py +5 -5
- holidays/countries/botswana.py +1 -1
- holidays/countries/brazil.py +3 -4
- holidays/countries/brunei.py +1 -1
- holidays/countries/bulgaria.py +1 -1
- holidays/countries/burkina_faso.py +1 -1
- holidays/countries/burundi.py +1 -1
- holidays/countries/cambodia.py +22 -22
- holidays/countries/cameroon.py +1 -1
- holidays/countries/canada.py +91 -57
- holidays/countries/chad.py +1 -1
- holidays/countries/chile.py +36 -18
- holidays/countries/china.py +1 -1
- holidays/countries/colombia.py +1 -1
- holidays/countries/congo.py +1 -1
- holidays/countries/costa_rica.py +1 -1
- holidays/countries/croatia.py +1 -1
- holidays/countries/cuba.py +1 -1
- holidays/countries/curacao.py +1 -1
- holidays/countries/cyprus.py +1 -1
- holidays/countries/czechia.py +1 -1
- holidays/countries/denmark.py +1 -1
- holidays/countries/djibouti.py +1 -1
- holidays/countries/dominica.py +1 -1
- holidays/countries/dominican_republic.py +1 -1
- holidays/countries/ecuador.py +1 -1
- holidays/countries/egypt.py +1 -1
- holidays/countries/el_salvador.py +18 -18
- holidays/countries/estonia.py +1 -1
- holidays/countries/eswatini.py +1 -1
- holidays/countries/ethiopia.py +43 -24
- holidays/countries/fiji.py +1 -1
- holidays/countries/finland.py +1 -1
- holidays/countries/france.py +4 -5
- holidays/countries/french_southern_territories.py +53 -0
- holidays/countries/gabon.py +1 -1
- holidays/countries/georgia.py +1 -1
- holidays/countries/germany.py +20 -21
- holidays/countries/ghana.py +1 -1
- holidays/countries/greece.py +1 -1
- holidays/countries/greenland.py +1 -1
- holidays/countries/guam.py +2 -1
- holidays/countries/guatemala.py +1 -1
- holidays/countries/guernsey.py +1 -1
- holidays/countries/guinea.py +1 -1
- holidays/countries/haiti.py +1 -1
- holidays/countries/honduras.py +1 -1
- holidays/countries/hongkong.py +2 -2
- holidays/countries/hungary.py +1 -1
- holidays/countries/iceland.py +1 -1
- holidays/countries/india.py +17 -11
- holidays/countries/indonesia.py +1 -1
- holidays/countries/iran.py +1 -1
- holidays/countries/ireland.py +1 -1
- holidays/countries/isle_of_man.py +1 -1
- holidays/countries/israel.py +1 -1
- holidays/countries/italy.py +1 -1
- holidays/countries/ivory_coast.py +5 -5
- holidays/countries/jamaica.py +1 -1
- holidays/countries/japan.py +1 -1
- holidays/countries/jersey.py +1 -1
- holidays/countries/jordan.py +1 -1
- holidays/countries/kazakhstan.py +1 -1
- holidays/countries/kenya.py +1 -1
- holidays/countries/kuwait.py +1 -1
- holidays/countries/kyrgyzstan.py +1 -1
- holidays/countries/laos.py +1 -1
- holidays/countries/latvia.py +1 -1
- holidays/countries/lesotho.py +1 -1
- holidays/countries/liechtenstein.py +1 -1
- holidays/countries/lithuania.py +1 -1
- holidays/countries/luxembourg.py +1 -1
- holidays/countries/macau.py +5 -5
- holidays/countries/madagascar.py +1 -1
- holidays/countries/malawi.py +1 -1
- holidays/countries/malaysia.py +26 -22
- holidays/countries/maldives.py +1 -1
- holidays/countries/malta.py +1 -1
- holidays/countries/marshall_islands.py +1 -1
- holidays/countries/mauritania.py +1 -1
- holidays/countries/mexico.py +1 -1
- holidays/countries/moldova.py +1 -1
- holidays/countries/monaco.py +1 -1
- holidays/countries/montenegro.py +1 -1
- holidays/countries/morocco.py +1 -1
- holidays/countries/mozambique.py +1 -1
- holidays/countries/namibia.py +1 -1
- holidays/countries/netherlands.py +1 -1
- holidays/countries/new_zealand.py +19 -19
- holidays/countries/nicaragua.py +19 -19
- holidays/countries/nigeria.py +1 -1
- holidays/countries/north_macedonia.py +1 -1
- holidays/countries/northern_mariana_islands.py +2 -1
- holidays/countries/norway.py +1 -1
- holidays/countries/oman.py +185 -0
- holidays/countries/pakistan.py +8 -1
- holidays/countries/palau.py +1 -1
- holidays/countries/panama.py +1 -1
- holidays/countries/papua_new_guinea.py +1 -1
- holidays/countries/paraguay.py +1 -1
- holidays/countries/peru.py +1 -1
- holidays/countries/philippines.py +1 -1
- holidays/countries/poland.py +1 -1
- holidays/countries/portugal.py +23 -25
- holidays/countries/puerto_rico.py +2 -1
- holidays/countries/qatar.py +1 -1
- holidays/countries/romania.py +1 -1
- holidays/countries/russia.py +1 -1
- holidays/countries/saint_kitts_and_nevis.py +1 -1
- holidays/countries/saint_lucia.py +1 -1
- holidays/countries/samoa.py +1 -1
- holidays/countries/san_marino.py +1 -1
- holidays/countries/sao_tome_and_principe.py +112 -0
- holidays/countries/saudi_arabia.py +1 -1
- holidays/countries/serbia.py +1 -1
- holidays/countries/seychelles.py +1 -1
- holidays/countries/sierra_leone.py +149 -0
- holidays/countries/singapore.py +5 -2
- holidays/countries/slovakia.py +1 -1
- holidays/countries/slovenia.py +1 -1
- holidays/countries/south_africa.py +1 -1
- holidays/countries/south_korea.py +17 -46
- holidays/countries/spain.py +43 -20
- holidays/countries/sri_lanka.py +1 -1
- holidays/countries/suriname.py +227 -0
- holidays/countries/sweden.py +1 -1
- holidays/countries/switzerland.py +61 -28
- holidays/countries/taiwan.py +3 -2
- holidays/countries/tanzania.py +1 -1
- holidays/countries/thailand.py +3 -3
- holidays/countries/timor_leste.py +1 -1
- holidays/countries/tonga.py +1 -1
- holidays/countries/trinidad_and_tobago.py +197 -0
- holidays/countries/tunisia.py +1 -1
- holidays/countries/turkey.py +1 -1
- holidays/countries/tuvalu.py +6 -6
- holidays/countries/ukraine.py +1 -1
- holidays/countries/united_arab_emirates.py +1 -1
- holidays/countries/united_kingdom.py +1 -1
- holidays/countries/united_states.py +62 -4
- holidays/countries/united_states_minor_outlying_islands.py +2 -1
- holidays/countries/united_states_virgin_islands.py +2 -1
- holidays/countries/uruguay.py +1 -1
- holidays/countries/uzbekistan.py +1 -1
- holidays/countries/vanuatu.py +1 -1
- holidays/countries/vatican_city.py +1 -1
- holidays/countries/venezuela.py +1 -1
- holidays/countries/vietnam.py +3 -2
- holidays/countries/zambia.py +1 -1
- holidays/countries/zimbabwe.py +1 -1
- holidays/deprecations/v1_incompatibility.py +1 -1
- holidays/financial/__init__.py +1 -1
- holidays/financial/brasil_bolsa_balcao.py +1 -1
- holidays/financial/european_central_bank.py +1 -1
- holidays/financial/ice_futures_europe.py +1 -1
- holidays/financial/ny_stock_exchange.py +1 -1
- holidays/groups/__init__.py +1 -1
- holidays/groups/balinese_saka.py +1 -1
- holidays/groups/buddhist.py +1 -1
- holidays/groups/chinese.py +6 -4
- holidays/groups/christian.py +1 -1
- holidays/groups/custom.py +1 -1
- holidays/groups/eastern.py +1 -1
- holidays/groups/hebrew.py +1 -1
- holidays/groups/hindu.py +45 -3
- holidays/groups/international.py +1 -1
- holidays/groups/islamic.py +11 -1
- holidays/groups/persian.py +1 -1
- holidays/groups/sinhala.py +1 -1
- holidays/groups/thai.py +6 -6
- holidays/helpers.py +1 -1
- holidays/holiday_base.py +32 -6
- holidays/ical.py +2 -2
- holidays/locale/am/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/OM.mo +0 -0
- holidays/locale/en_CA/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/en_CI/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_ET/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_SL/LC_MESSAGES/SL.mo +0 -0
- holidays/locale/en_TT/LC_MESSAGES/TT.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ET.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KH.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/OM.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/SR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ST.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TT.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/TF.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/km/LC_MESSAGES/KH.mo +0 -0
- holidays/locale/nl/LC_MESSAGES/SR.mo +0 -0
- holidays/locale/pt_ST/LC_MESSAGES/ST.mo +0 -0
- holidays/locale/th/LC_MESSAGES/CA.mo +0 -0
- holidays/locale/th/LC_MESSAGES/KH.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/TF.mo +0 -0
- holidays/locale/ur_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/mixins.py +1 -1
- holidays/observed_holiday_base.py +6 -2
- holidays/registry.py +7 -1
- holidays/utils.py +61 -9
- holidays/version.py +2 -2
- {holidays-0.70.dist-info → holidays-0.72.dist-info}/METADATA +64 -16
- {holidays-0.70.dist-info → holidays-0.72.dist-info}/RECORD +254 -234
- {holidays-0.70.dist-info → holidays-0.72.dist-info}/WHEEL +1 -1
- holidays-0.70.dist-info/licenses/AUTHORS.md → holidays-0.72.dist-info/licenses/CONTRIBUTORS +4 -2
- {holidays-0.70.dist-info → holidays-0.72.dist-info}/licenses/LICENSE +1 -1
- {holidays-0.70.dist-info → holidays-0.72.dist-info}/top_level.txt +0 -0
holidays/countries/vietnam.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
from datetime import date
|
|
14
14
|
from gettext import gettext as tr
|
|
15
15
|
|
|
16
|
+
from holidays.calendars.chinese import VIETNAMESE_CALENDAR
|
|
16
17
|
from holidays.calendars.gregorian import (
|
|
17
18
|
JAN,
|
|
18
19
|
FEB,
|
|
@@ -59,7 +60,7 @@ class Vietnam(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHoliday
|
|
|
59
60
|
supported_languages = ("en_US", "th", "vi")
|
|
60
61
|
|
|
61
62
|
def __init__(self, *args, **kwargs):
|
|
62
|
-
ChineseCalendarHolidays.__init__(self)
|
|
63
|
+
ChineseCalendarHolidays.__init__(self, calendar=VIETNAMESE_CALENDAR)
|
|
63
64
|
InternationalHolidays.__init__(self)
|
|
64
65
|
StaticHolidays.__init__(self, VietnamStaticHolidays)
|
|
65
66
|
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
|
holidays/countries/zambia.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/countries/zimbabwe.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/financial/__init__.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/__init__.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/balinese_saka.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/buddhist.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/chinese.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
from datetime import date
|
|
14
14
|
from typing import Optional
|
|
15
15
|
|
|
16
|
-
from holidays.calendars import _ChineseLunisolar
|
|
16
|
+
from holidays.calendars.chinese import _ChineseLunisolar, CHINESE_CALENDAR
|
|
17
17
|
from holidays.calendars.gregorian import APR, DEC
|
|
18
18
|
from holidays.groups.eastern import EasternCalendarHolidays
|
|
19
19
|
|
|
@@ -23,8 +23,10 @@ class ChineseCalendarHolidays(EasternCalendarHolidays):
|
|
|
23
23
|
Chinese lunisolar calendar holidays.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
def __init__(self, cls=None, show_estimated=False) -> None:
|
|
27
|
-
self._chinese_calendar =
|
|
26
|
+
def __init__(self, cls=None, show_estimated=False, calendar=CHINESE_CALENDAR) -> None:
|
|
27
|
+
self._chinese_calendar = (
|
|
28
|
+
cls(calendar=calendar) if cls else _ChineseLunisolar(calendar=calendar)
|
|
29
|
+
)
|
|
28
30
|
self._chinese_calendar_show_estimated = show_estimated
|
|
29
31
|
|
|
30
32
|
@property
|
holidays/groups/christian.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/custom.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/eastern.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/hebrew.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/hindu.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -28,7 +28,7 @@ class HinduCalendarHolidays(EasternCalendarHolidays):
|
|
|
28
28
|
self._hindu_calendar_show_estimated = show_estimated
|
|
29
29
|
|
|
30
30
|
def _add_hindu_calendar_holiday(
|
|
31
|
-
self, name: str, dt_estimated: tuple[Optional[date], bool]
|
|
31
|
+
self, name: str, dt_estimated: tuple[Optional[date], bool], days_delta: int = 0
|
|
32
32
|
) -> Optional[date]:
|
|
33
33
|
"""
|
|
34
34
|
Add Hindu calendar holiday.
|
|
@@ -38,7 +38,7 @@ class HinduCalendarHolidays(EasternCalendarHolidays):
|
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
40
|
return self._add_eastern_calendar_holiday(
|
|
41
|
-
name, dt_estimated, self._hindu_calendar_show_estimated
|
|
41
|
+
name, dt_estimated, self._hindu_calendar_show_estimated, days_delta
|
|
42
42
|
)
|
|
43
43
|
|
|
44
44
|
def _add_hindu_calendar_holiday_set(
|
|
@@ -256,6 +256,18 @@ class HinduCalendarHolidays(EasternCalendarHolidays):
|
|
|
256
256
|
"""
|
|
257
257
|
return self._add_hindu_calendar_holiday(name, self._hindu_calendar.onam_date(self._year))
|
|
258
258
|
|
|
259
|
+
def _add_pongal(self, name) -> Optional[date]:
|
|
260
|
+
"""
|
|
261
|
+
Add Pongal.
|
|
262
|
+
|
|
263
|
+
Pongal is a major harvest festival celebrated in Tamil Nadu, India, marking the
|
|
264
|
+
beginning of the sun's northward journey (Uttarayana). It is usually observed
|
|
265
|
+
on January 14th or 15th every year, coinciding with the Tamil month of Thai.
|
|
266
|
+
The festival is dedicated to the Sun God and marks a season of prosperity and abundance.
|
|
267
|
+
https://en.wikipedia.org/wiki/Pongal_(festival)
|
|
268
|
+
"""
|
|
269
|
+
return self._add_hindu_calendar_holiday(name, self._hindu_calendar.pongal_date(self._year))
|
|
270
|
+
|
|
259
271
|
def _add_raksha_bandhan(self, name) -> Optional[date]:
|
|
260
272
|
"""
|
|
261
273
|
Add Raksha Bandhan.
|
|
@@ -306,6 +318,36 @@ class HinduCalendarHolidays(EasternCalendarHolidays):
|
|
|
306
318
|
name, self._hindu_calendar.thaipusam_date(self._year)
|
|
307
319
|
)
|
|
308
320
|
|
|
321
|
+
def _add_thiruvalluvar_day(self, name) -> Optional[date]:
|
|
322
|
+
"""
|
|
323
|
+
Add Thiruvalluvar Day and Mattu Pongal.
|
|
324
|
+
|
|
325
|
+
Thiruvalluvar Day and Mattu Pongal are celebrated in Tamil Nadu, India, as part
|
|
326
|
+
of the Pongal festival. Thiruvalluvar Day honors the classical Tamil poet and
|
|
327
|
+
philosopher Thiruvalluvar, while Mattu Pongal is dedicated to cattle, recognizing
|
|
328
|
+
their importance in agriculture. Both events usually fall on January 15th or 16th
|
|
329
|
+
each year during the Tamil month of Thai.
|
|
330
|
+
https://en.wikipedia.org/wiki/Thiruvalluvar_Day
|
|
331
|
+
https://en.wikipedia.org/wiki/Pongal_(festival)#Mattu_Pongal
|
|
332
|
+
"""
|
|
333
|
+
return self._add_hindu_calendar_holiday(
|
|
334
|
+
name, self._hindu_calendar.pongal_date(self._year), days_delta=+1
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
def _add_uzhavar_thirunal(self, name) -> Optional[date]:
|
|
338
|
+
"""
|
|
339
|
+
Add Uzhavar Thirunal.
|
|
340
|
+
|
|
341
|
+
Uzhavar Thirunal is a harvest festival celebrated in Tamil Nadu, India,
|
|
342
|
+
as part of the Pongal festivities. It is dedicated to honoring farmers
|
|
343
|
+
(uzhavar) and their contribution to agriculture. Uzhavar Thirunal usually
|
|
344
|
+
falls on January 16th or 17th each year.
|
|
345
|
+
https://en.wikipedia.org/wiki/Pongal_(festival)#Uzhavar_Thirunal
|
|
346
|
+
"""
|
|
347
|
+
return self._add_hindu_calendar_holiday(
|
|
348
|
+
name, self._hindu_calendar.pongal_date(self._year), days_delta=+2
|
|
349
|
+
)
|
|
350
|
+
|
|
309
351
|
def _add_vaisakhi(self, name) -> Optional[date]:
|
|
310
352
|
"""
|
|
311
353
|
Add Vaisakhi.
|
holidays/groups/international.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/islamic.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -242,6 +242,16 @@ class IslamicHolidays(EasternCalendarHolidays):
|
|
|
242
242
|
name, self._islamic_calendar.hasan_al_askari_death_dates(self._year)
|
|
243
243
|
)
|
|
244
244
|
|
|
245
|
+
def _add_holiday_29_ramadan(self, name) -> set[date]:
|
|
246
|
+
"""
|
|
247
|
+
Add 29th Ramadan holiday.
|
|
248
|
+
|
|
249
|
+
https://decree.om/2022/rd20220088/
|
|
250
|
+
"""
|
|
251
|
+
return self._add_islamic_calendar_holiday(
|
|
252
|
+
name, self._islamic_calendar.ramadan_beginning_dates(self._year), days_delta=+28
|
|
253
|
+
)
|
|
254
|
+
|
|
245
255
|
def _add_imam_mahdi_birthday_day(self, name) -> set[date]:
|
|
246
256
|
"""
|
|
247
257
|
Add birthday of Muhammad al-Mahdi day (15th day of 8th month).
|
holidays/groups/persian.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/sinhala.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/groups/thai.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -118,13 +118,13 @@ class ThaiCalendarHolidays:
|
|
|
118
118
|
"""
|
|
119
119
|
Add Makha Bucha.
|
|
120
120
|
|
|
121
|
-
Māgha Pūjā (also written as Makha
|
|
122
|
-
celebrated on the 15th Waxing Day (Full Moon) of Month 3.
|
|
121
|
+
Māgha Pūjā (also written as Makha Bousa and Meak Bochea Day) is a Buddhist
|
|
122
|
+
festival celebrated on the 15th Waxing Day (Full Moon) of Month 3.
|
|
123
123
|
|
|
124
124
|
Khmer variant: always fall on Month 3.
|
|
125
125
|
Thai variant: will use Month 4 instead for Athikamat years.
|
|
126
126
|
|
|
127
|
-
https://en.wikipedia.org/wiki/
|
|
127
|
+
https://en.wikipedia.org/wiki/Māgha_Pūjā
|
|
128
128
|
"""
|
|
129
129
|
calendar = calendar or self.__calendar
|
|
130
130
|
|
|
@@ -190,14 +190,14 @@ class ThaiCalendarHolidays:
|
|
|
190
190
|
"""
|
|
191
191
|
Add Visakha Bucha.
|
|
192
192
|
|
|
193
|
-
Vesak(also written as
|
|
193
|
+
Vesak (also written as Visakha Bousa Day and Visaka Bochea Day) is a
|
|
194
194
|
Buddhist festival celebrated on the 15th Waxing Day (Full Moon)
|
|
195
195
|
of Month 6.
|
|
196
196
|
|
|
197
197
|
Khmer variant: always fall on Month 6.
|
|
198
198
|
Thai variant: will use Month 7 instead for Athikamat years.
|
|
199
199
|
|
|
200
|
-
https://en.wikipedia.org/wiki/
|
|
200
|
+
https://en.wikipedia.org/wiki/Vesak
|
|
201
201
|
"""
|
|
202
202
|
calendar = calendar or self.__calendar
|
|
203
203
|
|
holidays/helpers.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
holidays/holiday_base.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -290,10 +290,36 @@ class HolidayBase(dict[date, str]):
|
|
|
290
290
|
*deprecated* use `subdiv` instead.
|
|
291
291
|
|
|
292
292
|
language:
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
293
|
+
Specifies the language in which holiday names are returned.
|
|
294
|
+
|
|
295
|
+
Accepts either:
|
|
296
|
+
|
|
297
|
+
* A two-letter ISO 639-1 language code (e.g., 'en' for English, 'fr' for French),
|
|
298
|
+
or
|
|
299
|
+
* A language and entity combination using an underscore (e.g., 'en_US' for U.S.
|
|
300
|
+
English, 'pt_BR' for Brazilian Portuguese).
|
|
301
|
+
|
|
302
|
+
!!! warning
|
|
303
|
+
The provided language or locale code must be supported by the holiday
|
|
304
|
+
entity. Unsupported values will result in names being shown in the entity's
|
|
305
|
+
original language.
|
|
306
|
+
|
|
307
|
+
If not explicitly set (`language=None`), the system attempts to infer the
|
|
308
|
+
language from the environment's locale settings. The following environment
|
|
309
|
+
variables are checked, in order of precedence: LANGUAGE, LC_ALL, LC_MESSAGES, LANG.
|
|
310
|
+
|
|
311
|
+
If none of these are set or they are empty, holiday names will default to the
|
|
312
|
+
original language of the entity's holiday implementation.
|
|
313
|
+
|
|
314
|
+
!!! warning
|
|
315
|
+
This fallback mechanism may yield inconsistent results across environments
|
|
316
|
+
(e.g., between a terminal session and a Jupyter notebook).
|
|
317
|
+
|
|
318
|
+
To ensure consistent behavior, it is recommended to set the language parameter
|
|
319
|
+
explicitly. If the specified language is not supported, holiday names will remain
|
|
320
|
+
in the original language of the entity's holiday implementation.
|
|
321
|
+
|
|
322
|
+
This behavior will be updated and formalized in v1.
|
|
297
323
|
|
|
298
324
|
categories:
|
|
299
325
|
Requested holiday categories.
|
|
@@ -1040,7 +1066,7 @@ class HolidayBase(dict[date, str]):
|
|
|
1040
1066
|
|
|
1041
1067
|
def get_closest_holiday(
|
|
1042
1068
|
self,
|
|
1043
|
-
target_date: DateLike = None,
|
|
1069
|
+
target_date: Optional[DateLike] = None,
|
|
1044
1070
|
direction: Literal["forward", "backward"] = "forward",
|
|
1045
1071
|
) -> Optional[tuple[date, str]]:
|
|
1046
1072
|
"""Find the closest holiday relative to a given date.
|
holidays/ical.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -212,7 +212,7 @@ class ICalExporter:
|
|
|
212
212
|
def save_ics(self, file_path: str) -> None:
|
|
213
213
|
"""Export the calendar data to a .ics file.
|
|
214
214
|
|
|
215
|
-
While RFC 5545 does not specifically forbid filenames for .ics files, but it
|
|
215
|
+
While RFC 5545 does not specifically forbid filenames for .ics files, but it's advisable
|
|
216
216
|
to follow general filesystem conventions and avoid using problematic characters.
|
|
217
217
|
|
|
218
218
|
Args:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
holidays/mixins.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -104,7 +104,11 @@ class ObservedHolidayBase(HolidayBase):
|
|
|
104
104
|
observed_label = "%s"
|
|
105
105
|
|
|
106
106
|
def __init__(
|
|
107
|
-
self,
|
|
107
|
+
self,
|
|
108
|
+
observed_rule: Optional[ObservedRule] = None,
|
|
109
|
+
observed_since: Optional[int] = None,
|
|
110
|
+
*args,
|
|
111
|
+
**kwargs,
|
|
108
112
|
):
|
|
109
113
|
self._observed_rule = observed_rule or ObservedRule()
|
|
110
114
|
self._observed_since = observed_since
|