Skip to main content

weekday

Function weekday 

pub fn weekday(days: i64) -> u32
Expand description

Day of the week for a count of days since 1970-01-01, 0 = Sunday … 6 = Saturday — the index crate::format::weekday_abbrev takes.

use tilo_ui::date::weekday;
assert_eq!(weekday(0), 4); // 1970-01-01 was a Thursday
assert_eq!(weekday(-1), 3);