You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a good idea. My experience with chrono and time are limited because I have not had the use for them for years, relying only on hifitime.
Off the cuff, I would say that hifitime is more feature complete and more correct: like chrono and time, it can parse date times with and without time zones, but hifitime also handle time systems (thereby supporting specific cases of time dilation). Hifitime also has the concept of Duration exposed to users, allowing for stuff like Epoch::now() + Unit.Hours * 2.3, as well as [rounding to the nearest unit]https://docs.rs/hifitime/latest/hifitime/prelude/struct.Epoch.html#method.round) , or floor and ceil.
Hifitime also provides time based iterations with TimeSeries: that's very convenient when building interpolations or just ensuring that you're computing some function at a set interval without fears of f64 rounding your data.
The main possible limitation I have in mind is that I think chrono has a way to format epoch so they can be understood by database natively: I don't suspect that to be too difficult, but I haven't looked into it. The chrono-tz crate also allows parsing with named time zones (but not serializing with those named time zones): hifitime cannot do that.
Somewhat of another limitation is that chrono and time (I think) support time-only stuff: you can't do that with hifitime, you must specify a year, month, and day. But you can set an Epoch's time using with_hms and with_hms_strict, or copy it from another Epoch with_hms_from.
Overall then, hifitime is more precise, has more features that most users need, and can be used for scientific applications.
Hi! Thanks for the crate!
Would you consider adding a comparison with the popular
time
andchrono
crates?The text was updated successfully, but these errors were encountered: