#week #no-std #sakamoto #day

no-std dow

Tomohiko Sakamoto’s algorithm for finding the day of the week

4 releases

Uses old Rust 2015

0.1.3 Apr 17, 2018
0.1.2 Jul 3, 2017
0.1.1 Jul 2, 2017
0.1.0 Jul 2, 2017

#89 in Date and time

MIT license


dow: Day of the Week

Return the day of the week a specific date falls on (uses Tomohiko Sakamoto's algorithm).

Build Status Docs Status On crates.io


Add this to your Cargo.toml:

dow = "0.1"

and this to your crate root:

extern crate dow;
use dow::Day;

and then you can use it as follows:

let day = dow::dow(2017, 7, 2);
assert_eq!(day, Day::Sunday);

No runtime deps