Chrono Utils
Provides utility functions to manipulate chrono dates. Only NaiveDate is supported as of now. Support for naive and timezone aware DateTime coming soon.
The crate provides the following:
Transition APIs
Transition a chrono struct into a future or previous date using standardised methods
like start_of_pred_iso8601_week()
which provides the date on which the previous week
starts. Such functions are provided for week, month and year.
Feature Matrix
Feature | Status |
---|---|
Transition APIs for NaiveDate | ✓ |
Transition APIs for Aware Dates | 𐄂 |
Transition APIs for NaiveDateTime | 𐄂 |
Transition APIs for Aware DateTime | 𐄂 |
Code Sample
use NaiveDate;
use DateTransitions;
let d = from_ymd;
assert_eq!;
let d1 = from_ymd;
assert_eq!;
let d2 = from_ymd;
assert_eq!;
Licence
Dual licensed under Apache 2.0 and MIT. (Same as Rust and chrono.)