2 ms·
Yep! Most examples in the Rust cookbook[0] use chrono[1]. But note that before Chrono there were other time libraries; one of them was called time[2] - and IIR
by nextaccountic 5y ago
Yep! Most examples in the Rust cookbook[0] use chrono[1].
But note that before Chrono there were other time libraries; one of them was called time[2] - and IIRC it was created from code removed from Rust's stdlib std::time[3]. It eventually proved to be the best decision: designing a good API is a hard effort, and any design was prone to have mistakes and warts.
Chrono provides interoperability with both std::time and the time crate. It acknowledges other datetime crates that it was inspired, like datetime-rs[3] which itself was inspired by Joda time.
[0] https://rust-lang-nursery.github.io/rust-cookbook/datetime.html https://rust-lang-nursery.github.io/rust-cookbook/datetime.h...
[1] https://crates.io/crates/chrono https://crates.io/crates/chrono
[2] https://crates.io/crates/time https://crates.io/crates/time
[3] https://github.com/depp/datetime-rs https://github.com/depp/datetime-rs