Fusuma

Components / Date and time

weekday

The day of the week of a date, 0 for Monday to 6 for Sunday (Sakamoto's method, for the Gregorian calendar).

The day of the week of a date, 0 for Monday to 6 for Sunday (Sakamoto's method, for the Gregorian calendar).

Signature

pub const fn weekday(year: i32, month: u8, day: u8) -> u8

Example

use fusuma::weekday;
// 1 January 2000 was a Saturday.
assert_eq!(weekday(2000, 1, 1), 5);
assert_eq!(weekday(2024, 2, 29), 3);

All components · Source