use-weekday 0.0.1

Primitive weekday helpers
Documentation
  • Coverage
  • 5.56%
    1 out of 18 items documented1 out of 10 items with examples
  • Size
  • Source code size: 5.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 384.14 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-calendar
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

Primitive weekday helpers.

The helpers here compute weekdays deterministically from Gregorian dates.

Examples

use use_weekday::{Weekday, is_weekend, weekday_for_date};

let weekday = weekday_for_date(2024, 5, 17).unwrap();

assert_eq!(weekday, Weekday::Friday);
assert_eq!(weekday.number_from_monday(), 5);
assert!(!is_weekend(weekday));