Skip to content

Commit

Permalink
Merge branch 'beta' into Jersey_holidays
Browse files Browse the repository at this point in the history
  • Loading branch information
PPsyrius authored Jan 30, 2024
2 parents 98af6e5 + 9a33a2a commit b9e2f5f
Show file tree
Hide file tree
Showing 290 changed files with 1,684 additions and 1,230 deletions.
36 changes: 13 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,19 @@ repos:
exclude_types:
- rst

- repo: https://github.com/python/black
rev: 23.12.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
hooks:
- id: black
exclude: ^(docs)
language_version: python3
- id: ruff
- id: ruff-format

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
- repo: https://github.com/myint/rstcheck
rev: v6.2.0
hooks:
- id: flake8
- id: rstcheck
additional_dependencies:
- flake8-print
args: [--max-line-length=99]
exclude: ^(docs)

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
exclude: ^(docs)
- rstcheck
- sphinx

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand All @@ -55,13 +47,11 @@ repos:
hooks:
- id: rst-backticks

- repo: https://github.com/myint/rstcheck
rev: v6.2.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: rstcheck
additional_dependencies:
- rstcheck
- sphinx
- id: isort
exclude: ^(docs)

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: '1.3.1'
Expand Down
6 changes: 5 additions & 1 deletion holidays/countries/albania.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@


class Albania(
ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays
ObservedHolidayBase,
ChristianHolidays,
InternationalHolidays,
IslamicHolidays,
StaticHolidays,
):
"""
References:
Expand Down
17 changes: 9 additions & 8 deletions holidays/countries/algeria.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays):
"""
References:
- https://en.wikipedia.org/wiki/Public_holidays_in_Algeria
As of April 30, 2023. Algeria has 3 days of Eid holidays
(https://www.horizons.dz/english/archives/amp/12021)
"""

country = "DZ"
default_language = "ar"
# Estimated label.
# %s (estimated).
estimated_label = tr("(تقدير) %s")
supported_languages = ("ar", "en_US", "fr")

Expand All @@ -38,7 +42,7 @@ def _populate_public_holidays(self):

# In January 2018, Algeria declared Yennayer a national holiday.
if self._year >= 2018:
# Amazigh New Year / Yennayer.
# Amazigh New Year.
self._add_holiday_jan_12(tr("رأس السنة الأمازيغية"))

# Labor Day.
Expand All @@ -58,20 +62,17 @@ def _populate_public_holidays(self):
# Ashura.
self._add_ashura_day(tr("عاشورة"))

# Mawlid / Prophet's Birthday.
# Prophet's Birthday.
self._add_mawlid_day(tr("عيد المولد النبوي"))

# As of April 30, 2023. Algeria has 3 days of Eid holidays
# (https://www.horizons.dz/english/archives/amp/12021)

# Eid al-Fitr - Feast Festive.
# Eid al-Fitr.
self._add_eid_al_fitr_day(tr("عيد الفطر"))
# Eid al-Fitr Holiday.
self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر"))
if self._year >= 2024:
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))

# Eid al-Adha - Scarfice Festive.
# Eid al-Adha.
self._add_eid_al_adha_day(tr("عيد الأضحى"))
# Eid al-Adha Holiday.
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
Expand Down
6 changes: 2 additions & 4 deletions holidays/countries/angola.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,9 @@ def _populate_public_holidays(self):
tr("Dia de Natal e da Família")
if self._year >= 2011
else (
# Christmas Day.
tr("Dia do Natal")
tr("Dia do Natal") # Christmas Day.
if self._year >= 1996
# Family Day.
else tr("Dia da Família")
else tr("Dia da Família") # Family Day.
)
)
dt = self._add_christmas_day(name)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/argentina.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _populate_public_holidays(self):
# Restarted in 2011 via Decreto 1584/2010.

if 1956 <= self._year <= 1975 or self._year >= 2011:
# Carnival.
# Carnival Day.
name = tr("Día de Carnaval")
self._add_carnival_monday(name)
self._add_carnival_tuesday(name)
Expand Down Expand Up @@ -176,7 +176,7 @@ def _populate_public_holidays(self):
# Immaculate Conception.
self._add_immaculate_conception_day(tr("Inmaculada Concepción de María"))

# Christmas.
# Christmas Day.
self._add_christmas_day(tr("Navidad"))

# Movable Holidays
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/armenia.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _populate_public_holidays(self):
# Motherhood and Beauty Day.
self._add_holiday_apr_7(tr("Մայրության և գեղեցկության տոն"))

# Armenian Genocide Remembrance Day,
# Armenian Genocide Remembrance Day.
self._add_holiday_apr_24(tr("Եղեռնի զոհերի հիշատակի օր"))

if self._year >= 2001:
Expand Down
6 changes: 2 additions & 4 deletions holidays/countries/aruba.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ def _populate_public_holidays(self):
tr("Dia di Rey")
if self._year >= 2021
else (
# King's Day.
tr("Aña di Rey")
tr("Aña di Rey") # King's Day.
if self._year >= 2014
# Queen's Day.
else tr("Aña di La Reina")
else tr("Aña di La Reina") # Queen's Day.
)
)
if self._year >= 2014:
Expand Down
19 changes: 8 additions & 11 deletions holidays/countries/bahrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Bahrain(HolidayBase, InternationalHolidays, IslamicHolidays):

country = "BH"
default_language = "ar"
# Estimated label.
# %s (estimated).
estimated_label = tr("(تقدير) %s")
supported_languages = ("ar", "en_US")
weekend = {FRI, SAT}
Expand All @@ -42,7 +42,7 @@ def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("رأس السنة الميلادية"))

# Labour day.
# Labor Day.
self._add_labor_day(tr("عيد العمال"))

# Eid Al Fitr.
Expand All @@ -53,23 +53,20 @@ def _populate_public_holidays(self):
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))

# Eid Al Adha.
eid_al_adha = tr("عيد الأضحى")
self._add_eid_al_adha_day(eid_al_adha)
self._add_eid_al_adha_day(tr("عيد الأضحى"))
# Eid Al Adha Holiday.
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى"))

# Al Hijra New Year.
hijri_new_year = tr("رأس السنة الهجرية")
self._add_islamic_new_year_day(hijri_new_year)
# Islamic New Year.
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))

# Ashura.
ashura = tr("عاشورة")
# Ashura Eve.
self._add_ashura_eve(tr("ليلة عاشورة"))
self._add_ashura_day(ashura)
# Ashura.
self._add_ashura_day(tr("عاشورة"))

# Prophets Birthday.
# Prophet's Birthday.
self._add_mawlid_day(tr("عيد المولد النبوي"))

# National Day.
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/belarus.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _populate_public_holidays(self):
# Radunitsa (Day of Rejoicing).
self._add_rejoicing_day(tr("Радаўніца"))

# Labour Day.
# Labor Day.
self._add_labor_day(tr("Свята працы"))

# Victory Day.
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/belgium.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("Nieuwjaar"))

# Easter.
# Easter Sunday.
self._add_easter_sunday(tr("Pasen"))

# Easter Monday.
Expand All @@ -60,7 +60,7 @@ def _populate_public_holidays(self):
# National Day.
self._add_holiday_jul_21(tr("Nationale feestdag"))

# Assumption of Mary.
# Assumption Day.
self._add_assumption_of_mary_day(tr("O. L. V. Hemelvaart"))

# All Saints' Day.
Expand Down
3 changes: 2 additions & 1 deletion holidays/countries/belize.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def _populate_public_holidays(self):
# Indigenous Peoples' Resistance Day / Pan American Day.
name = "Indigenous Peoples' Resistance Day" if self._year >= 2021 else "Pan American Day"
self._move_holiday(
self._add_columbus_day(name), rule=TUE_WED_THU_TO_PREV_MON + FRI_SUN_TO_NEXT_MON
self._add_columbus_day(name),
rule=TUE_WED_THU_TO_PREV_MON + FRI_SUN_TO_NEXT_MON,
)

# Garifuna Settlement Day.
Expand Down
32 changes: 16 additions & 16 deletions holidays/countries/bosnia_and_herzegovina.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ def _populate_subdiv_holidays(self):
self._add_new_years_day(name)
self._add_new_years_day_two(name)

# Orthodox Christmas.
# Orthodox Christmas Day.
self._add_christmas_day(tr("Božić (Pravoslavni)"))

# Labor Day.
# International Labor Day.
name = tr("Međunarodni praznik rada")
self._add_labor_day(name)
self._add_labor_day_two(name)

# Catholic Christmas.
# Catholic Christmas Day.
self._add_christmas_day(tr("Božić (Katolički)"), GREGORIAN_CALENDAR)

super()._populate_subdiv_holidays()
Expand All @@ -126,7 +126,7 @@ def _populate_subdiv_bih_public_holidays(self):
# Orthodox Christmas Eve.
self._add_christmas_eve(tr("Badnji dan (Pravoslavni)"))

# Orthodox Christmas.
# Orthodox Christmas Day.
self._add_christmas_day(tr("Božić (Pravoslavni)"))

# Independence Day.
Expand All @@ -135,16 +135,16 @@ def _populate_subdiv_bih_public_holidays(self):
# Catholic Good Friday.
self._add_good_friday(tr("Veliki petak (Katolički)"), GREGORIAN_CALENDAR)

# Catholic Easter.
# Catholic Easter Sunday.
self._add_easter_sunday(tr("Uskrs (Katolički)"), GREGORIAN_CALENDAR)

# Orthodox Easter.
# Orthodox Easter Sunday.
self._add_easter_sunday(tr("Vaskrs (Pravoslavni)"))

# Orthodox Easter Monday.
self._add_easter_monday(tr("Uskrsni ponedjeljak (Pravoslavni)"))

# Labor Day.
# International Labor Day.
name = tr("Međunarodni praznik rada")
self._add_observed(self._add_labor_day(name), rule=SUN_TO_NEXT_TUE)
self._add_labor_day_two(name)
Expand All @@ -158,7 +158,7 @@ def _populate_subdiv_bih_public_holidays(self):
# Catholic Christmas Eve.
self._add_christmas_eve(tr("Badnji dan (Katolički)"), GREGORIAN_CALENDAR)

# Catholic Christmas.
# Catholic Christmas Day.
self._add_christmas_day(tr("Božić (Katolički)"), GREGORIAN_CALENDAR)

# Eid al-Fitr.
Expand All @@ -173,21 +173,21 @@ def _populate_subdiv_brc_public_holidays(self):
self._add_observed(self._add_new_years_day(name), rule=SAT_SUN_TO_NEXT_MON_TUE)
self._add_new_years_day_two(name)

# Orthodox Christmas.
# Orthodox Christmas Day.
self._add_observed(self._add_christmas_day(tr("Božić (Pravoslavni)")))

self._add_observed(
# Day of establishment of Brčko District.
self._add_holiday_mar_8(tr("Dan uspostavljanja Brčko distrikta"))
)

# Labor Day.
# International Labor Day.
name = tr("Međunarodni praznik rada")
self._add_observed(self._add_labor_day(name), rule=SAT_SUN_TO_NEXT_MON_TUE)
self._add_labor_day_two(name)

self._add_observed(
# Catholic Christmas.
# Catholic Christmas Day.
self._add_christmas_day(tr("Božić (Katolički)"), GREGORIAN_CALENDAR)
)

Expand All @@ -200,7 +200,7 @@ def _populate_subdiv_srp_public_holidays(self):
# Orthodox Christmas Eve.
self._add_christmas_eve(tr("Badnji dan (Pravoslavni)"))

# Orthodox Christmas.
# Orthodox Christmas Day.
self._add_christmas_day(tr("Božić (Pravoslavni)"))

# Orthodox New Year.
Expand All @@ -209,16 +209,16 @@ def _populate_subdiv_srp_public_holidays(self):
# Catholic Good Friday.
self._add_good_friday(tr("Veliki petak (Katolički)"), GREGORIAN_CALENDAR)

# Catholic Easter.
# Catholic Easter Sunday.
self._add_easter_sunday(tr("Uskrs (Katolički)"), GREGORIAN_CALENDAR)

# Orthodox Easter.
# Orthodox Easter Sunday.
self._add_easter_sunday(tr("Vaskrs (Pravoslavni)"))

# Orthodox Easter Monday.
self._add_easter_monday(tr("Uskrsni ponedjeljak (Pravoslavni)"))

# Labor Day.
# International Labor Day.
name = tr("Međunarodni praznik rada")
self._add_observed(self._add_labor_day(name), rule=SAT_TO_NEXT_MON)
self._add_labor_day_two(name)
Expand All @@ -234,7 +234,7 @@ def _populate_subdiv_srp_public_holidays(self):
# Catholic Christmas Eve.
self._add_christmas_eve(tr("Badnji dan (Katolički)"), GREGORIAN_CALENDAR)

# Catholic Christmas.
# Catholic Christmas Day.
self._add_christmas_day(tr("Božić (Katolički)"), GREGORIAN_CALENDAR)

# Eid al-Fitr.
Expand Down
3 changes: 2 additions & 1 deletion holidays/countries/bulgaria.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def _populate_public_holidays(self):

if self.observed:
self._populate_observed(
dts_observed, excluded_names={self.tr("Велика събота"), self.tr("Великден")}
dts_observed,
excluded_names={self.tr("Велика събота"), self.tr("Великден")},
)

def _populate_school_holidays(self):
Expand Down
Loading

0 comments on commit b9e2f5f

Please sign in to comment.