HijriDate-rs 0.1.3
Convert between hijri and gregorian date.
The algorithm used to convert between dates is limited to:
minimum handled hijri year = 1356
maximum handled hijri year = 1500
minimum handled gregorian year = 1938
maximum handled gregorian year = 2076
Usage
convert to gregorian
extern crate hijri_date;
use HijriDate;
let hd = from_hijri;
assert_eq!;
convert to hijri
extern crate hijri_date;
use HijriDate;
let hd = from_gr;
assert_eq!;
hijri day and month name
extern crate hijri_date;
use HijriDate;
let hd = from_hijri;
println!;
compare dates
extern crate hijri_date;
use HijriDate;
let hd_1 = from_hijri;
let hd_2 = from_hijri;
assert!;
substract duration from a day
extern crate hijri_date;
use ;
let hd_1 = from_hijri;
let hd_2 = from_hijri;
assert_eq!;
substract a day from an other to get a duration
extern crate hijri_date;
use ;
let hd_1 = from_hijri;
let hd_2 = from_hijri;
assert_eq!;
Credits
I translated the python version https://github.com/tytkal/python-hijiri-ummalqura to rust.
Original algorithm author
Suhail Alkowaileet
Python version author
Khalid Al-hussayen