Crate leap

Crate leap 

Source
Expand description

§leap

Proleptic Gregorian calendar date library with leap year support.

§Features

  • Date validation and construction
  • Day of week calculation
  • Leap year handling
  • Date arithmetic (plus one day/week)

§Usage

use leap::Date;

let date = Date::from_ymd(2024, 2, 29).unwrap();
assert!(date.is_leap_day());
println!("{}", date.day_of_week()); // Thursday

Modules§

week

Structs§

Date
Proleptic Gregorian calendar date.

Enums§

Error

Type Aliases§

Result