Skip to content

Commit

Permalink
Replace the Passover calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
tylert committed Jan 31, 2022
1 parent 529cc69 commit a6449b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion holiday_religious.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def main(year):
# https://en.wikipedia.org/wiki/Nisan
# https://fr.wikipedia.org/wiki/Nissan_(mois)
# Passover begins on 14 or 15 Nisan and goes until 21 or 22 Nisan
print(f'{passover(year) - timedelta(days=1)} Passover Begins') # Pessa'h
print(f'{heb_date(NISAN, 14, year)} Passover Begins') # Pessa'h
print(f'{heb_date(NISAN, 22, year)} Passover Ends')
# Début de Pâque des Juifs
# Fin de Pâque des Juifs
Expand Down
6 changes: 5 additions & 1 deletion tests/test_everything.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import date
from datetime import date, timedelta

import pytest

Expand Down Expand Up @@ -159,6 +159,10 @@ def test_a_bunch_of_easters(self):
for year in range(1, 5000):
assert easter(year).month == MARCH or easter(year).month == APRIL

def test_passover(self):
assert passover(2022) - timedelta(days=1) == heb_date(NISAN, 14, 2022)
assert passover(2022) + timedelta(days=7) == heb_date(NISAN, 22, 2022)


# class TestMoons:
# def test_some_moon_phases(self):
Expand Down

0 comments on commit a6449b5

Please sign in to comment.