So, ist it pronounced jiff or gif?
Jiff: Datetime library for Rust
111–120 of 249 posts
Re: Jiff: Datetime library for Rust
#112Earlier quoted context omitted.
I remember getting into a debate with him on Reddit about something or other and then realizing who I was debating with and saying never mind.
That shouldn't stop you from settling an argument (given it was respectful). The best way to learn is to be wronged by smarter people.
Re: Jiff: Datetime library for Rust
#113Earlier quoted context omitted.
It's implied. Here is the full syntax. > let time: Timestamp = "2024-07-11T01:14:00Z".parse:: ()?;
That :: thing at the end is called a turbofish. It is rarely necessary to give it explicitly (but sometimes you do when the compiler cannot infer the return type on its own—thusfar in my own rust coding I’ve needed it exactly once).
Re: Jiff: Datetime library for Rust
#114Re: Jiff: Datetime library for Rust
#115For anyone having that thought, try reading through the design document of Jiff (https://github.com/BurntSushi/jiff/blob/master/DESIGN.md), which, as all things burntsushi do, is excellent and extensive. Another good read is the comparison with (mainly) chrono, the de facto standard datetime library in Rust: https://docs.rs/jiff/latest/jiff/_documentation/comparison/i...
Stuffs like DST arithmetic (that works across ser/de!), roundable duration, timezone aware calendar arithmetic, retrospective timezone conflict detection (!), etc. all contribute to a making the library correct, capable, and pleasant to use. In my experience, chrono is a very comprehensive and "correct" library, but it is also rigid and not very easy to use.
Re: Jiff: Datetime library for Rust
#116Re: Jiff: Datetime library for Rust
#117So, ist it pronounced jiff or gif?
https://github.com/BurntSushi/jiff/blob/master/DESIGN.md#why... > Jiff is pronounced like "gif" with a soft "g," as in "gem." Heh, I see what they did there…
Re: Jiff: Datetime library for Rust
#118While this does seem to be an improvement in general, I find it extremely disappointing that we now got another, greenfield, library that ignores leap seconds and continues the propagation of UNIXy time. I appreciate that it was at least informed decision, and seems to have been tough call to make. So full respect to burntsushi nevertheless. That makes it mostly uninteresting to me; nice api is nice to have, but I'd…
Leap seconds are being abolished. The current rotation speed of the earth is very close to 24h/day and is changing very slowly, so it is not very likely there will be another leap second before they are abolished.
Leap seconds are just to be replaced by a yet to be defined adjustment, likely leap minutes.
If you don't like leap seconds and don't care about a small (but increasing) deviation from Earth's angle you can do so today: Just use TAI.
Re: Jiff: Datetime library for Rust
#119This is interesting, in that Rust with Chrono is the best datetime experience I've had in any language.
Re: Jiff: Datetime library for Rust
#120While this does seem to be an improvement in general, I find it extremely disappointing that we now got another, greenfield, library that ignores leap seconds and continues the propagation of UNIXy time. I appreciate that it was at least informed decision, and seems to have been tough call to make. So full respect to burntsushi nevertheless. That makes it mostly uninteresting to me; nice api is nice to have, but I'd…
Can you also say why you need the precision? Like, what's the use case? What happens if your program computes durations that are off because of leap seconds?