12 releases (4 breaking)

✓ Uses Rust 2018 edition

new 0.5.0 May 22, 2019
0.4.0 Mar 12, 2019
0.3.0 Mar 12, 2019
0.2.1 Mar 11, 2019
0.1.6 Feb 12, 2019

#21 in Date and time

Download history 57/week @ 2019-02-06 1/week @ 2019-02-13 16/week @ 2019-02-20 22/week @ 2019-02-27 33/week @ 2019-03-06 35/week @ 2019-03-13 55/week @ 2019-03-20 12/week @ 2019-03-27 12/week @ 2019-04-03 5/week @ 2019-04-10 1/week @ 2019-04-17 13/week @ 2019-04-24 12/week @ 2019-05-01 25/week @ 2019-05-15

80 downloads per month
Used in 1 crate

MIT license

1.5K SLoC

Crates.io Documentation Build Status Average time to resolve an issue Percentage of issues still open License: MIT



heca-lib is a blazingly fast Hebrew calender library. It's the backend behind the heca program.


  1. Add to Cargo.toml:
    heca-lib = "*"
  1. Add the following to your crate root:
extern crate heca_lib;

  1. Import the types:
use heca_lib::prelude::*;
use heca_lib::*;



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 chrono::Utc;
use chrono::offset::TimeZone;
use heca_lib::prelude::*;
use heca_lib::HebrewDate;


You can then get back a Gregorian date from this Hebrew Date.

extern crate heca_lib;

use chrono::Utc;
use chrono::offset::TimeZone;
use heca_lib::{HebrewDate};
use heca_lib::prelude::*;

assert_eq!(HebrewDate::from_ymd(5779,HebrewMonth::Tishrei,10).unwrap().to_gregorian(),Utc.ymd(2018, 9,18).and_hms(18,00,00));

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 heca_lib::{HebrewYear,HebrewDate};
use heca_lib::prelude::*;

assert_eq!(HebrewYear::new(5779).unwrap().get_holidays(Location::Chul, &[TorahReadingType::Shabbos])[0].name(), TorahReading::Shabbos(Parsha::Vayelach));
assert_eq!(HebrewYear::new(5779).unwrap().get_holidays(Location::Chul, &[TorahReadingType::SpecialParsha]).iter().find(|x| x.name() == TorahReading::SpecialParsha(SpecialParsha::Zachor)).unwrap().day(),HebrewDate::from_ymd(5779,HebrewMonth::Adar2,9).unwrap());


  1. This library won't work for years before 3764 (4).
  2. This library is still unstable and the API may change at any time.
  3. 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!
  4. While this library works, there are still a few inefficienciess that need to be taken care of.

Current version: 0.4.0

License: MIT


~50K SLoC