py-libhdate

Python 3 library for Hebrew date and zmanim (times) objects in python

GPL-3.0 License

Downloads
10.6K
Stars
30
Committers
14

Bot releases are hidden (Show)

py-libhdate - v0.10.8

Published by tsvi 7 months ago

Revert astral dependency to be ^2.2

Full Changelog: https://github.com/py-libhdate/py-libhdate/compare/v0.10.7...v0.10.8

py-libhdate - v0.10.7

Published by tsvi 7 months ago

py-libhdate - The real 10.5

Published by tsvi 7 months ago

py-libhdate - v0.9.11

Published by tsvi about 4 years ago

Get it

Install it with pip

pip install hdate==0.9.11

See it on pypi: https://pypi.org/project/hdate

Changes

  • Fix missing closing quote (#70) @tsvi
  • Terminate sed command
py-libhdate - v0.9.3

Published by royi1000 almost 5 years ago

py-libhdate - Changing the API for HDate object

Published by tsvi almost 6 years ago

This release cleans up the API for accessing info of the HDate object, making it easier to use in homeassistant.

  • Cheshvan/חשון has been renamed to the correct Marcheshvan/מרחשוון
  • The order of the times for zmanim when being printed has been fixed to match the readme.

The following methods have been replaced or changed in the date object:

  • hdate_set_hdate(self, day, month, year) - replaced by giving a value to HDate.hdate, the value must be of the form hdate.common.HebrewDate(year, month, day)
  • h_day, h_month and h_year have been deprecated in favor of hdate
  • Gregorian date can now be set by giving HDate.gdate a datetime.datetime or datetime.date object
  • get_hebrew_date() has been deprecated in favor of the hebrew_date property. The previous returned 3 values of day, month and year. The new one returns the string either in hebrew or english of the date only.
  • get_reading() has been fixed according to #23. It doesn't accept the diaspora argument anymore, rather the class variable diaspora should be changed.
  • date.get_parashe() has been deprecated in favor of a class property parasha property returns the string value either in english or hebrew depending on the class variable
  • hdate_set_jdn() has been deprecated.
  • get_holyday() has been renamed to _holiday_entry() and now returns the full entry from htables
  • holiday_description property returns the string either in english or hebrew depending on the class variable
  • date.get_holyday_type() has moved to be a class property holyday_type
  • get_holyday_name() has been renamed to be a class property holyday_name
  • get_omer_day() has been renamed be a class property omer_day
  • date.get_hebrew_date() has been deprecated.
  • __repr__() has been implemented

hdate_julian has been renamed to converters. The following method signatures have been changed:

  • gdate_to_jdn now expects a datetime object
  • hdate_to_jdn now expects a datetime object
  • jdn_to_gdate now returns a datetime object
  • jdn_to_gdate now expects a HebrewDate namedtuple
py-libhdate - Bugfixes and more pythonic

Published by tsvi almost 7 years ago

  • Some bugfixes due to our support of both 2.7 and 3.x versions of python
  • More pythonic way using tuples instead of lists for immutable data and making code easier to maintain

Breaking changes

  • to_string() has been removed from HDate() in favor of __str__
  • __repr__ has been removed in favor of __str__ (__repr__ should be used for a programmatic representation)
  • This means that to get the representation, you need to print the object
py-libhdate - Critical bugfix for Zmanim

Published by tsvi about 7 years ago

This fixes a critical bug in Zmanim class, created because of a bad division due to updating the code for python 3.

py-libhdate - Supporting python 3

Published by tsvi about 7 years ago

This release add support for python3, while keeping support for python 2.7

py-libhdate -

Published by tsvi about 7 years ago

  • Multiple bugfixes
  • Add unittests
  • Cleanup according pep-8 requirements