heca-lib
heca-lib
heca-lib is a blazingly fast Hebrew calender library. It's the backend behind the heca program.
Usage:
- Add to Cargo.toml:
[]
= "*"
- Add the following to your crate root:
extern crate heca_lib;
- Import the types:
use *;
use *;
Overview:
Convert:
This library can convert from Hebrew to Gregorian dates and back. You can get a HebrewDate either from a known Hebrew date or from a Gregorian date:
extern crate heca_lib;
use Utc;
use TimeZone;
use *;
use HebrewDate;
assert_eq!;
You can then get back a Gregorian date from this Hebrew Date.
extern crate heca_lib;
use Utc;
use TimeZone;
use ;
use *;
assert_eq!;
Get Information on the Hebrew Year
This library can also list the major Jewish holidays and Torah readings in a given year (for both Israel and the Diaspora):
extern crate heca_lib;
use ;
use *;
assert_eq!;
assert_eq!;
Notes:
- This library won't work for years before 3764 (4).
- This library is still unstable and the API may change at any time.
- I tested this library against hebcal for all Rosh Hashanas between 3764 and 9999 (4-6239). I also checked it for all Rosh Chodesh Adars in those years. However, I take no resposibility if you accidently keep Yom Tov on the wrong day!
- While this library works, there are still a few inefficienciess that need to be taken care of.
Current version: 0.3.0
License: MIT