-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1377 from dr-prodigy/beta
v.0.29
- Loading branch information
Showing
269 changed files
with
5,642 additions
and
4,662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ jobs: | |
name: dist | ||
path: dist | ||
- name: Publish Package | ||
uses: pypa/[email protected].7 | ||
uses: pypa/[email protected].8 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# python-holidays | ||
# --------------- | ||
# A fast, efficient Python library for generating country, province and state | ||
# specific sets of holidays on the fly. It aims to make determining whether a | ||
# specific date is a holiday as fast and flexible as possible. | ||
# | ||
# Authors: dr-prodigy <[email protected]> (c) 2017-2023 | ||
# ryanss <[email protected]> (c) 2014-2017 | ||
# Website: https://github.com/dr-prodigy/python-holidays | ||
# License: MIT (see LICENSE file) | ||
|
||
from gettext import gettext as tr | ||
|
||
from holidays.calendars.gregorian import JAN, JUL, NOV | ||
from holidays.holiday_base import HolidayBase | ||
from holidays.holiday_groups import IslamicHolidays, InternationalHolidays | ||
|
@@ -10,6 +23,10 @@ class Algeria(HolidayBase, InternationalHolidays, IslamicHolidays): | |
""" | ||
|
||
country = "DZ" | ||
default_language = "ar" | ||
# Estimated label. | ||
estimated_label = tr("(تقدير*) *%s") | ||
supported_languages = ("ar", "en_US") | ||
|
||
def __init__(self, *args, **kwargs): | ||
InternationalHolidays.__init__(self) | ||
|
@@ -20,46 +37,48 @@ def _populate(self, year): | |
super()._populate(year) | ||
|
||
# New Year's Day. | ||
self._add_new_years_day("New Year's Day") | ||
self._add_new_years_day(tr("رأس السنة الميلادية")) | ||
|
||
# Amazigh New Year / Yennayer | ||
# In January 2018, Algeria declared Yennayer a national holiday | ||
if year >= 2018: | ||
self._add_holiday("Amazigh New Year", JAN, 12) | ||
# Amazigh New Year / Yennayer | ||
self._add_holiday(tr("رأس السنة الأمازيغية"), JAN, 12) | ||
|
||
# Labour Day | ||
self._add_labor_day("Labour Day") | ||
self._add_labor_day(tr("عيد العمال")) | ||
|
||
# Independence Day | ||
if year >= 1962: | ||
self._add_holiday("Independence Day", JUL, 5) | ||
# Independence Day | ||
self._add_holiday(tr("عيد الإستقلال"), JUL, 5) | ||
|
||
# Revolution Day | ||
if year >= 1963: | ||
self._add_holiday("Revolution Day", NOV, 1) | ||
# Revolution Day | ||
self._add_holiday(tr("عيد الثورة"), NOV, 1) | ||
|
||
# Islamic New Year | ||
self._add_islamic_new_year_day("Islamic New Year") | ||
self._add_islamic_new_year_day(tr("رأس السنة الهجرية")) | ||
|
||
# Ashura | ||
self._add_ashura_day("Ashura Day") | ||
self._add_ashura_day(tr("عاشورة")) | ||
|
||
# Mawlid / Prophet's Birthday | ||
self._add_mawlid_day("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 | ||
self._add_eid_al_fitr_day("Eid al-Fitr") | ||
self._add_eid_al_fitr_day_two("Eid al-Fitr Holiday") | ||
self._add_eid_al_fitr_day(tr("عيد الفطر")) | ||
# Eid al-Fitr Holiday | ||
self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر")) | ||
if year >= 2024: | ||
self._add_eid_al_fitr_day_three("Eid al-Fitr Holiday") | ||
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر")) | ||
|
||
# Eid al-Adha - Scarfice Festive | ||
self._add_eid_al_adha_day("Eid al-Adha") | ||
self._add_eid_al_adha_day_two("Eid al-Adha Holiday") | ||
self._add_eid_al_adha_day(tr("عيد الأضحى")) | ||
# Eid al-Adha Holiday | ||
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى")) | ||
if year >= 2023: | ||
self._add_eid_al_adha_day_three("Eid al-Adha Holiday") | ||
self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى")) | ||
|
||
|
||
class DZ(Algeria): | ||
|
Oops, something went wrong.