Skip to content

Commit

Permalink
Merge branch 'dev' into add-sri_lanka
Browse files Browse the repository at this point in the history
  • Loading branch information
Prateekshit73 authored Jan 24, 2025
2 parents b4d99c3 + c12ecb1 commit 874f881
Show file tree
Hide file tree
Showing 17 changed files with 2,836 additions and 1,638 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- --py39-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
rev: v0.9.3
hooks:
- id: ruff
- id: ruff-format
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ include Makefile

recursive-include docs *
recursive-include holidays/locale *.mo
recursive-include holidays/locale *.po
recursive-include requirements *

prune docs/build
Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -829,7 +829,7 @@ All other default values are highlighted with bold:
- SI
-
- en_US, **sl**, uk
-
- WORKDAY
* - South Africa
- ZA
-
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 874f881

Please sign in to comment.