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

Rust

6502 readers
8 users here now

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

Wormhole

!performance@programming.dev

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
 

It seems like @burntsushi@programming.dev 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.

top 4 comments
sorted by: hot top controversial new old
[–] FizzyOrange@programming.dev 6 points 3 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@programming.dev 6 points 3 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.

[–] snaggen@programming.dev 6 points 3 weeks ago (1 children)

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

[–] FizzyOrange@programming.dev 1 points 3 weeks ago

Ha that's great and accurate!