Skip to content

Commit

Permalink
Handled no prefix day on Shavuos when israel=True.
Browse files Browse the repository at this point in the history
  • Loading branch information
simlist committed Feb 28, 2023
1 parent 7d0adc8 commit 7b96339
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pyluach/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def _day_of_holiday(self, israel, hebrew=False):
name = utils._festival_string(self, israel)
if name is not None:
holiday = utils.Days(name)
# if holiday is utils.Days.SHAVUOS and israel:
# return ''
if holiday is utils.Days.SHAVUOS and israel:
return ''
first_day = utils._first_day_of_holiday(holiday)
if first_day:
day = HebrewDate(self.year, *first_day) - self + 1
Expand Down
6 changes: 3 additions & 3 deletions tests/test_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ def test_festival(self):

def test_day_of_holiday(self):
assert HebrewDate(5783, 12, 14)._day_of_holiday(israel=False) == ''
# shavuos = HebrewDate(5783, 3, 6)
# assert shavuos.holiday(prefix_day=True) == '1 Shavuos'
# assert shavuos.holiday(israel=True, prefix_day=True) == 'Shavuos'
shavuos = HebrewDate(5783, 3, 6)
assert shavuos.holiday(prefix_day=True) == '1 Shavuos'
assert shavuos.holiday(israel=True, prefix_day=True) == 'Shavuos'


def test_to_pydate():
Expand Down

0 comments on commit 7b96339

Please sign in to comment.