calendarize

Crates.iocalendarize
lib.rscalendarize
version1.1.0
sourcesrc
created_at2021-02-09 12:30:37.154962
updated_at2021-04-12 19:02:01.774894
descriptioncalendarize a month
homepage
repositoryhttps://github.com/sadnessOjisan/calendarize
max_upload_size
id352728
size10,696
sadnessOjisan (sadnessOjisan)

documentation

README

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.

Commit count: 12

cargo fmt