Welcome to pyluach’s documentation!¶
Pyluach is a Python package for manipulating Hebrew calendar dates and Hebrew-Gregorian conversions.
Pyluach is a Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversions.
Conversion between Hebrew and Gregorian dates
Finding the difference between two dates
Finding a date at a given duration from the given date
Rich comparisons between dates
Finding the weekday of a given date
Finding the weekly Parsha reading of a given date
pip install pyluach.
>>> from pyluach import dates, hebrewcal, parshios >>> today = dates.HebrewDate.today() >>> lastweek_gregorian = (today - 7).to_greg() >>> lastweek_gregorian < today True >>> today - lastweek_gregorian 7 >>> greg = GregorianDate(1986, 3, 21) >>> heb = HebrewDate(5746, 13, 10) >>> greg == heb True >>> for month in hebrewcal.Year(5774).itermonths(): ... print(month.name) Tishrei Cheshvan ... >>> date = dates.GregorianDate(2010, 10, 6) >>> print(parshios.getparsha(date))  >>> print(parshios.getparsha_string(date)) Beraishis