datetime-rs
proposal-temporal-v2
datetime-rs | proposal-temporal-v2 | |
---|---|---|
1 | 1 | |
25 | 19 | |
- | - | |
0.0 | 0.0 | |
almost 10 years ago | about 3 years ago | |
Rust | HTML | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
datetime-rs
-
You don't (may not) need Moment.js
Yep! Most examples in the Rust cookbook[0] uses chrono[1].
But note that before Chrono there were other time libraries; one of them was called time[2] - 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.h...
[1] https://crates.io/crates/chrono
[2] https://crates.io/crates/time
[3] https://github.com/depp/datetime-rs
proposal-temporal-v2
-
You don't (may not) need Moment.js
Yes, it's always been possible to get some kind of string from datetimes, but I specifically care about specifying what string, same with parsing. "Just use a locale's default" might work if you're making a web app for clients who aren't picky, but using JS as a "serious" language it's a really big hole. There's plenty of formats that demand non-ISO date formats and I currently need to use a third-party library. I've gotten used to than in JS, but I was hoping a new take on dates will sort this out. Oh well, I'll have to just hope it makes it to v2: https://github.com/js-temporal/proposal-temporal-v2.
What are some alternatives?
You-Dont-Need-Momentjs - List of functions which you can use to replace moment.js + ESLint Plugin
Sherlock - Natural-language event parser for Javascript
js-joda - :clock2: Immutable date and time library for javascript
ngx-moment - moment.js pipes for Angular
dayjs - ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
vo
import-maps - How to control the behavior of JavaScript imports