2 ms·
chrono is the defacto standard. As with all good modern datetime libs (see also Noda Time, the new java.time), it takes liberal inspiration from Joda Time, whic
by Macha 5y ago
chrono is the defacto standard. As with all good modern datetime libs (see also Noda Time, the new java.time), it takes liberal inspiration from Joda Time, which IMO has pretty much set the template for a robust datetime library.
- nextaccountic 5y agoYep! 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
- andyfleming 5y agoThere's an actual joda implementation as well. See https://www.npmjs.com/package/@js-joda/core https://www.npmjs.com/package/@js-joda/core