Skip to content

Commit

Permalink
Update Iran holidays (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
KJhellico authored Jan 23, 2025
1 parent 7566884 commit 4c678d1
Show file tree
Hide file tree
Showing 9 changed files with 1,994 additions and 1,420 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ All other default values are highlighted with bold:
* - Iran
- IR
-
- en_US, **fa**
- en_US, **fa_IR**
-
* - Ireland
- IE
Expand Down
6 changes: 6 additions & 0 deletions holidays/calendars/persian.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class _Persian:
START_YEAR = 1901
END_YEAR = 2100

def is_leap_year(self, year: int) -> bool:
"""
Is Persian year that begins in the specified Gregorian year a leap year.
"""
return (year % 33) in {3, 7, 11, 16, 20, 24, 28, 32}

def new_year_date(self, year: int) -> Optional[date]:
"""
Return Gregorian date of Persian new year (1 Farvardin) in a given Gregorian year.
Expand Down
Loading

0 comments on commit 4c678d1

Please sign in to comment.