Skip to content

Commit

Permalink
Fixed bug festival would return Shavuos on 7 of other months.
Browse files Browse the repository at this point in the history
fixes #24
  • Loading branch information
simlist committed Aug 24, 2022
1 parent c3f52be commit 2868238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyluach/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _festival(date, israel=False, include_working_days=True):
return 11
elif month == 2 and day == 18 and include_working_days:
return 12
elif month == 3 and day == 6 or (not israel and day == 7):
elif month == 3 and (day == 6 or (not israel and day == 7)):
return 13
elif month == 5 and day == 15 and include_working_days:
return 14
Expand Down
2 changes: 2 additions & 0 deletions tests/test_hebrewcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ def test_shavuos(self):
assert holiday(shavuos, True) == 'Shavuos'
assert holiday(shavuos + 1, True) is None
assert festival(shavuos + 1, include_working_days=False) == 'Shavuos'
not_shavuos = dates.HebrewDate(5782, 4, 7)
assert festival(not_shavuos) is None

def test_tubeav(self):
tubeav = dates.HebrewDate(5779, 5, 15)
Expand Down

0 comments on commit 2868238

Please sign in to comment.