this post was submitted on 17 Feb 2025
28 points (96.7% liked)

Rust

6459 readers
56 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
28
submitted 2 weeks ago* (last edited 2 weeks ago) by snaggen to c/rust
 

It seems like @[email protected] have added some optimizations to the Jiff date time library... so now it should generally be faster than 'chrono' and 'time'. Jiff is quite impressive, the 0.2.1 version number really doen't reflect its quality.

you are viewing a single comment's thread
view the rest of the comments
[–] FizzyOrange 6 points 2 weeks ago (2 children)

Ah I didn't know about this. I've been fighting chrono (and the concept of time in general) trying to parse an iCal file to show a week of events... which you'd think would be easy, but it's super complicated. Maybe this will make it a little easier.

[–] snaggen 7 points 2 weeks ago (1 children)

And yes, date time handling is one of the most confusing areas on computer science. https://xkcd.com/2867/

[–] FizzyOrange 1 points 2 weeks ago

Ha that's great and accurate!

[–] snaggen 6 points 2 weeks ago

I personally think Jiff is based on a very solid design, as it is inspired by Temporal, which is a TC39 proposal to improve datetime handling in JavaScript. I have done some date time handling with chrono, but I find jiff much easier to work with. So, I can recommend you take a serious look, and see if it makes your life easier for your use case. Now, it is only version 0.2, so the API might change before 1.0, but it seems to respect semver, so there shouldn't be any surprise breakage at least.