Jewish/Hebrew date and Zmanim in native Python 2.7/3.x


Keywords
hebrew-calendar, python-library, python27, python3, python3-library
License
CNRI-Python-GPL-Compatible
Install
pip install hdate==0.10.8

Documentation

py-libhdate

Jewish/Hebrew date and Zmanim in native python 3.x

Originally ported from libhdate, see http://libhdate.sourceforge.net/ for more details (including license)


Installation using pip:

$ pip install hdate

Examples:

base code to provide times of the day in hebrew:

>>> import hdate
>>> import datetime
>>> c = hdate.Location("驻转讞 转拽讜讛", 32.08707, 34.88747, "Asia/Jerusalem", 54)
>>> z = hdate.Zmanim(date=datetime.date(2016, 4, 18), location=c, hebrew=True)
>>> print(z)
注诇讜转 讛砖讞专 - 04:52:00
讝诪谉 讟诇讬转 讜转驻讬诇讬谉 - 05:18:00
讛谞抓 讛讞诪讛 - 06:08:00
住讜祝 讝诪谉 "砖 诪讙" - 08:46:00
住讜祝 讝诪谉 "砖 讙专" - 09:23:00
住讜祝 讝诪谉 转驻讬诇讛 诪讙" - 10:04:00
住讜祝 讝诪谉 转驻讬诇讛 讙专" - 10:28:00
讞爪讜转 讛讬讜诐 - 12:40:00
诪谞讞讛 讙讚讜诇讛 - 13:10:30
诪谞讞讛 拽讟谞讛 - 16:25:30
驻诇讙 讛诪谞讞讛 - 17:50:45
砖拽讬注讛 - 19:12:00
爪讗转 讛讻讜讻讘讬诐 - 19:38:00
讞爪讜转 讛诇讬诇讛 - 00:40:00

and in english:

>>> z = hdate.Zmanim(date=datetime.date(2016, 4, 18), location=c, hebrew=False)
>>> print(z)
Alot HaShachar - 04:52:00
Talit & Tefilin's time - 05:18:00
Sunrise - 06:08:00
Shema EOT MG"A - 08:46:00
Shema EOT GR"A - 09:23:00
Tefila EOT MG"A - 10:04:00
Tefila EOT GR"A - 10:28:00
Midday - 12:40:00
Big Mincha - 13:10:30
Small Mincha - 16:25:30
Plag Mincha - 17:50:45
Sunset - 19:12:00
First stars - 19:38:00
Midnight - 00:40:00

to provide the full hebrew date:

>>> h = hdate.HDate(datetime.date(2016, 4, 26), hebrew=True)
>>> print(h)
讬讜诐 砖诇讬砖讬 "讞 讘谞讬住谉 讛' 转砖注" ' 讘注讜诪专 讞讜诇 讛诪讜注讚 驻住讞

and in english:

>>> h = hdate.HDate(datetime.date(2016, 4, 18), hebrew=False)
>>> print(h)
Monday 10 Nisan 5776