holidays 0.68__py3-none-any.whl → 0.70__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- holidays/__init__.py +1 -1
- holidays/calendars/__init__.py +2 -1
- holidays/calendars/balinese_saka.py +112 -0
- holidays/calendars/buddhist.py +1 -1
- holidays/calendars/chinese.py +1 -1
- holidays/calendars/custom.py +1 -1
- holidays/calendars/gregorian.py +1 -1
- holidays/calendars/hebrew.py +1 -1
- holidays/calendars/hindu.py +866 -2
- holidays/calendars/islamic.py +161 -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 +309 -257
- holidays/constants.py +3 -1
- holidays/countries/__init__.py +7 -1
- holidays/countries/afghanistan.py +17 -7
- holidays/countries/albania.py +16 -7
- holidays/countries/algeria.py +14 -10
- holidays/countries/american_samoa.py +12 -6
- holidays/countries/andorra.py +5 -4
- holidays/countries/angola.py +15 -14
- holidays/countries/antigua_and_barbuda.py +145 -0
- holidays/countries/argentina.py +787 -169
- holidays/countries/armenia.py +5 -6
- holidays/countries/aruba.py +11 -9
- holidays/countries/australia.py +21 -20
- holidays/countries/austria.py +3 -1
- holidays/countries/azerbaijan.py +30 -19
- holidays/countries/bahamas.py +13 -11
- holidays/countries/bahrain.py +14 -7
- holidays/countries/bangladesh.py +5 -4
- holidays/countries/barbados.py +11 -9
- holidays/countries/belarus.py +15 -15
- holidays/countries/belgium.py +8 -6
- holidays/countries/belize.py +7 -6
- holidays/countries/bolivia.py +12 -11
- holidays/countries/bosnia_and_herzegovina.py +21 -11
- holidays/countries/botswana.py +8 -6
- holidays/countries/brazil.py +8 -7
- holidays/countries/brunei.py +56 -62
- holidays/countries/bulgaria.py +9 -10
- holidays/countries/burkina_faso.py +14 -5
- holidays/countries/burundi.py +17 -12
- holidays/countries/cambodia.py +15 -24
- holidays/countries/cameroon.py +16 -7
- holidays/countries/canada.py +13 -12
- holidays/countries/chad.py +15 -6
- holidays/countries/chile.py +29 -28
- holidays/countries/china.py +39 -38
- holidays/countries/colombia.py +15 -20
- holidays/countries/congo.py +6 -7
- holidays/countries/costa_rica.py +11 -10
- holidays/countries/croatia.py +8 -5
- holidays/countries/cuba.py +30 -27
- holidays/countries/curacao.py +6 -4
- holidays/countries/cyprus.py +4 -5
- holidays/countries/czechia.py +7 -6
- holidays/countries/denmark.py +5 -6
- holidays/countries/djibouti.py +11 -3
- holidays/countries/dominica.py +18 -16
- holidays/countries/dominican_republic.py +6 -4
- holidays/countries/ecuador.py +5 -4
- holidays/countries/egypt.py +10 -11
- holidays/countries/el_salvador.py +6 -5
- holidays/countries/estonia.py +3 -1
- holidays/countries/eswatini.py +6 -4
- holidays/countries/ethiopia.py +26 -11
- holidays/countries/fiji.py +183 -0
- holidays/countries/finland.py +11 -10
- holidays/countries/france.py +6 -9
- holidays/countries/gabon.py +17 -8
- holidays/countries/georgia.py +7 -7
- holidays/countries/germany.py +11 -11
- holidays/countries/ghana.py +14 -6
- holidays/countries/greece.py +4 -5
- holidays/countries/greenland.py +5 -6
- holidays/countries/guam.py +12 -6
- holidays/countries/guatemala.py +7 -9
- holidays/countries/guernsey.py +37 -34
- holidays/countries/guinea.py +182 -0
- holidays/countries/haiti.py +6 -5
- holidays/countries/honduras.py +8 -4
- holidays/countries/hongkong.py +49 -60
- holidays/countries/hungary.py +26 -23
- holidays/countries/iceland.py +5 -4
- holidays/countries/india.py +494 -174
- holidays/countries/indonesia.py +68 -108
- holidays/countries/iran.py +18 -9
- holidays/countries/ireland.py +5 -4
- holidays/countries/isle_of_man.py +2 -2
- holidays/countries/israel.py +4 -5
- holidays/countries/italy.py +5 -4
- holidays/countries/ivory_coast.py +156 -0
- holidays/countries/jamaica.py +6 -4
- holidays/countries/japan.py +5 -5
- holidays/countries/jersey.py +29 -26
- holidays/countries/jordan.py +13 -6
- holidays/countries/kazakhstan.py +72 -51
- holidays/countries/kenya.py +28 -18
- holidays/countries/kuwait.py +14 -7
- holidays/countries/kyrgyzstan.py +11 -6
- holidays/countries/laos.py +21 -29
- holidays/countries/latvia.py +7 -5
- holidays/countries/lesotho.py +6 -5
- holidays/countries/liechtenstein.py +5 -5
- holidays/countries/lithuania.py +4 -5
- holidays/countries/luxembourg.py +5 -3
- holidays/countries/macau.py +480 -0
- holidays/countries/madagascar.py +5 -4
- holidays/countries/malawi.py +6 -4
- holidays/countries/malaysia.py +30 -18
- holidays/countries/maldives.py +14 -7
- holidays/countries/malta.py +10 -19
- holidays/countries/marshall_islands.py +6 -4
- holidays/countries/mauritania.py +13 -6
- holidays/countries/mexico.py +8 -7
- holidays/countries/moldova.py +6 -4
- holidays/countries/monaco.py +6 -4
- holidays/countries/montenegro.py +16 -7
- holidays/countries/morocco.py +13 -8
- holidays/countries/mozambique.py +3 -1
- holidays/countries/namibia.py +7 -5
- holidays/countries/netherlands.py +6 -6
- holidays/countries/new_zealand.py +3 -1
- holidays/countries/nicaragua.py +6 -5
- holidays/countries/nigeria.py +13 -5
- holidays/countries/north_macedonia.py +13 -5
- holidays/countries/northern_mariana_islands.py +12 -6
- holidays/countries/norway.py +15 -15
- holidays/countries/pakistan.py +48 -18
- holidays/countries/palau.py +13 -11
- holidays/countries/panama.py +9 -8
- holidays/countries/papua_new_guinea.py +25 -21
- holidays/countries/paraguay.py +10 -9
- holidays/countries/peru.py +4 -5
- holidays/countries/philippines.py +32 -18
- holidays/countries/poland.py +7 -6
- holidays/countries/portugal.py +13 -15
- holidays/countries/puerto_rico.py +12 -6
- holidays/countries/qatar.py +172 -0
- holidays/countries/romania.py +6 -4
- holidays/countries/russia.py +6 -4
- holidays/countries/saint_kitts_and_nevis.py +24 -22
- holidays/countries/saint_lucia.py +8 -7
- holidays/countries/samoa.py +7 -6
- holidays/countries/san_marino.py +4 -3
- holidays/countries/saudi_arabia.py +15 -15
- holidays/countries/serbia.py +3 -4
- holidays/countries/seychelles.py +22 -26
- holidays/countries/singapore.py +33 -38
- holidays/countries/slovakia.py +6 -5
- holidays/countries/slovenia.py +7 -6
- holidays/countries/south_africa.py +8 -6
- holidays/countries/south_korea.py +25 -32
- holidays/countries/spain.py +31 -24
- holidays/countries/sri_lanka.py +52 -42
- holidays/countries/sweden.py +20 -19
- holidays/countries/switzerland.py +6 -5
- holidays/countries/taiwan.py +230 -31
- holidays/countries/tanzania.py +34 -27
- holidays/countries/thailand.py +134 -142
- holidays/countries/timor_leste.py +38 -17
- holidays/countries/tonga.py +46 -42
- holidays/countries/tunisia.py +9 -3
- holidays/countries/turkey.py +17 -9
- holidays/countries/tuvalu.py +12 -11
- holidays/countries/ukraine.py +54 -54
- holidays/countries/united_arab_emirates.py +43 -30
- holidays/countries/united_kingdom.py +7 -6
- holidays/countries/united_states.py +130 -86
- holidays/countries/united_states_minor_outlying_islands.py +12 -6
- holidays/countries/united_states_virgin_islands.py +12 -6
- holidays/countries/uruguay.py +10 -9
- holidays/countries/uzbekistan.py +16 -7
- holidays/countries/vanuatu.py +7 -5
- holidays/countries/vatican_city.py +16 -15
- holidays/countries/venezuela.py +11 -14
- holidays/countries/vietnam.py +15 -11
- holidays/countries/zambia.py +8 -6
- holidays/countries/zimbabwe.py +6 -4
- holidays/deprecations/v1_incompatibility.py +1 -1
- holidays/financial/__init__.py +1 -1
- holidays/financial/brasil_bolsa_balcao.py +14 -13
- holidays/financial/european_central_bank.py +7 -6
- holidays/financial/ice_futures_europe.py +7 -6
- holidays/financial/ny_stock_exchange.py +13 -10
- holidays/groups/__init__.py +2 -1
- holidays/groups/balinese_saka.py +45 -0
- holidays/groups/buddhist.py +1 -1
- holidays/groups/chinese.py +69 -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 +256 -1
- holidays/groups/international.py +1 -1
- holidays/groups/islamic.py +17 -3
- holidays/groups/persian.py +1 -1
- holidays/groups/sinhala.py +1 -1
- holidays/groups/thai.py +1 -7
- holidays/helpers.py +1 -1
- holidays/holiday_base.py +410 -273
- holidays/ical.py +228 -0
- holidays/locale/ar_QA/LC_MESSAGES/QA.mo +0 -0
- holidays/locale/de/LC_MESSAGES/PL.mo +0 -0
- holidays/locale/en_CI/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/QA.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/GN.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/pt_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/tet/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/ur_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
- holidays/mixins.py +2 -2
- holidays/observed_holiday_base.py +5 -2
- holidays/registry.py +7 -1
- holidays/utils.py +151 -151
- holidays/version.py +2 -2
- holidays-0.70.dist-info/METADATA +1404 -0
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/RECORD +253 -222
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/WHEEL +1 -1
- holidays-0.68.dist-info/AUTHORS → holidays-0.70.dist-info/licenses/AUTHORS.md +7 -2
- {holidays-0.68.dist-info → holidays-0.70.dist-info/licenses}/LICENSE +1 -1
- holidays-0.68.dist-info/METADATA +0 -1080
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/top_level.txt +0 -0
holidays/countries/luxembourg.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 AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md 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
|
|
@@ -17,8 +17,10 @@ from holidays.holiday_base import HolidayBase
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class Luxembourg(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
20
|
-
"""
|
|
21
|
-
|
|
20
|
+
"""Luxembourg holidays.
|
|
21
|
+
|
|
22
|
+
References:
|
|
23
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_Luxembourg>
|
|
22
24
|
"""
|
|
23
25
|
|
|
24
26
|
country = "LU"
|
|
@@ -0,0 +1,480 @@
|
|
|
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.md 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 FEB, SEP, OCT, DEC
|
|
16
|
+
from holidays.constants import GOVERNMENT, MANDATORY, PUBLIC
|
|
17
|
+
from holidays.groups import (
|
|
18
|
+
ChineseCalendarHolidays,
|
|
19
|
+
ChristianHolidays,
|
|
20
|
+
InternationalHolidays,
|
|
21
|
+
StaticHolidays,
|
|
22
|
+
)
|
|
23
|
+
from holidays.observed_holiday_base import (
|
|
24
|
+
ObservedHolidayBase,
|
|
25
|
+
SUN_TO_NEXT_WORKDAY,
|
|
26
|
+
SAT_SUN_TO_NEXT_WORKDAY,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Macau(
|
|
31
|
+
ObservedHolidayBase,
|
|
32
|
+
ChineseCalendarHolidays,
|
|
33
|
+
ChristianHolidays,
|
|
34
|
+
InternationalHolidays,
|
|
35
|
+
StaticHolidays,
|
|
36
|
+
):
|
|
37
|
+
"""Macau holidays.
|
|
38
|
+
|
|
39
|
+
References:
|
|
40
|
+
* [Decreto-Lei n.º 4/82/M](https://bo.io.gov.mo/bo/i/82/04/declei04.asp)
|
|
41
|
+
* [Decreto-Lei n.º 38/87/M](https://bo.io.gov.mo/bo/i/87/25/declei38.asp)
|
|
42
|
+
* [Decreto-Lei n.º 15/93/M](https://bo.io.gov.mo/bo/i/93/17/declei15.asp)
|
|
43
|
+
* [Decreto-Lei n.º 7/97/M](https://bo.io.gov.mo/bo/i/97/11/declei07.asp)
|
|
44
|
+
* [Portaria n.º 85/97/M](https://bo.io.gov.mo/bo/i/97/15/port85.asp)
|
|
45
|
+
* [Portaria n.º 242/98/M](https://bo.io.gov.mo/bo/i/98/48/port242.asp)
|
|
46
|
+
* [Regulamento Administrativo n.º 4/1999](https://bo.io.gov.mo/bo/i/1999/01/regadm04.asp)
|
|
47
|
+
* [Regulamento Administrativo n.º 5/1999](https://bo.io.gov.mo/bo/i/1999/01/regadm05.asp)
|
|
48
|
+
* [Ordem Executiva n.º 60/2000](https://bo.io.gov.mo/bo/i/2000/40/ordem60.asp)
|
|
49
|
+
* [Lei n.º 27/2024](https://bo.io.gov.mo/bo/i/2025/01/lei27.asp#an2l63)
|
|
50
|
+
|
|
51
|
+
Mandatory Holidays References:
|
|
52
|
+
* [Decreto-Lei n.º 101/84/M](https://bo.io.gov.mo/bo/i/84/35/declei101.asp)
|
|
53
|
+
* [Decreto-Lei n.º 24/89/M](https://bo.io.gov.mo/bo/i/89/14/declei24.asp)
|
|
54
|
+
* [Lei n.º 8/2000](https://bo.io.gov.mo/bo/i/2000/19/lei08.asp)
|
|
55
|
+
* [Lei n.º 7/2008](https://bo.io.gov.mo/bo/i/2008/33/lei07.asp)
|
|
56
|
+
|
|
57
|
+
Cross-Checking:
|
|
58
|
+
* [Public Holidays for 2017–2025](https://www.gov.mo/en/public-holidays/year-2017/)
|
|
59
|
+
* [Public Holidays for 2005-2018](https://web.archive.org/web/20171207162948/http://portal.gov.mo/web/guest/info_detail?infoid=1887061)
|
|
60
|
+
* [Mandatory Holidays for 2009-2029](https://www.dsal.gov.mo/pt/standard/holiday_table.html)
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
country = "MO"
|
|
64
|
+
default_language = "zh_MO"
|
|
65
|
+
subdivisions = (
|
|
66
|
+
"I", # Ilhas.
|
|
67
|
+
"M", # Macau.
|
|
68
|
+
)
|
|
69
|
+
subdivisions_aliases = {
|
|
70
|
+
# Municipalities.
|
|
71
|
+
"Concelho das Ilhas": "I",
|
|
72
|
+
"海島市": "I",
|
|
73
|
+
"海岛市": "I",
|
|
74
|
+
"Concelho de Macau": "M",
|
|
75
|
+
"澳門市": "M",
|
|
76
|
+
"澳门市": "M",
|
|
77
|
+
}
|
|
78
|
+
supported_categories = (GOVERNMENT, MANDATORY, PUBLIC)
|
|
79
|
+
supported_languages = ("en_MO", "en_US", "pt_MO", "th", "zh_CN", "zh_MO")
|
|
80
|
+
# Decreto-Lei n.º 4/82/M.
|
|
81
|
+
start_year = 1982
|
|
82
|
+
|
|
83
|
+
def __init__(self, *args, **kwargs):
|
|
84
|
+
ChineseCalendarHolidays.__init__(self)
|
|
85
|
+
ChristianHolidays.__init__(self)
|
|
86
|
+
InternationalHolidays.__init__(self)
|
|
87
|
+
StaticHolidays.__init__(self, MacauStaticHolidays)
|
|
88
|
+
kwargs.setdefault("observed_rule", SAT_SUN_TO_NEXT_WORKDAY)
|
|
89
|
+
# Systemic in-lieus starts in 2011.
|
|
90
|
+
kwargs.setdefault("observed_since", 2011)
|
|
91
|
+
super().__init__(*args, **kwargs)
|
|
92
|
+
|
|
93
|
+
def _populate_public_holidays(self):
|
|
94
|
+
# New Year's Day.
|
|
95
|
+
self._add_new_years_day(tr("元旦"))
|
|
96
|
+
|
|
97
|
+
# Chinese New Year's Day.
|
|
98
|
+
self._add_chinese_new_years_day(tr("農曆正月初一"))
|
|
99
|
+
|
|
100
|
+
# The second day of Chinese New Year.
|
|
101
|
+
self._add_chinese_new_years_day_two(tr("農曆正月初二"))
|
|
102
|
+
|
|
103
|
+
# The third day of Chinese New Year.
|
|
104
|
+
self._add_chinese_new_years_day_three(tr("農曆正月初三"))
|
|
105
|
+
|
|
106
|
+
# Tomb-Sweeping Day.
|
|
107
|
+
self._add_qingming_festival(tr("清明節"))
|
|
108
|
+
|
|
109
|
+
# Regulamento Administrativo n.º 4/1999 - Name changed in Chinese for Good Friday.
|
|
110
|
+
name = (
|
|
111
|
+
# Good Friday.
|
|
112
|
+
tr("耶穌受難日")
|
|
113
|
+
if self._year >= 2000
|
|
114
|
+
# Good Friday.
|
|
115
|
+
else tr("聖周星期五")
|
|
116
|
+
)
|
|
117
|
+
self._add_good_friday(name)
|
|
118
|
+
|
|
119
|
+
# Regulamento Administrativo n.º 4/1999 - Name changed to The Day before Easter.
|
|
120
|
+
name = (
|
|
121
|
+
# The Day before Easter.
|
|
122
|
+
tr("復活節前日")
|
|
123
|
+
if self._year >= 2000
|
|
124
|
+
# Holy Saturday.
|
|
125
|
+
else tr("聖周星期六")
|
|
126
|
+
)
|
|
127
|
+
self._add_holy_saturday(name)
|
|
128
|
+
|
|
129
|
+
# Labor Day.
|
|
130
|
+
self._add_labor_day(tr("勞動節"))
|
|
131
|
+
|
|
132
|
+
# Dragon Boat Festival.
|
|
133
|
+
self._add_dragon_boat_festival(tr("端午節"))
|
|
134
|
+
|
|
135
|
+
# Double Ninth Festival.
|
|
136
|
+
self._add_double_ninth_festival(tr("重陽節"))
|
|
137
|
+
|
|
138
|
+
# The Day following Mid-Autumn Festival.
|
|
139
|
+
self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
|
|
140
|
+
|
|
141
|
+
# National Day of the People's Republic of China.
|
|
142
|
+
self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
|
|
143
|
+
|
|
144
|
+
# All Soul's Day.
|
|
145
|
+
self._add_all_souls_day(tr("追思節"))
|
|
146
|
+
|
|
147
|
+
# Immaculate Conception.
|
|
148
|
+
self._add_immaculate_conception_day(tr("聖母無原罪瞻禮"))
|
|
149
|
+
|
|
150
|
+
# Regulamento Administrativo n.º 4/1999 - Moved from DEC 22 to DEC 21.
|
|
151
|
+
# Ordem Executiva n.º 60/2000 - Switched to Movable.
|
|
152
|
+
|
|
153
|
+
# Winter Solstice.
|
|
154
|
+
name = tr("冬至")
|
|
155
|
+
if self._year >= 2001:
|
|
156
|
+
self._add_dongzhi_festival(name)
|
|
157
|
+
elif self._year == 2000:
|
|
158
|
+
self._add_holiday_dec_21(name)
|
|
159
|
+
else:
|
|
160
|
+
self._add_holiday_dec_22(name)
|
|
161
|
+
|
|
162
|
+
# Portaria n.º 242/98/M - Name changed in Chinese for Christmas Eve.
|
|
163
|
+
# Regulamento Administrativo n.º 4/1999 - Further Chinese name standardization.
|
|
164
|
+
if self._year >= 2000:
|
|
165
|
+
# Christmas Eve.
|
|
166
|
+
name = tr("聖誕節前日")
|
|
167
|
+
elif self._year == 1999:
|
|
168
|
+
# Christmas Eve.
|
|
169
|
+
name = tr("聖誕節前夕")
|
|
170
|
+
else:
|
|
171
|
+
# Christmas Eve.
|
|
172
|
+
name = tr("聖誕前夕")
|
|
173
|
+
self._add_christmas_eve(name)
|
|
174
|
+
|
|
175
|
+
# Portaria n.º 242/98/M - Name changed in Chinese for Christmas Day.
|
|
176
|
+
name = (
|
|
177
|
+
# Christmas Day.
|
|
178
|
+
tr("聖誕節")
|
|
179
|
+
if self._year >= 1999
|
|
180
|
+
# Christmas Day.
|
|
181
|
+
else tr("聖誕")
|
|
182
|
+
)
|
|
183
|
+
self._add_christmas_day(name)
|
|
184
|
+
|
|
185
|
+
# Decreto-Lei n.º 38/87/M - Removed Assumption Day and All Saints' Day as Public Holiday.
|
|
186
|
+
if self._year <= 1986:
|
|
187
|
+
# Assumption Day.
|
|
188
|
+
self._add_assumption_of_mary_day(tr("聖母升天"))
|
|
189
|
+
|
|
190
|
+
# All Saints' Day.
|
|
191
|
+
self._add_all_saints_day(tr("諸聖節"))
|
|
192
|
+
|
|
193
|
+
# Decreto-Lei n.º 38/87/M - Removed Corpus Christi as Public Holiday.
|
|
194
|
+
if self._year <= 1987:
|
|
195
|
+
# Corpus Christi.
|
|
196
|
+
self._add_corpus_christi_day(tr("基督聖體聖血節"))
|
|
197
|
+
|
|
198
|
+
# Portaria n.º 242/98/M - De Facto adds Macao S.A.R. Establishment Day on DEC 20 for 1999.
|
|
199
|
+
# Regulamento Administrativo n.º 5/1999 - Special Name for 1999 (see StaticHolidays).
|
|
200
|
+
# Ordem Executiva n.º 60/2000 - Removed all Portugal-derived holidays.
|
|
201
|
+
# - Adds The Buddha's Birthday.
|
|
202
|
+
# - Adds The day following National Day of the PRC on OCT 2.
|
|
203
|
+
# - Adds "Anniversary of " to Macao S.A.R. holiday in Chinese.
|
|
204
|
+
if self._year <= 1999:
|
|
205
|
+
# Freedom Day.
|
|
206
|
+
self._add_holiday_apr_25(tr("自由日"))
|
|
207
|
+
|
|
208
|
+
# Day of Portugal, Camões, and the Portuguese Communities.
|
|
209
|
+
self._add_holiday_jun_10(tr("葡國日、賈梅士日暨葡僑日"))
|
|
210
|
+
|
|
211
|
+
# Republic Day.
|
|
212
|
+
self._add_holiday_oct_5(tr("葡萄牙共和國國慶日"))
|
|
213
|
+
|
|
214
|
+
# Restoration of Independence Day.
|
|
215
|
+
self._add_holiday_dec_1(tr("恢復獨立紀念日"))
|
|
216
|
+
else:
|
|
217
|
+
# The Buddha's Birthday.
|
|
218
|
+
self._add_chinese_birthday_of_buddha(tr("佛誕節"))
|
|
219
|
+
|
|
220
|
+
# The day following National Day of the People's Republic of China.
|
|
221
|
+
self._add_holiday_oct_2(tr("中華人民共和國國慶日翌日"))
|
|
222
|
+
|
|
223
|
+
# Macao S.A.R. Establishment Day.
|
|
224
|
+
self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
|
|
225
|
+
|
|
226
|
+
def _populate_mandatory_holidays(self):
|
|
227
|
+
"""
|
|
228
|
+
Decreto-Lei n.º 101/84/M - Earliest Available Version Online.
|
|
229
|
+
Decreto-Lei n.º 24/89/M - Added Ching Ming Festival.
|
|
230
|
+
Lei n.º 8/2000 - Removed Day of Portugal
|
|
231
|
+
- Added Macao S.A.R. Establishment Day.
|
|
232
|
+
- Moved Mid-Autumn to Day following Mid-Autumn to match Public Holidays.
|
|
233
|
+
Lei n.º 7/2008 - Consolidated with other laws, reaffirming 2000 Amendment list.
|
|
234
|
+
"""
|
|
235
|
+
if self._year <= 1984:
|
|
236
|
+
return None
|
|
237
|
+
|
|
238
|
+
# New Year's Day.
|
|
239
|
+
self._add_new_years_day(tr("元旦"))
|
|
240
|
+
|
|
241
|
+
# Chinese New Year's Day.
|
|
242
|
+
self._add_chinese_new_years_day(tr("農曆正月初一"))
|
|
243
|
+
|
|
244
|
+
# The second day of Chinese New Year.
|
|
245
|
+
self._add_chinese_new_years_day_two(tr("農曆正月初二"))
|
|
246
|
+
|
|
247
|
+
# The third day of Chinese New Year.
|
|
248
|
+
self._add_chinese_new_years_day_three(tr("農曆正月初三"))
|
|
249
|
+
|
|
250
|
+
# Labor Day.
|
|
251
|
+
self._add_labor_day(tr("勞動節"))
|
|
252
|
+
|
|
253
|
+
# Double Ninth Festival.
|
|
254
|
+
self._add_double_ninth_festival(tr("重陽節"))
|
|
255
|
+
|
|
256
|
+
# National Day of the People's Republic of China.
|
|
257
|
+
self._add_holiday_oct_1(tr("中華人民共和國國慶日"))
|
|
258
|
+
|
|
259
|
+
# Decreto-Lei n.º 24/89/M - Adds Ching Ming as a Mandatory Holiday.
|
|
260
|
+
if self._year >= 1989:
|
|
261
|
+
# Tomb-Sweeping Day.
|
|
262
|
+
self._add_qingming_festival(tr("清明節"))
|
|
263
|
+
|
|
264
|
+
# Lei n.º 8/2000 - Removed Day of Portugal as a Mandatory Holiday.
|
|
265
|
+
# - Changed observance from Mid-Autumn to the following day.
|
|
266
|
+
# - Adds Macao S.A.R. Establishment Day as a Mandatory Holiday.
|
|
267
|
+
if self._year <= 1999:
|
|
268
|
+
# Day of Portugal, Camões, and the Portuguese Communities.
|
|
269
|
+
self._add_holiday_jun_10(tr("葡國日、賈梅士日暨葡僑日"))
|
|
270
|
+
|
|
271
|
+
# Mid-Autumn Festival.
|
|
272
|
+
self._add_mid_autumn_festival(tr("中秋節"))
|
|
273
|
+
|
|
274
|
+
else:
|
|
275
|
+
# The Day following Mid-Autumn Festival.
|
|
276
|
+
self._add_mid_autumn_festival_day_two(tr("中秋節翌日"))
|
|
277
|
+
|
|
278
|
+
# Macao S.A.R. Establishment Day.
|
|
279
|
+
self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日"))
|
|
280
|
+
|
|
281
|
+
def _populate_government_holidays(self):
|
|
282
|
+
# While Cross-Checking References are available for from 2005-2025,
|
|
283
|
+
# SUN in-lieus starts in 2011; SAT-SUN in-lieus starts in 2012.
|
|
284
|
+
if self._year <= 2004:
|
|
285
|
+
return None
|
|
286
|
+
|
|
287
|
+
dts_observed = set()
|
|
288
|
+
|
|
289
|
+
# %s (Afternoon).
|
|
290
|
+
begin_time_label = self.tr("%s(下午)")
|
|
291
|
+
|
|
292
|
+
# New Year's Day.
|
|
293
|
+
dts_observed.add(self._add_new_years_day(tr("元旦")))
|
|
294
|
+
|
|
295
|
+
if self._year not in {2006, 2007, 2009, 2010, 2012, 2013, 2016, 2023}:
|
|
296
|
+
# Chinese New Year's Eve.
|
|
297
|
+
self._add_chinese_new_years_eve(begin_time_label % self.tr("農曆除夕"))
|
|
298
|
+
|
|
299
|
+
if self._year in {2006, 2007, 2010, 2013, 2014, 2017, 2018}:
|
|
300
|
+
# The fourth day of Chinese New Year.
|
|
301
|
+
self._add_chinese_new_years_day_four(tr("農曆正月初四"))
|
|
302
|
+
|
|
303
|
+
if self._year in {2014, 2015, 2017, 2018}:
|
|
304
|
+
# The fifth day of Chinese New Year.
|
|
305
|
+
self._add_chinese_new_years_day_five(tr("農曆正月初五"))
|
|
306
|
+
|
|
307
|
+
if self._year >= 2019:
|
|
308
|
+
# Chinese New Year's Day.
|
|
309
|
+
dts_observed.add(self._add_chinese_new_years_day(tr("農曆正月初一")))
|
|
310
|
+
|
|
311
|
+
# The second day of Chinese New Year.
|
|
312
|
+
dts_observed.add(self._add_chinese_new_years_day_two(tr("農曆正月初二")))
|
|
313
|
+
|
|
314
|
+
# The third day of Chinese New Year.
|
|
315
|
+
dts_observed.add(self._add_chinese_new_years_day_three(tr("農曆正月初三")))
|
|
316
|
+
|
|
317
|
+
# The Day before Easter.
|
|
318
|
+
dts_observed.add(self._add_holy_saturday(tr("復活節前日")))
|
|
319
|
+
|
|
320
|
+
# Tomb-Sweeping Day.
|
|
321
|
+
dts_observed.add(self._add_qingming_festival(tr("清明節")))
|
|
322
|
+
|
|
323
|
+
# Labor Day.
|
|
324
|
+
dts_observed.add(self._add_labor_day(tr("勞動節")))
|
|
325
|
+
|
|
326
|
+
# The Buddha's Birthday.
|
|
327
|
+
dts_observed.add(self._add_chinese_birthday_of_buddha(tr("佛誕節")))
|
|
328
|
+
|
|
329
|
+
# Dragon Boat Festival.
|
|
330
|
+
dts_observed.add(self._add_dragon_boat_festival(tr("端午節")))
|
|
331
|
+
|
|
332
|
+
# The Day following Mid-Autumn Festival.
|
|
333
|
+
dts_observed.add(self._add_mid_autumn_festival_day_two(tr("中秋節翌日")))
|
|
334
|
+
|
|
335
|
+
# Double Ninth Festival.
|
|
336
|
+
dts_observed.add(self._add_double_ninth_festival(tr("重陽節")))
|
|
337
|
+
|
|
338
|
+
# National Day of the People's Republic of China.
|
|
339
|
+
dts_observed.add(self._add_holiday_oct_1(tr("中華人民共和國國慶日")))
|
|
340
|
+
|
|
341
|
+
# The day following National Day of the People's Republic of China.
|
|
342
|
+
dts_observed.add(self._add_holiday_oct_2(tr("中華人民共和國國慶日翌日")))
|
|
343
|
+
|
|
344
|
+
# All Soul's Day.
|
|
345
|
+
dts_observed.add(self._add_all_souls_day(tr("追思節")))
|
|
346
|
+
|
|
347
|
+
# Immaculate Conception.
|
|
348
|
+
dts_observed.add(self._add_immaculate_conception_day(tr("聖母無原罪瞻禮")))
|
|
349
|
+
|
|
350
|
+
# Macao S.A.R. Establishment Day.
|
|
351
|
+
dts_observed.add(self._add_holiday_dec_20(tr("澳門特別行政區成立紀念日")))
|
|
352
|
+
|
|
353
|
+
# Winter Solstice.
|
|
354
|
+
dts_observed.add(self._add_dongzhi_festival(tr("冬至")))
|
|
355
|
+
|
|
356
|
+
# Christmas Eve.
|
|
357
|
+
dts_observed.add(self._add_christmas_eve(tr("聖誕節前日")))
|
|
358
|
+
|
|
359
|
+
# Christmas Day.
|
|
360
|
+
dts_observed.add(self._add_christmas_day(tr("聖誕節")))
|
|
361
|
+
|
|
362
|
+
# 2012's Full-Day New Year's Eve is declared discretely.
|
|
363
|
+
if self._year >= 2007 and self._year not in {2011, 2012, 2016, 2017, 2022, 2023}:
|
|
364
|
+
# New Year's Eve.
|
|
365
|
+
self._add_new_years_eve(begin_time_label % self.tr("除夕"))
|
|
366
|
+
|
|
367
|
+
if self.observed:
|
|
368
|
+
self.observed_label = (
|
|
369
|
+
# Compensatory rest day for %s.
|
|
370
|
+
self.tr("%s的補假")
|
|
371
|
+
if self._year >= 2020
|
|
372
|
+
# The first working day after %s.
|
|
373
|
+
else self.tr("%s後首個工作日")
|
|
374
|
+
)
|
|
375
|
+
# Prior to 2012, in-lieus are only given for holidays which falls on Sunday.
|
|
376
|
+
self._observed_rule = (
|
|
377
|
+
SUN_TO_NEXT_WORKDAY if self._year <= 2011 else SAT_SUN_TO_NEXT_WORKDAY
|
|
378
|
+
)
|
|
379
|
+
self._populate_observed(dts_observed, multiple=True)
|
|
380
|
+
|
|
381
|
+
def _populate_subdiv_i_public_holidays(self):
|
|
382
|
+
# Decreto-Lei n.º 15/93/M - Moved Day of the Municipality of Ilhas from JUL 13 to NOV 30.
|
|
383
|
+
# Regulamento Administrativo n.º 4/1999 - Removed as a Public Holiday.
|
|
384
|
+
if self._year <= 1999:
|
|
385
|
+
# Day of the Municipality of Ilhas.
|
|
386
|
+
name = tr("海島市日")
|
|
387
|
+
if self._year <= 1992:
|
|
388
|
+
self._add_holiday_nov_30(name)
|
|
389
|
+
else:
|
|
390
|
+
self._add_holiday_jul_13(name)
|
|
391
|
+
|
|
392
|
+
def _populate_subdiv_m_public_holidays(self):
|
|
393
|
+
# Regulamento Administrativo n.º 4/1999 - Removed Macau City Day as a Public Holiday.
|
|
394
|
+
if self._year <= 1999:
|
|
395
|
+
# Macau City Day.
|
|
396
|
+
self._add_holiday_jun_24(tr("澳門市日"))
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class MO(Macau):
|
|
400
|
+
pass
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
class MAC(Macau):
|
|
404
|
+
pass
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
class MacauStaticHolidays:
|
|
408
|
+
"""Macau special holidays.
|
|
409
|
+
|
|
410
|
+
Special Public and Government Holidays:
|
|
411
|
+
* <https://www.io.gov.mo/pt/legis/rec/111020>
|
|
412
|
+
|
|
413
|
+
Special Mandatory Holidays:
|
|
414
|
+
* <https://www.dsal.gov.mo/pt/standard/holiday_table.html>
|
|
415
|
+
|
|
416
|
+
Cross-Checking:
|
|
417
|
+
* [Public Holidays for 2017–2025](https://www.gov.mo/en/public-holidays/year-2017/)
|
|
418
|
+
* [Public Holidays for 2005-2018](https://web.archive.org/web/20171207162948/http://portal.gov.mo/web/guest/info_detail?infoid=1887061)
|
|
419
|
+
"""
|
|
420
|
+
|
|
421
|
+
# Additional Public Holiday.
|
|
422
|
+
name_fullday = tr("額外公眾假期")
|
|
423
|
+
|
|
424
|
+
# Additional Half-Day Public Holiday.
|
|
425
|
+
name_halfday = tr("額外公眾半日假")
|
|
426
|
+
|
|
427
|
+
# 70th Anniversary of the Victory of the Chinese People's War of Resistance against
|
|
428
|
+
# Japanese Aggression and the World Anti-Fascist War.
|
|
429
|
+
name_70th_war_of_resistance = tr("中國人民抗日戰爭暨世界反法西斯戰爭勝利七十周年紀念日")
|
|
430
|
+
|
|
431
|
+
# Overlapping of the Day following National Day of the People's Republic of China
|
|
432
|
+
# and the Day following Mid-Autumn Festival.
|
|
433
|
+
name_mid_autumn_festival_day_2_national_day_2_overlap = tr(
|
|
434
|
+
"中華人民共和國國慶日翌日及中秋節翌日重疊"
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
# Overlapping of the Day following National Day of the People's Republic of China
|
|
438
|
+
# and the Double Ninth Festival.
|
|
439
|
+
name_double_ninth_festival_national_day_2_overlap = tr("中華人民共和國國慶日翌日及重陽節重疊")
|
|
440
|
+
|
|
441
|
+
# Overlapping of the National Day of the People's Republic of China
|
|
442
|
+
# and the Day following Mid-Autumn Festival.
|
|
443
|
+
name_mid_autumn_festival_day_2_national_day_overlap = tr(
|
|
444
|
+
"中華人民共和國國慶日及中秋節翌日重疊"
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
# New Year's Eve.
|
|
448
|
+
name_new_years_eve = tr("除夕")
|
|
449
|
+
|
|
450
|
+
special_government_holidays = {
|
|
451
|
+
# Additional Government Holiday.
|
|
452
|
+
2008: (DEC, 22, tr("額外政府假期")),
|
|
453
|
+
2012: (
|
|
454
|
+
(OCT, 3, name_mid_autumn_festival_day_2_national_day_overlap),
|
|
455
|
+
(DEC, 31, name_new_years_eve),
|
|
456
|
+
),
|
|
457
|
+
2014: (OCT, 3, name_double_ninth_festival_national_day_2_overlap),
|
|
458
|
+
2020: (OCT, 5, name_mid_autumn_festival_day_2_national_day_2_overlap),
|
|
459
|
+
}
|
|
460
|
+
special_mandatory_holidays = {
|
|
461
|
+
2015: (SEP, 3, name_70th_war_of_resistance),
|
|
462
|
+
}
|
|
463
|
+
special_public_holidays = {
|
|
464
|
+
1998: (
|
|
465
|
+
(DEC, 23, name_fullday),
|
|
466
|
+
(DEC, 31, name_halfday),
|
|
467
|
+
),
|
|
468
|
+
1999: (
|
|
469
|
+
(FEB, 15, name_fullday),
|
|
470
|
+
# The Handover of Macau to China and the Establishment of the Macau
|
|
471
|
+
# Special Administrative Region of the People's Republic of China.
|
|
472
|
+
(DEC, 20, tr("澳門回歸祖國暨中華人民共和國澳門特別行政區成立日")),
|
|
473
|
+
# The day following the Handover of Macau to China and the Establishment of the Macau
|
|
474
|
+
# Special Administrative Region of the People's Republic of China.
|
|
475
|
+
(DEC, 21, tr("澳門回歸祖國暨中華人民共和國澳門特別行政區成立日翌日")),
|
|
476
|
+
(DEC, 31, name_halfday),
|
|
477
|
+
),
|
|
478
|
+
2000: (FEB, 4, name_halfday),
|
|
479
|
+
2015: (SEP, 3, name_70th_war_of_resistance),
|
|
480
|
+
}
|
holidays/countries/madagascar.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 AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md 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
|
|
@@ -18,10 +18,11 @@ from holidays.holiday_base import HolidayBase
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class Madagascar(HolidayBase, ChristianHolidays, InternationalHolidays):
|
|
21
|
-
"""
|
|
21
|
+
"""Madagascar holidays.
|
|
22
|
+
|
|
22
23
|
References:
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
* <https://www.officeholidays.com/countries/madagascar>
|
|
25
|
+
* <https://www.timeanddate.com/holidays/madagascar/>
|
|
25
26
|
"""
|
|
26
27
|
|
|
27
28
|
country = "MG"
|
holidays/countries/malawi.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 AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md 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
|
|
@@ -19,9 +19,11 @@ from holidays.observed_holiday_base import (
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class Malawi(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"""Malawi holidays.
|
|
23
|
+
|
|
24
|
+
References:
|
|
25
|
+
* <https://www.officeholidays.com/countries/malawi>
|
|
26
|
+
* <https://www.timeanddate.com/holidays/malawi/>
|
|
25
27
|
"""
|
|
26
28
|
|
|
27
29
|
country = "MW"
|
holidays/countries/malaysia.py
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
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 AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md 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
|
|
11
11
|
# License: MIT (see LICENSE file)
|
|
12
12
|
|
|
13
|
+
from datetime import date
|
|
13
14
|
from gettext import gettext as tr
|
|
14
15
|
|
|
15
16
|
from holidays.calendars import (
|
|
@@ -62,6 +63,25 @@ class Malaysia(
|
|
|
62
63
|
IslamicHolidays,
|
|
63
64
|
StaticHolidays,
|
|
64
65
|
):
|
|
66
|
+
"""Malaysia holidays.
|
|
67
|
+
|
|
68
|
+
References:
|
|
69
|
+
* [Holidays Act 1951](https://www.kabinet.gov.my/bkpp/pdf/akta_warta/1951_12_31_act369.pdf)
|
|
70
|
+
* [Holidays Ordinance (Sabah Cap. 56)](https://sagc.sabah.gov.my/sites/default/files/law/HolidaysOrdinance.pdf)
|
|
71
|
+
* [Public Holidays Ordinance (Sarawak Cap. 8)](https://www.kabinet.gov.my/bkpp/pdf/akta_warta/sarawak_public_holidays_ord_chapter8.pdf)
|
|
72
|
+
* [Wikipedia](https://en.wikipedia.org/wiki/Public_holidays_in_Malaysia)
|
|
73
|
+
* <https://www.nst.com.my/news/nation/2020/03/571660/agongs-birthday-moved-june-6-june-8>
|
|
74
|
+
* <https://www.nst.com.my/news/nation/2024/02/1014012/melaka-cm-suggests-declaring-feb-20-federal-public-holiday-mark>
|
|
75
|
+
|
|
76
|
+
Section 3 of Holidays Act 1951:
|
|
77
|
+
> If any day specified in the Schedule falls on Sunday then the day following shall be
|
|
78
|
+
> a public holiday and if such day is already a public holiday, then the day following
|
|
79
|
+
> shall be a public holiday".
|
|
80
|
+
|
|
81
|
+
In Johor (until 1994 and in 2014-2024) and Kedah it's Friday to Sunday,
|
|
82
|
+
in Kelantan and Terengganu - Saturday to Sunday.
|
|
83
|
+
"""
|
|
84
|
+
|
|
65
85
|
country = "MY"
|
|
66
86
|
default_language = "ms_MY"
|
|
67
87
|
# %s (estimated).
|
|
@@ -125,33 +145,25 @@ class Malaysia(
|
|
|
125
145
|
supported_languages = ("en_US", "ms_MY", "th")
|
|
126
146
|
start_year = 1952
|
|
127
147
|
|
|
128
|
-
def __init__(self, *args, **kwargs):
|
|
148
|
+
def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
|
|
129
149
|
"""
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- `Wikipedia <https://en.wikipedia.org/wiki/Public_holidays_in_Malaysia>`_
|
|
135
|
-
- https://www.nst.com.my/news/nation/2020/03/571660/agongs-birthday-moved-june-6-june-8
|
|
136
|
-
- https://www.nst.com.my/news/nation/2024/02/1014012/melaka-cm-suggests-declaring-feb-20-federal-public-holiday-mark
|
|
137
|
-
|
|
138
|
-
Section 3 of Holidays Act 1951:
|
|
139
|
-
"If any day specified in the Schedule falls on Sunday then the day following shall be
|
|
140
|
-
a public holiday and if such day is already a public holiday, then the day following
|
|
141
|
-
shall be a public holiday".
|
|
142
|
-
In Johor (until 1994 and in 2014-2024) and Kedah it's Friday to Sunday,
|
|
143
|
-
in Kelantan and Terengganu - Saturday to Sunday.
|
|
150
|
+
Args:
|
|
151
|
+
islamic_show_estimated:
|
|
152
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
153
|
+
if holiday date is estimated.
|
|
144
154
|
"""
|
|
145
155
|
BuddhistCalendarHolidays.__init__(self, cls=MalaysiaBuddhistHolidays, show_estimated=True)
|
|
146
156
|
ChineseCalendarHolidays.__init__(self, cls=MalaysiaChineseHolidays, show_estimated=True)
|
|
147
157
|
ChristianHolidays.__init__(self)
|
|
148
158
|
HinduCalendarHolidays.__init__(self, cls=MalaysiaHinduHolidays)
|
|
149
159
|
InternationalHolidays.__init__(self)
|
|
150
|
-
IslamicHolidays.__init__(
|
|
160
|
+
IslamicHolidays.__init__(
|
|
161
|
+
self, cls=MalaysiaIslamicHolidays, show_estimated=islamic_show_estimated
|
|
162
|
+
)
|
|
151
163
|
StaticHolidays.__init__(self, cls=MalaysiaStaticHolidays)
|
|
152
164
|
kwargs.setdefault("observed_rule", SUN_TO_NEXT_WORKDAY)
|
|
153
165
|
super().__init__(*args, **kwargs)
|
|
154
|
-
self.dts_observed = set()
|
|
166
|
+
self.dts_observed: set[date] = set()
|
|
155
167
|
|
|
156
168
|
def _populate_public_holidays(self):
|
|
157
169
|
# This must be done for every `_populate_public_holidays()` call.
|
holidays/countries/maldives.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 AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md 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
|
|
@@ -16,19 +16,26 @@ from holidays.holiday_base import HolidayBase
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class Maldives(HolidayBase, InternationalHolidays, IslamicHolidays):
|
|
19
|
-
"""
|
|
19
|
+
"""Maldives holidays.
|
|
20
|
+
|
|
20
21
|
References:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* <https://en.wikipedia.org/wiki/Public_holidays_in_the_Maldives>
|
|
23
|
+
* <https://www.timeanddate.com/holidays/maldives/>
|
|
24
|
+
* <http://www.mma.gov.mv/#/about/bankholidays>
|
|
24
25
|
"""
|
|
25
26
|
|
|
26
27
|
country = "MV"
|
|
27
28
|
weekend = {FRI, SAT}
|
|
28
29
|
|
|
29
|
-
def __init__(self, *args, **kwargs):
|
|
30
|
+
def __init__(self, islamic_show_estimated: bool = True, *args, **kwargs):
|
|
31
|
+
"""
|
|
32
|
+
Args:
|
|
33
|
+
islamic_show_estimated:
|
|
34
|
+
Whether to add "estimated" label to Islamic holidays name
|
|
35
|
+
if holiday date is estimated.
|
|
36
|
+
"""
|
|
30
37
|
InternationalHolidays.__init__(self)
|
|
31
|
-
IslamicHolidays.__init__(self)
|
|
38
|
+
IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
|
|
32
39
|
super().__init__(*args, **kwargs)
|
|
33
40
|
|
|
34
41
|
def _populate_public_holidays(self):
|