HijriDate-rs

Released API docs

Convert between hijri and gregorian date. (with wasm target)

Limits

The algorithm used has the following limits:

| | Minimum | Maximum | |-----------|---------|---------| | Hijri | 1356 | 1499 | | Gregorian | 1938 | 2076 |

Minimum Rust version

From version 0.4.0 and onwards the MSRV is 1.51

Usage

Conversion

Comparison

```rust use hijri_date::HijriDate;

let hd1 = HijriDate::fromhijri(1500, 12, 30); let hd2 = HijriDate::fromhijri(1356, 1, 1); assert!(hd1 > hd2); ```

Misc

Formatting

``` hijri

%Y hijriyear %m hijrimonth %d hijriday %D hijridayname %M hijrimonthname %l hijrimonth_len

gregorian

%gY gregorianyear %gm gregorianmonth %gd gregorianday %gD gregoriandayname %gM gregorianmonth_name ```

Wasm

To compile to Wasm run:

cargo build --release --target wasm32-unknown-unknown

Deno bindings are exposed at deno

Credits

I translated Tytkal's Python library to Rust.

Chrono