This is a crate supporting relative date calculations for Chrono's [NaiveDate], most notably only Gregorian dates.
```rust use chrono::prelude::; use date_calculations::;
let twentytwentyone = NaiveDate::fromymdopt(2021, 1, 31).unwrap();
asserteq!(nextyear(&twentytwentyone).unwrap().year(), 2022); asserteq!(nextyear(&twentytwentyone).unwrap().month(), 1); asserteq!(nextyear(&twentytwentyone).unwrap().day(), 1);
asserteq!(previousquarter(&twentytwentyone).unwrap().year(), 2020); asserteq!(previousquarter(&twentytwentyone).unwrap().month(), 10); asserteq!(previousquarter(&twentytwentyone).unwrap().day(), 1); ```
Copyright 2020 Josh Clayton. See the LICENSE.