Skip to main content

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

Project description

PyPI - Version Documentation Status Python Version from PEP 621 TOML PyPI - License Code coverage status

The hdate Python library’s purpose is to provide information about the Hebrew date and times.

Originally ported from the C version of libhdate by Royi Reshef, it is currently maintained by Tsvi Mostovicz and is the backend library for Home Assistant’s Jewish Calendar integration.


Installation using pip:

$ pip install hdate

Examples:

Provide the 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)
>>> 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
מנחה גדולה 30 דק - 13:10:00
מנחה קטנה - 16:25:30
פלג המנחה - 17:50:45
שקיעה - 19:12:00
מוצאי צום - 19:40:00
מוצאי שבת - 19:50:00
צאת הכוכבים (18 דק) - 19:31:30
לילה לרבנו תם - 20:30:00
חצות הלילה - 00:40:00

… and in English.

>>> from hdate.translator import set_language
>>> set_language("en")
>>> z = hdate.Zmanim(date=datetime.date(2016, 4, 18), location=c)
>>> 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
Big Mincha 30 min - 13:10:00
Small Mincha - 16:25:30
Plag Mincha - 17:50:45
Sunset - 19:12:00
End of fast - 19:40:00
End of Shabbat - 19:50:00
Tset Hakochavim (18 minutes) - 19:31:30
Night by Rabbeinu Tam - 20:30:00
Midnight - 00:40:00

Provide the full Hebrew date …

>>> set_language("he")
>>> h = hdate.HDateInfo(datetime.date(2016, 4, 26))
>>> print(h)
יום שלישי י"ח בניסן ה' תשע"ו ג' לעומר חול המועד פסח

… and in English.

>>> set_language("en")
>>> h = hdate.HDateInfo(datetime.date(2016, 4, 18))
>>> print(h)
Monday 10 Nisan 5776

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdate-1.1.2.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

hdate-1.1.2-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

Details for the file hdate-1.1.2.tar.gz.

File metadata

  • Download URL: hdate-1.1.2.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.4 Linux/6.11.0-1015-azure

File hashes

Hashes for hdate-1.1.2.tar.gz
Algorithm Hash digest
SHA256 6c98f723807e8482f8a72d384c209e45ba0189d5bb0e24360f79110658a1c244
MD5 bf032dec452512266d556ac362dbe81a
BLAKE2b-256 91901687fd11282705a6e4eebda1e7c063604aca3bb9aef0e51cb76f55692f83

See more details on using hashes here.

File details

Details for the file hdate-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: hdate-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 52.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.4 Linux/6.11.0-1015-azure

File hashes

Hashes for hdate-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e04b8433e37e10f03b4dd5a7479648f2ca17761d5501e0e299659a427bad0926
MD5 658e290a194b0f0180f6acce267cb571
BLAKE2b-256 3588138961b6103b296eccab89609b7615f00177f0759f3f27440c286151ea20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page