Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/hebrew/py-pyluach/files/test.py
16462 views
1
from pyluach import dates, hebrewcal, parshios
2
3
today = dates.HebrewDate.today()
4
lastweek_gregorian = (today - 7).to_greg()
5
print(f"lastweek_gregorian<today: ={lastweek_gregorian < today}")
6
print(f"today-lastweek_gregorian={today - lastweek_gregorian}")
7
greg = dates.GregorianDate(1986, 3, 21)
8
heb = dates.HebrewDate(5746, 13, 10)
9
print(f"greg==heb: {greg == heb}")
10
purim = dates.HebrewDate(5781, 12, 14)
11
print(f"purim.hebrew_day()={purim.hebrew_day()}")
12
print(f"purim.hebrew_date_string()={purim.hebrew_date_string()}")
13
print(f"purim.hebrew_date_string(True)={purim.hebrew_date_string(True)}")
14
rosh_hashana = dates.HebrewDate(5782, 7, 1)
15
print(f"rosh_hashana.holiday={rosh_hashana.holiday()}")
16
print(f"rosh_hashana.holiday={rosh_hashana.holiday(hebrew=True)}")
17
18