-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add more datetime crates #151
base: main
Are you sure you want to change the base?
Conversation
still unsure whether to add and tbh, most people who need that functionality will look up "how to parse human friendly time format chrono" and make the choice anyways |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good set of additions, thanks!
This might be controversial, but reading through https://github.com/BurntSushi/jiff/blob/master/COMPARE.md and BurntSushi/jiff#63, I think I'd be inclined to recommend Dealing with timezones properly is a super important aspect of a date/time library, and it seems that only Combine that with:
And it seems like the best pick? It's less popular, but if we were just basing things on download count this site would be pointless (people could just sort by downloads on crates.io or lib.rs). That said, I still think there's not a clear winner here. And our aim should be to work out when each library might be most appropriate. And/or what sort of user might want to use each (e.g. prioritising correctness vs nice API vs performance vs binary size). And ideally communicate all of that information to readers of blessed.rs |
(Noting somewhat of a conflict of interest here: I am the chrono maintainer right now -- although maintenance is pretty passive currently and I mostly started because no one else was taking care of it.) Making jiff the recommended/first option in the primary list makes sense to me, although I think due to their popularity we should also keep chrono and time there. |
Agree that |
One of the major benefits of |
data/crates.json
Outdated
"see_also": [{ | ||
"name": "jiff", | ||
"link": "https://crates.io/crates/jiff", | ||
"notes": "A relatively new general-purpose datetime library that aims to address some of the pain points with time and chrono." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I used this style of description (described in terms of other projects) with ripgrep when it was released ("it's like grep and ag") and I kinda regret it. Consider that if you're looking at this list for crate recommendations, you probably don't already know about time
and chrono
. And so describing Jiff, in brief, with what it isn't, probably doesn't help too much. On the other hand, there really isn't the space here (as is intended) to do even a concise cost/benefit analysis.
It is very hard to do this in one sentence, but here's my crack at it:
A datetime library with automatic tzdb integration and convenient daylight saving time calendar arithmetic, but currently lacks some of the ecosystem integration that
time
andchrono
have.
Oh wow, to back this up, |
I suspect the difference would be less pronounced for currently maintained/recent crates, but definitely a decent reason to keep chrono/time on the list. |
True, it does seem like the best pick for new projects. ...I'm thinking the extra cruft can be moved into the notes, so it looks something like: jiff is the best option if you're starting a new project, but it currently lacks some of the ecosystem integration that time and chrono have. jiff time [docs] chrono [docs] icu_datetime [docs] hifitime [docs] |
Also, would it make sense to add a "docs" value in the json so that crates that have an external link (e.g. to route away from lib.rs or because they're not on crates.io) but still have documentation somewhere could have a docs button? jiff and temporal are affected by the lib.rs thing,,,but then the libraries/tools that get linked to GitHub (e.g. nextest), miss out on documentation even though they do have them (e.g. here) Could make it a separate PR if that makes sense |
I don't agree with these relative characterizations. It feels to me like time and chrono have a pretty similar scope, but chrono maintains a relatively conservative MSRV, isn't split across as many utility crates, and is pretty boring/straightforward. On the other hand, many time versions broke when 1.80 was released due to what I perceive as heavier reliance on subtleties of the language/compiler. (time has unconditional dependencies on deranged, num-conv, powerfmt and time-core -- all from the same maintainer. chrono only depends on num-traits by default.) |
I remember that happening, and tbh, it kinda sounded like the internal team did a crater run, saw that stuff would break and went "well there's a newer version of time out that uses the correct annotations, they'll all update", like I don't think it was time's fault for using "subtleties of the compiler" (it was just an And hm, I guess you're right about the relative characterisations...those were written a long time ago and haven't really been changed...especially with the whole time 0.2 thing (reading the chrono docs page lol) Thinking of pinging jhpratt to see what he has to say about things, though he already commented in chronotope/chrono#1423 so I'll give that a read and try and come up with different sentences. |
I think given that we have Chrono and Jiff maintainers discussing things here, the right thing to do is to ping @jhpratt. I'll also ping @ChristopherRabotin as the maintainer of And @sffc for a point of contact for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The icu_datetime
description looks about right; thanks!
While no reasonable person would dispute his reputation, I will point out maintainers of all three crates are permitted to merge (certain types of) code into the Rust project itself.
Asking sincerely — where are you getting this from? While mistakes have certainly been made with regard to API design, they are largely being rectified. I have a private list of changes that I have considered or are planning to make in the future. I wouldn't be surprised if
Agreed. My suspicion is that the "simpler, smaller" bit is a remnant from
Eh, that's hardly my fault. I had
While true, all of these crates either originated in
For the record, I was contacted off-GitHub to be made aware of this thread 🙂 Overall, I'm not opposed to this change as it improves on the status quo by including additional crates. With that said, updating the language for existing crates probably isn't a bad idea. |
jiff is the best option if you're starting a new project... jiff [docs] time [docs] chrono [docs] Removed the "smaller simpler" bit in Then emphasised |
I would drop "more comprehensive" from chrono's description personally. That might have made sense in a comparison with just |
|
closes #150