holidays 0.76__py3-none-any.whl → 0.77__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/countries/__init__.py +19 -0
- holidays/countries/australia.py +6 -8
- holidays/countries/british_virgin_islands.py +6 -6
- holidays/countries/cabo_verde.py +293 -0
- holidays/countries/cayman_islands.py +162 -0
- holidays/countries/central_african_republic.py +143 -0
- holidays/countries/christmas_island.py +215 -0
- holidays/countries/cocos_islands.py +4 -4
- holidays/countries/dr_congo.py +139 -0
- holidays/countries/faroe_islands.py +102 -0
- holidays/countries/georgia.py +11 -5
- holidays/countries/gibraltar.py +219 -0
- holidays/countries/guernsey.py +6 -6
- holidays/countries/japan.py +6 -8
- holidays/countries/jersey.py +2 -2
- holidays/countries/lebanon.py +448 -0
- holidays/countries/mali.py +151 -0
- holidays/countries/montserrat.py +177 -0
- holidays/countries/nepal.py +8 -8
- holidays/countries/new_zealand.py +2 -2
- holidays/countries/niue.py +115 -0
- holidays/countries/norfolk_island.py +129 -0
- holidays/countries/palau.py +1 -1
- holidays/countries/palestine.py +177 -0
- holidays/countries/peru.py +12 -0
- holidays/countries/saint_vincent_and_the_grenadines.py +130 -0
- holidays/countries/seychelles.py +1 -1
- holidays/countries/solomon_islands.py +2 -2
- holidays/countries/tokelau.py +66 -0
- holidays/countries/turks_and_caicos_islands.py +2 -2
- holidays/countries/united_kingdom.py +2 -2
- holidays/countries/united_states.py +2 -5
- holidays/groups/christian.py +10 -10
- holidays/groups/hebrew.py +2 -2
- holidays/groups/islamic.py +17 -0
- holidays/holiday_base.py +1 -1
- holidays/locale/ar/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/ar/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/da/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/de/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/en_CX/LC_MESSAGES/CX.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/GI.mo +0 -0
- holidays/locale/en_GB/LC_MESSAGES/KY.mo +0 -0
- holidays/locale/en_MS/LC_MESSAGES/MS.mo +0 -0
- holidays/locale/en_NF/LC_MESSAGES/NF.mo +0 -0
- holidays/locale/en_NU/LC_MESSAGES/NU.mo +0 -0
- holidays/locale/en_TK/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CD.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CX.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/KY.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/LB.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NF.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/NU.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PE.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PS.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/VC.mo +0 -0
- holidays/locale/en_VC/LC_MESSAGES/VC.mo +0 -0
- holidays/locale/es/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/fo/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CD.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CF.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/ML.mo +0 -0
- holidays/locale/is/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/no/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/pt_CV/LC_MESSAGES/CV.mo +0 -0
- holidays/locale/sv/LC_MESSAGES/FO.mo +0 -0
- holidays/locale/tkl/LC_MESSAGES/TK.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/PE.mo +0 -0
- holidays/observed_holiday_base.py +3 -1
- holidays/registry.py +15 -0
- holidays/version.py +1 -1
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/METADATA +107 -2
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/RECORD +85 -32
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/licenses/CONTRIBUTORS +3 -0
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/WHEEL +0 -0
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/licenses/LICENSE +0 -0
- {holidays-0.76.dist-info → holidays-0.77.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# holidays
|
|
2
|
+
# --------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars import _CustomIslamicHolidays
|
|
16
|
+
from holidays.calendars.gregorian import MAR, APR, MAY, JUN, JUL, AUG, SEP
|
|
17
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
18
|
+
from holidays.holiday_base import HolidayBase
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class CentralAfricanRepublic(
|
|
22
|
+
HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays
|
|
23
|
+
):
|
|
24
|
+
"""Central African Republic holidays.
|
|
25
|
+
|
|
26
|
+
References:
|
|
27
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Central_African_Republic>
|
|
28
|
+
* [PUBLIC HOLIDAYS](https://web.archive.org/web/20171215122602/http://www.ais-asecna.org/pdf/gen/gen-2-1/04gen2-1-01.pdf)
|
|
29
|
+
* <https://web.archive.org/web/20250122135347/https://corbeaunews-centrafrique.org/lindependance-et-la-fete-nationale-deux-dates-distinctes-pour-la-republique-centrafricaine/>
|
|
30
|
+
* <https://web.archive.org/web/20250715092147/https://www.rfi.fr/fr/afrique/20160912-rca-fete-tabaski-est-desormais-jour-ferie>
|
|
31
|
+
* <https://web.archive.org/web/20250715093233/https://www.aa.com.tr/fr/culture-et-arts/lofficialisation-des-fêtes-musulmanes-en-rca-nouvelle-donne-pour-la-cohésion-sociale/45806>
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
country = "CF"
|
|
35
|
+
default_language = "fr"
|
|
36
|
+
supported_languages = ("en_US", "fr")
|
|
37
|
+
# %s (estimated).
|
|
38
|
+
estimated_label = tr("%s (estimé)")
|
|
39
|
+
# December 1, 1958: Autonomy within the French Community.
|
|
40
|
+
start_year = 1959
|
|
41
|
+
|
|
42
|
+
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
43
|
+
"""
|
|
44
|
+
Args:
|
|
45
|
+
islamic_show_estimated:
|
|
46
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
47
|
+
if holiday date is estimated.
|
|
48
|
+
"""
|
|
49
|
+
ChristianHolidays.__init__(self)
|
|
50
|
+
InternationalHolidays.__init__(self)
|
|
51
|
+
IslamicHolidays.__init__(
|
|
52
|
+
self, cls=CentralAfricanRepublicIslamicHolidays, show_estimated=islamic_show_estimated
|
|
53
|
+
)
|
|
54
|
+
super().__init__(*args, **kwargs)
|
|
55
|
+
|
|
56
|
+
def _populate_public_holidays(self):
|
|
57
|
+
# New Year's Day.
|
|
58
|
+
self._add_new_years_day(tr("Jour de l'an"))
|
|
59
|
+
|
|
60
|
+
if self._year >= 1960:
|
|
61
|
+
# Barthélemy Boganda Day.
|
|
62
|
+
self._add_holiday_mar_29(tr("Journée Barthélemy Boganda"))
|
|
63
|
+
|
|
64
|
+
# Easter Monday.
|
|
65
|
+
self._add_easter_monday(tr("Lundi de Pâques"))
|
|
66
|
+
|
|
67
|
+
# Labor Day.
|
|
68
|
+
self._add_labor_day(tr("Fête du Travail"))
|
|
69
|
+
|
|
70
|
+
# Ascension Day.
|
|
71
|
+
self._add_ascension_thursday(tr("Ascension"))
|
|
72
|
+
|
|
73
|
+
# Whit Monday.
|
|
74
|
+
self._add_whit_monday(tr("Lundi de Pentecôte"))
|
|
75
|
+
|
|
76
|
+
if self._year >= 2007:
|
|
77
|
+
# General Prayer Day.
|
|
78
|
+
self._add_holiday_jun_30(tr("Journée de prière générale"))
|
|
79
|
+
|
|
80
|
+
if self._year >= 1960:
|
|
81
|
+
# Independence Day.
|
|
82
|
+
self._add_holiday_aug_13(tr("Jour de l'indépendance"))
|
|
83
|
+
|
|
84
|
+
# Assumption Day.
|
|
85
|
+
self._add_assumption_of_mary_day(tr("Assomption"))
|
|
86
|
+
|
|
87
|
+
# All Saints' Day.
|
|
88
|
+
self._add_all_saints_day(tr("Toussaint"))
|
|
89
|
+
|
|
90
|
+
# National Day.
|
|
91
|
+
name = tr("Fête nationale")
|
|
92
|
+
if self._year in {1977, 1978}:
|
|
93
|
+
self._add_holiday_dec_4(name)
|
|
94
|
+
else:
|
|
95
|
+
self._add_holiday_dec_1(name)
|
|
96
|
+
|
|
97
|
+
# Christmas Day.
|
|
98
|
+
self._add_christmas_day(tr("Jour de Noël"))
|
|
99
|
+
|
|
100
|
+
if self._year >= 2015:
|
|
101
|
+
# Eid al-Fitr.
|
|
102
|
+
self._add_eid_al_fitr_day(tr("Aïd al-Fitr"))
|
|
103
|
+
|
|
104
|
+
# Eid al-Adha.
|
|
105
|
+
self._add_eid_al_adha_day(tr("Aïd al-Adha"))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class CF(CentralAfricanRepublic):
|
|
109
|
+
pass
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class CAF(CentralAfricanRepublic):
|
|
113
|
+
pass
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class CentralAfricanRepublicIslamicHolidays(_CustomIslamicHolidays):
|
|
117
|
+
EID_AL_ADHA_DATES = {
|
|
118
|
+
2015: (SEP, 24),
|
|
119
|
+
2016: (SEP, 13),
|
|
120
|
+
2017: (SEP, 2),
|
|
121
|
+
2018: (AUG, 21),
|
|
122
|
+
2019: (AUG, 11),
|
|
123
|
+
2020: (JUL, 31),
|
|
124
|
+
2021: (JUL, 20),
|
|
125
|
+
2022: (JUL, 9),
|
|
126
|
+
2023: (JUN, 28),
|
|
127
|
+
2024: (JUN, 16),
|
|
128
|
+
2025: (JUN, 7),
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
EID_AL_FITR_DATES = {
|
|
132
|
+
2015: (JUL, 18),
|
|
133
|
+
2016: (JUL, 7),
|
|
134
|
+
2017: (JUN, 26),
|
|
135
|
+
2018: (JUN, 15),
|
|
136
|
+
2019: (JUN, 4),
|
|
137
|
+
2020: (MAY, 24),
|
|
138
|
+
2021: (MAY, 13),
|
|
139
|
+
2022: (MAY, 2),
|
|
140
|
+
2023: (APR, 21),
|
|
141
|
+
2024: (APR, 10),
|
|
142
|
+
2025: (MAR, 30),
|
|
143
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# holidays
|
|
2
|
+
# --------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars import _CustomChineseHolidays, _CustomIslamicHolidays
|
|
16
|
+
from holidays.calendars.gregorian import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
|
|
17
|
+
from holidays.groups import (
|
|
18
|
+
ChineseCalendarHolidays,
|
|
19
|
+
ChristianHolidays,
|
|
20
|
+
InternationalHolidays,
|
|
21
|
+
IslamicHolidays,
|
|
22
|
+
StaticHolidays,
|
|
23
|
+
)
|
|
24
|
+
from holidays.observed_holiday_base import (
|
|
25
|
+
ObservedHolidayBase,
|
|
26
|
+
MON_TO_NEXT_TUE,
|
|
27
|
+
SAT_SUN_TO_NEXT_MON,
|
|
28
|
+
SAT_SUN_TO_NEXT_MON_TUE,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ChristmasIsland(
|
|
33
|
+
ObservedHolidayBase,
|
|
34
|
+
ChineseCalendarHolidays,
|
|
35
|
+
ChristianHolidays,
|
|
36
|
+
InternationalHolidays,
|
|
37
|
+
IslamicHolidays,
|
|
38
|
+
StaticHolidays,
|
|
39
|
+
):
|
|
40
|
+
"""Christmas Island holidays.
|
|
41
|
+
|
|
42
|
+
References:
|
|
43
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Christmas_Island>
|
|
44
|
+
* [2007](https://web.archive.org/web/20250612072036/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2006/01-2006_Public_Holidays_2007_CI.doc)
|
|
45
|
+
* [2008](https://web.archive.org/web/20240224131231/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2007/05-2007_Public_Holidays_CI.pdf)
|
|
46
|
+
* [2008 Hari Raya Puasa](https://web.archive.org/web/20240331104649/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2008/03_2008_Observance_of_Hari_Raya_Puasa_2008.pdf)
|
|
47
|
+
* [2009](https://web.archive.org/web/20231211180406/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2008/02-2008_2009_public_holiday_CI_gazette.pdf)
|
|
48
|
+
* [2010](https://web.archive.org/web/20250612051603/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2009/2009-Gazette_5-2009-CI-Proclamation_of_2010_Special_Public_and_Bank_Holidays.pdf)
|
|
49
|
+
* [2013](https://web.archive.org/web/20240805060802/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2012/2012-Gazette_7-2012-CI-Proclamation_of_2013_Public_Holidays_for_Christmas_Island.pdf)
|
|
50
|
+
* [2014](https://web.archive.org/web/20240718175750/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2013/2013-Gazette_2-2013-Christmas_Island_2014_Public_Holidays.pdf)
|
|
51
|
+
* [2016 Hari Raya Puasa](https://web.archive.org/web/20240222235345/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2016/2016-Gazette_4-2016-CI-Proclamation_Special_Public_and_Bank_Holidays_2016.pdf)
|
|
52
|
+
* [2017](https://web.archive.org/web/20240226014639/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_gazette/files/2016/2016-Gazette_1-2016-CI-Proclamation_Special_Public_and_Bank_Holidays_2017.pdf)
|
|
53
|
+
* [2019](https://web.archive.org/web/20250517064053/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_bulletins/2018/files/A37-2018.pdf)
|
|
54
|
+
* [2020](https://web.archive.org/web/20240830230128/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_bulletins/2019/files/A52-2019.pdf)
|
|
55
|
+
* [2021](https://web.archive.org/web/20240713155232/https://www.infrastructure.gov.au/sites/default/files/migrated/territories/indian_ocean/iot_bulletins/2020/files/a40-ci-public-holidays-2021-proclamation.pdf)
|
|
56
|
+
* [2022](https://web.archive.org/web/20240626092850/https://www.infrastructure.gov.au/sites/default/files/documents/a32-2021-2022-public-holidays-christmas-island.pdf)
|
|
57
|
+
* [2023](https://web.archive.org/web/20250612044842/https://www.infrastructure.gov.au/sites/default/files/documents/A06-2022-notice-proclamation-special-public-bank-holidays-2023-ci.pdf)
|
|
58
|
+
* [2023 Hari Raya Haji](https://web.archive.org/web/20240804112114/https://www.infrastructure.gov.au/sites/default/files/documents/a06-2023_community_bulletin_-_change_of_public_holiday_date_for_hari_raya_haji_2023.pdf)
|
|
59
|
+
* [2024](https://web.archive.org/web/20240519034837/https://www.infrastructure.gov.au/sites/default/files/documents/a11-2023-2024-public-holidays-christmas-island.pdf)
|
|
60
|
+
* [2025](https://web.archive.org/web/20250610185153/https://www.infrastructure.gov.au/sites/default/files/documents/a20-2024-administrator-community-bulletin-ci-public-holidays-2025.pdf)
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
country = "CX"
|
|
64
|
+
default_language = "en_CX"
|
|
65
|
+
# %s (observed).
|
|
66
|
+
observed_label = tr("%s (observed)")
|
|
67
|
+
# %s (estimated).
|
|
68
|
+
estimated_label = tr("%s (estimated)")
|
|
69
|
+
# %s (observed, estimated).
|
|
70
|
+
observed_estimated_label = tr("%s (observed, estimated)")
|
|
71
|
+
supported_languages = ("en_CX", "en_US")
|
|
72
|
+
start_year = 2007
|
|
73
|
+
|
|
74
|
+
def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
|
|
75
|
+
ChineseCalendarHolidays.__init__(self, cls=ChristmasIslandChineseHolidays)
|
|
76
|
+
ChristianHolidays.__init__(self)
|
|
77
|
+
InternationalHolidays.__init__(self)
|
|
78
|
+
IslamicHolidays.__init__(
|
|
79
|
+
self, cls=ChristmasIslandIslamicHolidays, show_estimated=islamic_show_estimated
|
|
80
|
+
)
|
|
81
|
+
StaticHolidays.__init__(self, ChristmasIslandStaticHolidays)
|
|
82
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_MON)
|
|
83
|
+
super().__init__(*args, **kwargs)
|
|
84
|
+
|
|
85
|
+
def _populate_public_holidays(self):
|
|
86
|
+
# New Year's Day.
|
|
87
|
+
self._add_observed(self._add_new_years_day(tr("New Year's Day")))
|
|
88
|
+
|
|
89
|
+
# Australia Day.
|
|
90
|
+
self._add_observed(self._add_holiday_jan_26(tr("Australia Day")))
|
|
91
|
+
|
|
92
|
+
# Chinese New Year.
|
|
93
|
+
name = tr("Chinese New Year")
|
|
94
|
+
if self._year != 2020:
|
|
95
|
+
self._add_observed(self._add_chinese_new_years_day(name), rule=SAT_SUN_TO_NEXT_MON_TUE)
|
|
96
|
+
self._add_observed(
|
|
97
|
+
self._add_chinese_new_years_day_two(name), rule=SAT_SUN_TO_NEXT_MON_TUE
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# Labor Day.
|
|
101
|
+
name = tr("Labour Day")
|
|
102
|
+
if self._year in {2009, 2010, 2014, 2021, 2025}:
|
|
103
|
+
self._add_holiday_4th_mon_of_mar(name)
|
|
104
|
+
else:
|
|
105
|
+
self._add_holiday_3rd_mon_of_mar(name)
|
|
106
|
+
|
|
107
|
+
# Good Friday.
|
|
108
|
+
self._add_good_friday(tr("Good Friday"))
|
|
109
|
+
|
|
110
|
+
# ANZAC Day.
|
|
111
|
+
self._add_observed(self._add_anzac_day(tr("ANZAC Day")))
|
|
112
|
+
|
|
113
|
+
# Territory Day.
|
|
114
|
+
self._add_holiday_1st_mon_of_oct(tr("Territory Day"))
|
|
115
|
+
|
|
116
|
+
self._add_observed(
|
|
117
|
+
# Boxing Day.
|
|
118
|
+
self._add_christmas_day_two(tr("Boxing Day")),
|
|
119
|
+
rule=SAT_SUN_TO_NEXT_MON_TUE + MON_TO_NEXT_TUE,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# Christmas Day.
|
|
123
|
+
self._add_observed(self._add_christmas_day(tr("Christmas Day")))
|
|
124
|
+
|
|
125
|
+
# Eid al-Fitr.
|
|
126
|
+
for dt in self._add_eid_al_fitr_day(tr("Hari Raya Puasa")):
|
|
127
|
+
self._add_observed(dt)
|
|
128
|
+
|
|
129
|
+
# Eid al-Adha.
|
|
130
|
+
for dt in self._add_eid_al_adha_day(tr("Hari Raya Haji")):
|
|
131
|
+
if self._year not in {2014, 2025}:
|
|
132
|
+
self._add_observed(dt)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class ChristmasIslandChineseHolidays(_CustomChineseHolidays):
|
|
136
|
+
LUNAR_NEW_YEAR_DATES = {
|
|
137
|
+
2007: (FEB, 19),
|
|
138
|
+
2009: (JAN, 27),
|
|
139
|
+
2010: (FEB, 15),
|
|
140
|
+
2023: (JAN, 23),
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class ChristmasIslandIslamicHolidays(_CustomIslamicHolidays):
|
|
145
|
+
EID_AL_ADHA_DATES = {
|
|
146
|
+
2007: (DEC, 20),
|
|
147
|
+
2008: (DEC, 8),
|
|
148
|
+
2009: (NOV, 30),
|
|
149
|
+
2010: (NOV, 16),
|
|
150
|
+
2013: (OCT, 15),
|
|
151
|
+
2014: (OCT, 5),
|
|
152
|
+
2016: (SEP, 13),
|
|
153
|
+
2017: (SEP, 1),
|
|
154
|
+
2019: (AUG, 11),
|
|
155
|
+
2020: (JUL, 31),
|
|
156
|
+
2021: (JUL, 20),
|
|
157
|
+
2022: (JUL, 9),
|
|
158
|
+
2023: (JUN, 28),
|
|
159
|
+
2024: (JUN, 17),
|
|
160
|
+
2025: (JUN, 7),
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
EID_AL_FITR_DATES = {
|
|
164
|
+
2007: (OCT, 15),
|
|
165
|
+
2008: (OCT, 1),
|
|
166
|
+
2009: (SEP, 21),
|
|
167
|
+
2010: (SEP, 10),
|
|
168
|
+
2013: (AUG, 8),
|
|
169
|
+
2014: (JUL, 28),
|
|
170
|
+
2016: (JUL, 6),
|
|
171
|
+
2017: (JUN, 24),
|
|
172
|
+
2019: (JUN, 5),
|
|
173
|
+
2020: (MAY, 24),
|
|
174
|
+
2021: (MAY, 13),
|
|
175
|
+
2022: (MAY, 2),
|
|
176
|
+
2023: (APR, 22),
|
|
177
|
+
2024: (APR, 10),
|
|
178
|
+
2025: (MAR, 31),
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class CX(ChristmasIsland):
|
|
183
|
+
pass
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class CXR(ChristmasIsland):
|
|
187
|
+
pass
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class ChristmasIslandStaticHolidays:
|
|
191
|
+
"""Christmas Island special holidays.
|
|
192
|
+
|
|
193
|
+
References:
|
|
194
|
+
* [National Day of Mourning 2022](https://web.archive.org/web/20240712013008/https://www.infrastructure.gov.au/sites/default/files/documents/03-2022-proclamation-ci-day-of-mourning.pdf)
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
# Chinese New Year.
|
|
198
|
+
chinese_new_year = tr("Chinese New Year")
|
|
199
|
+
|
|
200
|
+
# Eid al-Adha.
|
|
201
|
+
eid_al_adha = tr("Hari Raya Haji")
|
|
202
|
+
|
|
203
|
+
special_public_holidays = {
|
|
204
|
+
# National Day of Mourning for Queen Elizabeth II.
|
|
205
|
+
2022: (SEP, 22, tr("National Day of Mourning for Queen Elizabeth II")),
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
special_public_holidays_observed = {
|
|
209
|
+
2014: (OCT, 7, eid_al_adha),
|
|
210
|
+
2020: (
|
|
211
|
+
(JAN, 28, chinese_new_year),
|
|
212
|
+
(JAN, 29, chinese_new_year),
|
|
213
|
+
),
|
|
214
|
+
2025: (JUN, 6, eid_al_adha),
|
|
215
|
+
}
|
|
@@ -101,8 +101,8 @@ class CocosIslands(
|
|
|
101
101
|
}
|
|
102
102
|
# Act of Self Determination Day.
|
|
103
103
|
name = tr("Act of Self Determination Day")
|
|
104
|
-
if self._year
|
|
105
|
-
self._add_holiday(name,
|
|
104
|
+
if dt := act_of_self_determination_dates.get(self._year):
|
|
105
|
+
self._add_holiday(name, dt)
|
|
106
106
|
else:
|
|
107
107
|
dt = self._add_holiday_apr_6(name)
|
|
108
108
|
if self._year != 2019:
|
|
@@ -130,8 +130,8 @@ class CocosIslands(
|
|
|
130
130
|
# Queen's Birthday.
|
|
131
131
|
else tr("Queen's Birthday")
|
|
132
132
|
)
|
|
133
|
-
if self._year
|
|
134
|
-
self._add_holiday(name,
|
|
133
|
+
if dt := queens_kings_birthday_dates.get(self._year):
|
|
134
|
+
self._add_holiday(name, dt)
|
|
135
135
|
else:
|
|
136
136
|
self._add_holiday_2nd_mon_of_jun(name)
|
|
137
137
|
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# holidays
|
|
2
|
+
# --------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.calendars.gregorian import SUN
|
|
16
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
17
|
+
from holidays.observed_holiday_base import ObservedHolidayBase, SUN_TO_PREV_SAT
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DRCongo(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
21
|
+
"""Democratic Republic of the Congo holidays.
|
|
22
|
+
|
|
23
|
+
References:
|
|
24
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Democratic_Republic_of_the_Congo>
|
|
25
|
+
* [Ordonnance n° 79-154](https://web.archive.org/web/20220329181351/http://www.leganet.cd/Legislation/DroitSocial/O.79.154.23.06.1979.htm)
|
|
26
|
+
* [Ordonnance n° 14/010](https://web.archive.org/web/20230419184344/http://leganet.cd/Legislation/Divers/Ordonnance.14.10.14.mai.2014.htm)
|
|
27
|
+
* [Ordonnance n° 23-042](https://web.archive.org/web/20250113230411/http://www.droitcongolais.info/files/143.03.23_Ordonnance-du-30-mars-2023_jours-feries.pdf)
|
|
28
|
+
* [Loi n° 009-2002](https://web.archive.org/web/20250104233847/https://www.leganet.cd/Legislation/Droit%20administratif/Urbanismevoiries/Div/L.009.05.08.2002.htm)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
country = "CD"
|
|
32
|
+
default_language = "fr"
|
|
33
|
+
# %s (observed).
|
|
34
|
+
observed_label = tr("%s (observé)")
|
|
35
|
+
supported_languages = ("en_US", "fr")
|
|
36
|
+
# Ordonnance n° 79-154.
|
|
37
|
+
start_year = 1980
|
|
38
|
+
weekend = {SUN}
|
|
39
|
+
|
|
40
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
41
|
+
ChristianHolidays.__init__(self)
|
|
42
|
+
InternationalHolidays.__init__(self)
|
|
43
|
+
kwargs.setdefault("observed_rule", SUN_TO_PREV_SAT)
|
|
44
|
+
super().__init__(*args, **kwargs)
|
|
45
|
+
|
|
46
|
+
def _populate_public_holidays(self):
|
|
47
|
+
# New Year's Day.
|
|
48
|
+
name = tr("Nouvel an")
|
|
49
|
+
self._add_new_years_day(name)
|
|
50
|
+
self._add_observed(self._next_year_new_years_day, name=name)
|
|
51
|
+
|
|
52
|
+
# Established on May 10th, 2014 via Ordonnance n° 14/010.
|
|
53
|
+
if self._year >= 2015:
|
|
54
|
+
# Martyrs' Day.
|
|
55
|
+
self._add_observed(self._add_holiday_jan_4(tr("Martyrs de l'indépendance")))
|
|
56
|
+
|
|
57
|
+
self._add_observed(
|
|
58
|
+
# National Hero Laurent Désiré Kabila Day.
|
|
59
|
+
self._add_holiday_jan_16(tr("Journée du héros national Laurent Désiré Kabila"))
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
self._add_observed(
|
|
63
|
+
# National Hero Patrice Emery Lumumba Day.
|
|
64
|
+
self._add_holiday_jan_17(tr("Journée du héros national Patrice Emery Lumumba"))
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Established on March 30th, 2023 via Ordonnance n° 23-042.
|
|
68
|
+
if self._year >= 2023:
|
|
69
|
+
self._add_observed(
|
|
70
|
+
self._add_holiday_apr_6(
|
|
71
|
+
# Day of the Struggle of Simon Kimbangu and African Consciousness.
|
|
72
|
+
tr("Journée du combat de Simon Kimbangu et de la conscience africaine")
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Labor Day.
|
|
77
|
+
self._add_observed(self._add_labor_day(tr("Fête du travail")))
|
|
78
|
+
|
|
79
|
+
# Renamed on May 10th, 2014 via Ordonnance n° 14/010.
|
|
80
|
+
if self._year >= 2014:
|
|
81
|
+
self._add_observed(
|
|
82
|
+
# Revolution and Armed Forces Day.
|
|
83
|
+
self._add_holiday_may_17(tr("Journée de la Révolution et des Forces Armées"))
|
|
84
|
+
)
|
|
85
|
+
else:
|
|
86
|
+
# Armed Forces Day.
|
|
87
|
+
self._add_observed(self._add_holiday_nov_17(tr("Fête des Forces armées zaïroises")))
|
|
88
|
+
|
|
89
|
+
# Removed on May 10th, 2014 via Ordonnance n° 14/010.
|
|
90
|
+
if self._year <= 2013:
|
|
91
|
+
self._add_observed(
|
|
92
|
+
self._add_holiday_may_20(
|
|
93
|
+
# Anniversary of the Popular Movement of the Revolution.
|
|
94
|
+
tr("Anniversaire du Mouvement populaire de la révolution")
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
self._add_observed(
|
|
99
|
+
self._add_holiday_jun_24(
|
|
100
|
+
# Anniversary of the New Revolutionary Constitution.
|
|
101
|
+
tr("Anniversaire de la nouvelle Constitution révolutionnaire")
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
# Independence Day.
|
|
106
|
+
self._add_observed(self._add_holiday_jun_30(tr("Journée de l'indépendance")))
|
|
107
|
+
|
|
108
|
+
# Parents' Day.
|
|
109
|
+
self._add_observed(self._add_holiday_aug_1(tr("Fête des parents")))
|
|
110
|
+
|
|
111
|
+
if self._year >= 2024:
|
|
112
|
+
self._add_observed(
|
|
113
|
+
# Congolese Genocide Memorial Day.
|
|
114
|
+
self._add_holiday_aug_2(tr("Journée commémorative du génocide Congolais"))
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
# Removed on May 10th, 2014 via Ordonnance n° 14/010.
|
|
118
|
+
if self._year <= 2013:
|
|
119
|
+
# Youth Day.
|
|
120
|
+
self._add_observed(self._add_holiday_oct_14(tr("Journée de la Jeunesse")))
|
|
121
|
+
|
|
122
|
+
self._add_observed(
|
|
123
|
+
# Anniversary of the Country's Name Change.
|
|
124
|
+
self._add_holiday_oct_27(tr("Anniversaire du changement du nom de notre Pays"))
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
# Anniversary of the New Regime.
|
|
128
|
+
self._add_observed(self._add_holiday_nov_24(tr("Anniversaire du nouveau régime")))
|
|
129
|
+
|
|
130
|
+
# Christmas Day.
|
|
131
|
+
self._add_observed(self._add_christmas_day(tr("Noël")))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class CD(DRCongo):
|
|
135
|
+
pass
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class COD(DRCongo):
|
|
139
|
+
pass
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# holidays
|
|
2
|
+
# --------
|
|
3
|
+
# A fast, efficient Python library for generating country, province and state
|
|
4
|
+
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
|
+
# specific date is a holiday as fast and flexible as possible.
|
|
6
|
+
#
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
8
|
+
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
|
+
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
|
+
# Website: https://github.com/vacanza/holidays
|
|
11
|
+
# License: MIT (see LICENSE file)
|
|
12
|
+
|
|
13
|
+
from gettext import gettext as tr
|
|
14
|
+
|
|
15
|
+
from holidays.constants import HALF_DAY, PUBLIC
|
|
16
|
+
from holidays.groups import ChristianHolidays, InternationalHolidays
|
|
17
|
+
from holidays.holiday_base import HolidayBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class FaroeIslands(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
21
|
+
"""Faroe Islands holidays.
|
|
22
|
+
|
|
23
|
+
References:
|
|
24
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Faroe_Islands>
|
|
25
|
+
* [Decree no. 52 of 23 April 2003](https://web.archive.org/web/20241204233745/https://logir.fo/Kunngerd/52-fra-23-04-2003-um-flagging-fra-landsins-bygningum)
|
|
26
|
+
* [2007](https://web.archive.org/web/20250125193236/https://www.framtak.com/info/holidays.html))
|
|
27
|
+
* [2024](https://web.archive.org/web/20250615193008/https://visitfaroeislands.com/en/plan-your-stay/get-ready-for-your-trip/general-facts/public-holidays)
|
|
28
|
+
* [2025](https://web.archive.org/web/20250615193215/https://guidetofaroeislands.fo/travel-information/faroe-islands-holiday/)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
country = "FO"
|
|
32
|
+
default_language = "fo"
|
|
33
|
+
# Denmark granted home rule to the Faroe Islands on 30 March 1948.
|
|
34
|
+
start_year = 1949
|
|
35
|
+
supported_categories = (HALF_DAY, PUBLIC)
|
|
36
|
+
supported_languages = ("da", "en_US", "fo", "is", "no", "sv")
|
|
37
|
+
|
|
38
|
+
def __init__(self, *args, **kwargs):
|
|
39
|
+
ChristianHolidays.__init__(self)
|
|
40
|
+
InternationalHolidays.__init__(self)
|
|
41
|
+
super().__init__(*args, **kwargs)
|
|
42
|
+
|
|
43
|
+
def _populate_public_holidays(self):
|
|
44
|
+
# New Year's Day.
|
|
45
|
+
self._add_new_years_day(tr("Nýggjársdagur"))
|
|
46
|
+
|
|
47
|
+
# Maundy Thursday.
|
|
48
|
+
self._add_holy_thursday(tr("Skírhósdagur"))
|
|
49
|
+
|
|
50
|
+
# Good Friday.
|
|
51
|
+
self._add_good_friday(tr("Langifríggjadagur"))
|
|
52
|
+
|
|
53
|
+
# Easter Sunday.
|
|
54
|
+
self._add_easter_sunday(tr("Páskadagur"))
|
|
55
|
+
|
|
56
|
+
# Easter Monday.
|
|
57
|
+
self._add_easter_monday(tr("Annar páskadagur"))
|
|
58
|
+
|
|
59
|
+
# Great Prayer Day.
|
|
60
|
+
self._add_holiday_26_days_past_easter(tr("Dýri biðidagur"))
|
|
61
|
+
|
|
62
|
+
# Ascension Day.
|
|
63
|
+
self._add_ascension_thursday(tr("Kristi himmalsferðardagur"))
|
|
64
|
+
|
|
65
|
+
# Whit Sunday.
|
|
66
|
+
self._add_whit_sunday(tr("Hvítusunnudagur"))
|
|
67
|
+
|
|
68
|
+
# Whit Monday.
|
|
69
|
+
self._add_whit_monday(tr("Annar hvítusunnudagur"))
|
|
70
|
+
|
|
71
|
+
# Saint Olaf's Day.
|
|
72
|
+
self._add_holiday_jul_29(tr("Ólavsøkudagur"))
|
|
73
|
+
|
|
74
|
+
# Christmas Eve.
|
|
75
|
+
self._add_christmas_eve(tr("Jólaaftan"))
|
|
76
|
+
|
|
77
|
+
# Christmas Day.
|
|
78
|
+
self._add_christmas_day(tr("Jóladagur"))
|
|
79
|
+
|
|
80
|
+
# Second Day of Christmas.
|
|
81
|
+
self._add_christmas_day_two(tr("Annar jóladagur"))
|
|
82
|
+
|
|
83
|
+
# New Year's Eve.
|
|
84
|
+
self._add_new_years_eve(tr("Nýggjársaftan"))
|
|
85
|
+
|
|
86
|
+
def _populate_half_day_holidays(self):
|
|
87
|
+
# National Flag Day.
|
|
88
|
+
self._add_holiday_apr_25(tr("Flaggdagur"))
|
|
89
|
+
|
|
90
|
+
# Constitution Day.
|
|
91
|
+
self._add_holiday_jun_5(tr("Grundlógardagur"))
|
|
92
|
+
|
|
93
|
+
# Saint Olaf's Eve.
|
|
94
|
+
self._add_holiday_jul_28(tr("Ólavsøkuaftan"))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class FO(FaroeIslands):
|
|
98
|
+
pass
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class FRO(FaroeIslands):
|
|
102
|
+
pass
|
holidays/countries/georgia.py
CHANGED
|
@@ -19,12 +19,13 @@ from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHoli
|
|
|
19
19
|
from holidays.holiday_base import HolidayBase
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
22
|
+
class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
|
|
23
23
|
"""Georgia holidays.
|
|
24
24
|
|
|
25
25
|
References:
|
|
26
26
|
* <https://en.wikipedia.org/wiki/Public_holidays_in_Georgia_(country)>
|
|
27
|
-
*
|
|
27
|
+
* [Labour Code of Georgia](https://web.archive.org/web/20250121212149/https://matsne.gov.ge/en/document/view/1155567?publication=24)
|
|
28
|
+
* [Organic Law 4455-XVIმს-Xმპ](https://web.archive.org/web/20250421162538/https://matsne.gov.ge/ka/document/view/6283937?publication=0)
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
country = "GE"
|
|
@@ -57,6 +58,9 @@ class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
57
58
|
# International Women's Day.
|
|
58
59
|
self._add_womens_day(tr("ქალთა საერთაშორისო დღე"))
|
|
59
60
|
|
|
61
|
+
# National Unity Day.
|
|
62
|
+
self._add_holiday_apr_9(tr("ეროვნული ერთიანობის დღე"))
|
|
63
|
+
|
|
60
64
|
# Good Friday.
|
|
61
65
|
self._add_good_friday(tr("წითელი პარასკევი"))
|
|
62
66
|
|
|
@@ -69,15 +73,17 @@ class Georgia(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
|
69
73
|
# Easter Monday.
|
|
70
74
|
self._add_easter_monday(tr("შავი ორშაბათი"))
|
|
71
75
|
|
|
72
|
-
# National Unity Day.
|
|
73
|
-
self._add_holiday_apr_9(tr("ეროვნული ერთიანობის დღე"))
|
|
74
|
-
|
|
75
76
|
# Day of Victory over Fascism.
|
|
76
77
|
self._add_world_war_two_victory_day(tr("ფაშიზმზე გამარჯვების დღე"), is_western=False)
|
|
77
78
|
|
|
78
79
|
# Saint Andrew's Day.
|
|
79
80
|
self._add_holiday_may_12(tr("წმინდა ანდრია პირველწოდებულის დღე"))
|
|
80
81
|
|
|
82
|
+
# Established by Organic Law 4455-XVIმს-Xმპ.
|
|
83
|
+
if self._year >= 2025:
|
|
84
|
+
# Day of Family Sanctity and Respect for Parents.
|
|
85
|
+
self._add_holiday_may_17(tr("ოჯახის სიწმინდისა და მშობლების პატივისცემის დღე"))
|
|
86
|
+
|
|
81
87
|
# Independence Day.
|
|
82
88
|
self._add_holiday_may_26(tr("დამოუკიდებლობის დღე"))
|
|
83
89
|
|