Skip to content

Commit

Permalink
Merge branch 'beta' into vacanza2024
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-prodigy authored Feb 11, 2024
2 parents a69f1ce + be26ebf commit b20fbd5
Show file tree
Hide file tree
Showing 371 changed files with 20,693 additions and 19,041 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
python-version: '3.11'

- name: Run pre-commit
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1

test:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: browniebroke/[email protected]

- uses: peter-evans/create-pull-request@v5.0.2
- uses: peter-evans/create-pull-request@v6.0.0
with:
base: beta
body: Update pre-commit hooks to their latest versions.
Expand Down
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.2.1
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
20 changes: 20 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
Version 0.42
============

Released February 5, 2024

- Add Ghana holidays (#1639 by @JerryAgbesi, @arkid15r)
- Add Jersey holidays (#1664 by @PPsyrius)
- Update Costa Rica holidays (#1657 by @KJhellico)
- Update Croatia holidays (#1659 by @KJhellico)
- Update Greece holidays (#1663 by @KJhellico)
- Update Switzerland holidays (#1648 by @KJhellico)
- Update United Arab Emirates holidays (#1667 by @KJhellico)
- Update ruff config (#1684 by @KJhellico)
- 2020 China calendar discrepancies fix (#1645 by @PPsyrius)
- Add United Kingdom's Whit Monday holidays for pre-1971 years (#1668 by @PPsyrius)
- Ruff cleanup (#1680 by @PPsyrius, @arkid15r)
- Unify common holidays name translation (#1673 by @KJhellico)
- Use current version for release notes generation (#1661 by @arkid15r)
- Use ruff instead of black+flake8 (#1671 by @arkid15r)

Version 0.41
============

Expand Down
9 changes: 7 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Available Countries
.. _ISO 639-1 code: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
.. _ISO 639-2 code: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

We currently support 142 country codes. The standard way to refer to a country
We currently support 143 country codes. The standard way to refer to a country
is by using its `ISO 3166-1 alpha-2 code`_, the same used for domain names, and
for a subdivision its `ISO 3166-2 code`_. Some of the countries support more
than one language for holiday names output.
Expand Down Expand Up @@ -441,7 +441,7 @@ All other default values are highlighted with bold:
* - Ghana
- GH
-
-
-
-
* - Greece
- GR
Expand Down Expand Up @@ -523,6 +523,11 @@ All other default values are highlighted with bold:
-
- en_US, **ja**, th
- BANK
* - Jersey
- JE
-
-
-
* - Kazakhstan
- KZ
-
Expand Down
2 changes: 1 addition & 1 deletion holidays/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from holidays.registry import EntityLoader
from holidays.utils import *

__version__ = "0.42"
__version__ = "0.43"


EntityLoader.load("countries", globals())
Expand Down
1 change: 1 addition & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
from .italy import Italy, IT, ITA
from .jamaica import Jamaica, JM, JAM
from .japan import Japan, JP, JPN
from .jersey import Jersey, JE, JEY
from .kazakhstan import Kazakhstan, KZ, KAZ
from .kenya import Kenya, KE, KEN
from .kyrgyzstan import Kyrgyzstan, KG, KGZ
Expand Down
17 changes: 9 additions & 8 deletions holidays/countries/algeria.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,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 @@ -39,7 +43,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 @@ -59,20 +63,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 @@ -166,11 +166,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 @@ -94,7 +94,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 @@ -177,7 +177,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 @@ -69,7 +69,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 @@ -106,11 +106,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 @@ -29,7 +29,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 @@ -43,7 +43,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 @@ -54,23 +54,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 @@ -60,7 +60,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 @@ -40,7 +40,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 @@ -61,7 +61,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
Loading

0 comments on commit b20fbd5

Please sign in to comment.