Skip to content
/ pyluach Public
forked from simlist/pyluach

A Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversion.

License

Notifications You must be signed in to change notification settings

hudcap/pyluach

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyluach

Documentation Status https://travis-ci.org/simlist/pyluach.svg?branch=master https://coveralls.io/repos/github/simlist/pyluach/badge.svg?branch=master

Pyluach is a Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversions.

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

Installation

Use pip install pyluach.

Typical use

>>> 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))
[0]
>>> print(parshios.getparsha_string(date))
Beraishis

Documentation

Documentation for pyluach can be found at https://readthedocs.org/projects/pyluach/.

Contact

For questions and comments feel free to contact me at [email protected].

License

Pyluach is licensed under the MIT license.

About

A Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversion.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%