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:50:00
זמן טלית ותפילין - 05:16:00
הנץ החמה - 06:07:00
סוף זמן ק"ש מג"א - 08:45:00
סוף זמן ק"ש גר"א - 09:22:00
סוף זמן תפילה מג"א - 10:03:20
סוף זמן תפילה גר"א - 10:27:00
חצות היום - 12:40:00
מנחה גדולה - 13:09:30
מנחה גדולה 30 דק - 13:10:00
מנחה קטנה - 16:24:30
פלג המנחה - 17:51:45
שקיעה - 19:13:00
מוצאי צום - 19:41:00
מוצאי שבת - 19:51:00
צאת הכוכבים (18 דק) - 19:32:30
לילה לרבנו תם - 20:31: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:50:00
Talit & Tefilin's time - 05:16:00
Sunrise - 06:07:00
Shema EOT MG"A - 08:45:00
Shema EOT GR"A - 09:22:00
Tefila EOT MG"A - 10:03:20
Tefila EOT GR"A - 10:27:00
Midday - 12:40:00
Big Mincha - 13:09:30
Big Mincha 30 min - 13:10:00
Small Mincha - 16:24:30
Plag Mincha - 17:51:45
Sunset - 19:13:00
End of fast - 19:41:00
End of Shabbat - 19:51:00
Tset Hakochavim (18 minutes) - 19:32:30
Night by Rabbeinu Tam - 20:31: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.2.1.tar.gz (72.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hdate-1.2.1-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hdate-1.2.1.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.7 CPython/3.14.4 Linux/6.17.0-1010-azure

File hashes

Hashes for hdate-1.2.1.tar.gz
Algorithm Hash digest
SHA256 7d29e365ed31be787a46a8931236da8a54f12ca0c4f0a7f3b5cbf2f4d6561a30
MD5 83694288dc90129ed65a9bd82ce75a08
BLAKE2b-256 c6d058bb5b2a21917f0cb750cb9c4f342efa601d6f4e48592120cc53b1618f77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hdate-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 52.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.7 CPython/3.14.4 Linux/6.17.0-1010-azure

File hashes

Hashes for hdate-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 726dec7fe6d8180a5a9598dbfd43630386ac2ada806ac4e68f5b14f3b57adfe2
MD5 828f41e186573d63288fd90bc50ddd4a
BLAKE2b-256 f165f3980f2def114a8b43eff7abeefb9fc517768b0cb35db74513e661e445d3

See more details on using hashes here.

Supported by

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