jdate 0.1.0

A library for converting between Gregorian and Jewish dates
Documentation
  • Coverage
  • 90%
    18 out of 20 items documented0 out of 18 items with examples
  • Size
  • Source code size: 19.05 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 456.01 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • jfcode4/jdate
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jfcode4

jdate

This is my attempt at writing a Jewish calendar converter in Rust. This was inspired by the hebcal project.

Features

  • Convert a gregorian date to a Jewish date
  • Convert a jewish date to a gregorian date
  • Calculate the molad of the start of a year

Example

use jdate::JDate;
use time::Date;

fn main() {
    // Convert a Gregorian date to a Jewish date
    let date1 = jdate::gdate(2025, 1, 1).unwrap();
    let date2 = JDate::from(date1);
    println!("{date2}"); // prints: 5785-Tevet-01
                         //
    // Convert a Jewish date to a Gregorian date
    let date1 = JDate::new(5785, 1, 1).unwrap();
    let date2 = Date::from(date1);
    println!("{date2}"); // prints: 2025-03-30

    // Convert today's date
    let today = jdate::today();
    let today_jdate = JDate::from(today);
    println!("Today is {today} = {today_jdate}");
}