5 releases (3 stable)

1.1.0 Apr 12, 2021
1.0.1 Mar 22, 2021
1.0.0 Feb 9, 2021
0.0.2 Feb 9, 2021
0.0.1 Feb 9, 2021

#362 in Date and time

Download history 6/week @ 2024-07-21 12/week @ 2024-07-28 6/week @ 2024-08-04 6/week @ 2024-08-11 1/week @ 2024-08-18 15/week @ 2024-09-01 15/week @ 2024-09-08 11/week @ 2024-09-15 31/week @ 2024-09-22 43/week @ 2024-09-29 6/week @ 2024-10-06 19/week @ 2024-10-13 5/week @ 2024-10-20 11/week @ 2024-10-27 25/week @ 2024-11-03

60 downloads per month
Used in yew-datepicker

MIT license

9KB
158 lines

calendarize

calendarize at crates.io calendarize at docs.rs

Just calendarize. This is inspired from Node.js calendarize.

how to use

let date = NaiveDate::parse_from_str("2021-01-02", "%Y-%m-%d").unwrap();
calendarize(date);

// [0, 0, 0, 0, 0, 1, 2],
// [3, 4, 5, 6, 7, 8, 9],
// [10, 11, 12, 13, 14, 15, 16],
// [17, 18, 19, 20, 21, 22, 23],
// [24, 25, 26, 27, 28, 29, 30],
// [31, 0, 0, 0, 0, 0, 0]

development

setup

cargo install

exec

# exec
cargo test

publish

Before publish, get a crates.io token.

cargo publish

or tag to commit.

Dependencies

~1MB
~18K SLoC