A Python package for dealing with Hebrew (Jewish) calendar dates.
Project Links
Meta
Author: MS List
Requires Python: >=3.8
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
Topic
- Software Development :: Libraries :: Python Modules
License
- OSI Approved :: MIT License
Programming Language
- Python :: 3
- Python :: 3 :: Only
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
Pyluach is a Python package for dealing with Hebrew (Jewish) calendar dates.
Features
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
Getting the holiday occuring on a given date
Generating html and text Hebrew calendars
Installation
Use pip install pyluach.
Documentation
Documentation for pyluach can be found at https://readthedocs.org/projects/pyluach/.
Examples
>>> 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 = dates.GregorianDate(1986, 3, 21)
>>> heb = dates.HebrewDate(5746, 13, 10)
>>> greg == heb
True
>>> purim = dates.HebrewDate(5781, 12, 14)
>>> purim.hebrew_day()
'י״ד'
>>> purim.hebrew_date_string()
'י״ד אדר תשפ״א'
>>> purim.hebrew_date_string(True)
'י״ד אדר ה׳תשפ״א'
>>> rosh_hashana = dates.HebrewDate(5782, 7, 1)
>>> rosh_hashana.holiday()
'Rosh Hashana'
>>> rosh_hashana.holiday(hebrew=True)
'ראש השנה'
>>> (rosh_hashana + 3).holiday()
None
>>> month = hebrewcal.Month(5781, 10)
>>> month.month_name()
'Teves'
>>> month.month_name(True)
'טבת'
>>> month + 3
Month(5781, 1)
>>> for month in hebrewcal.Year(5774).itermonths():
... print(month.month_name())
Tishrei Cheshvan ...
>>> date = dates.GregorianDate(2010, 10, 6)
>>> parshios.getparsha(date)
[0]
>>> parshios.getparsha_string(date, israel=True)
'Beraishis'
>>> parshios.getparsha_string(date, hebrew=True)
'בראשית'
>>> new_date = dates.GregorianDate(2021, 3, 10)
>>> parshios.getparsha_string(new_date)
'Vayakhel, Pekudei'
>>> parshios.getparsha_string(new_date, hebrew=True)
'ויקהל, פקודי'
Contact
For questions and comments please raise an issue in github or contact me at simlist@gmail.com.
License
Pyluach is licensed under the MIT license.
2.3.0
Sep 09, 2025
2.2.0
Mar 01, 2023
2.1.0
Feb 13, 2023
2.0.2
Oct 24, 2022
2.0.1
Aug 24, 2022
2.0.0
May 30, 2022
1.4.2
May 20, 2022
1.4.1
Mar 25, 2022
1.4.0
Feb 22, 2022
1.3.0
Jun 09, 2021
1.2.1
Nov 08, 2020
1.2.0
Oct 28, 2020
1.1.1
Aug 14, 2020
1.1.0
Jun 04, 2020
1.0.1
Mar 03, 2019
1.0.0
Mar 03, 2019
0.3.0.dev1
Sep 27, 2017
0.3.0.dev0
Jul 25, 2017
0.2.0.dev2
Jan 29, 2016
0.2.0.dev1
Jan 08, 2016
0.2.0.dev0
Dec 27, 2015