> When should I use Jiff? Jiff isn’t always the right thing to use.
I really appreciate when a project calmly acknowledges that it's not the right tool for every use case, and is not trying to be. That's professional engineering.
Especially in the AI-age, the crucial skill will be what NOT to implement.
It’s so good like all the other burntsushi libs. Really hope it will be adopted more and more by the wider ecosystem over chrono and co.
This looks interesting!
Time is such a pain, I write code for simulating orbits of asteroids/stuff in the solar system, and time and time conversions play a major roll in it. I often need accuracy at the mega-year to giga-year scales, but also sometimes micro-second relative.
I saw on this page that you at least mention TAI time, how are you handling time scales in general? Like would it be hard to add some other timescales like UT1?
Right now I have to do all of this manually and I have been using chrono as just a convenience wrapper so that my users can convert ISO time strings into my internal representation.
Edit: Oh no! I just found out chrono is being semi-deprecated, looks like I'm going to be switching...
I will give this a shot, however... Rust is the only language I've used where I want to use the established one, chrono. I will roll my own in JS, for example, or begrudgingly use or wrap the python.datetime one (And not touch the third party python ones which do awful things inspired by Moment.js like conflating dates , times, and datetimes, under the guise dates and times don't have use on their own), but Chrono actually is comparatively nice (S-tier relative to others), both std and no_std.
Jiff is very nice to work with. It is always a pleasure working with something crafted by burntsushi
Nice! I appreciated the documentation for tzdb on avoiding embedding and the thought process behind using "rearguard" data [1]. Some related GitHub issues are also worth reading [2] [3].
[1] https://docs.rs/jiff-tzdb/latest/jiff_tzdb/#data-generation
Previously on HN (pre-1.0): https://news.ycombinator.com/item?id=41031037
Jiff will probably be the default datetime library for a lot of Rustaceans (and LLMs) in the years to come.
Thank you for your work on this burntsushi!
I would have expected a modern language to have an extensive datetime library in its standard library
My favourite part about BurntSushi software was that the structure of the program was enough that even a novice at the language could change things. Very well laid out. I had a fork of many of his applications for personal use and it was always trivial to jump in and edit. Excellent stuff.
> Jiff is pronounced like “gif” with a soft “g,” as in “gem.”
This is classic anti-trust monopoly leveraging. Lucky I'm on this side of the debate :)
> Jiff is pronounced like “gif” with a soft “g,” as in “gem.”
Woah now, let's not get too controversial.
> Jiff is pronounced like “gif” with a soft “g,” as in “gem.”
A masterclass in viral outrage bait. Not a Rustacean, I clicked the link exclusively for this nugget and will probably tell my Rust-loving colleagues about it tomorrow.
For the record, I like the converse better:
> Jiff is pronounced with a hard “g”, as in “gif”.
I thought it's the right moment to finally do something with Rust, but I work on my "J" pronunciation first
Love seeing the correct pronunciation of gif
IME time is one of those things that a lot of developers try to wish away the complexity. The hard part is defining what you even mean by time, but if nobody asks the question then you don't have to provide an answer.
Strings are also similarly gnarly topic that I find a lot of devs try to ignore.
the jiff pronunciation meta got my brain working hard for second. love it
Weird, you can't ever pronounce Jiff as gif.
[dead]
I maintained chrono for about half a decade, and the specific reason I took on maintenance was because the API sucked and I hoped I could make it better.
Turns out, the reason people wanted to use it was because the API was stable and every slight step towards improvement was met with... resistance. I stopped maintaining it because the burnout from seeing what it could be and not seeing any path to get there was too much for me.
I'm extremely grateful to burntsushi for writing the datetime library rust deserves. Chrono is stable and is maintained (though semi-deprecated) by an extremely reliable rustacean -- you don't need to leave, but you'll probably be happier if you do.