Function dow::dow [] [src]

pub fn dow(y: usize, m: usize, d: usize) -> usize

Return the index of the day for which the given date corresponds to.

Arguments

  • y: Year
  • m: Month
  • d: Day

Example

extern crate dow;

let day_index = dow::dow(2017, 7, 2);
assert_eq!(day_index, 0); // 2017/07/02 is a Sunday

Note

Sunday is 0, Monday is 1 etc.