Skip to content

Commit

Permalink
Merge branch 'dev' into add_get_next_holiday
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosi2143 authored Jan 12, 2025
2 parents 1fe9a7e + 33629fa commit 8934029
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 17 additions & 1 deletion holidays/countries/afghanistan.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,21 @@
from gettext import gettext as tr

from holidays.calendars import _CustomIslamicHolidays
from holidays.calendars.gregorian import JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
from holidays.calendars.gregorian import (
JAN,
MAR,
APR,
MAY,
JUN,
JUL,
AUG,
SEP,
OCT,
NOV,
DEC,
FRI,
SAT,
)
from holidays.groups import InternationalHolidays, IslamicHolidays, PersianCalendarHolidays
from holidays.holiday_base import HolidayBase

Expand All @@ -22,6 +36,7 @@ class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays, PersianCa
"""
https://en.wikipedia.org/wiki/Public_holidays_in_Afghanistan
https://www.timeanddate.com/holidays/afghanistan/
https://en.wikipedia.org/wiki/Workweek_and_weekend
"""

country = "AF"
Expand All @@ -31,6 +46,7 @@ class Afghanistan(HolidayBase, InternationalHolidays, IslamicHolidays, PersianCa
supported_languages = ("en_US", "fa_AF", "ps_AF")
# Afghanistan's regaining of full independence from British influence.
start_year = 1919
weekend = {FRI, SAT}

def __init__(self, *args, **kwargs):
InternationalHolidays.__init__(self)
Expand Down
3 changes: 3 additions & 0 deletions holidays/countries/iran.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from gettext import gettext as tr

from holidays.calendars.gregorian import FRI
from holidays.groups import IslamicHolidays, PersianCalendarHolidays
from holidays.holiday_base import HolidayBase

Expand All @@ -21,6 +22,7 @@ class Iran(HolidayBase, IslamicHolidays, PersianCalendarHolidays):
References:
- https://en.wikipedia.org/wiki/Public_holidays_in_Iran
- https://fa.wikipedia.org/wiki/تعطیلات_عمومی_در_ایران
- https://en.wikipedia.org/wiki/Workweek_and_weekend
"""

country = "IR"
Expand All @@ -29,6 +31,7 @@ class Iran(HolidayBase, IslamicHolidays, PersianCalendarHolidays):
estimated_label = tr("(تخمین زده) %s")
supported_languages = ("en_US", "fa")
start_year = 1980
weekend = {FRI}

def __init__(self, *args, **kwargs):
IslamicHolidays.__init__(self)
Expand Down

0 comments on commit 8934029

Please sign in to comment.