-
Notifications
You must be signed in to change notification settings - Fork 9
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
Switch from iso8601 to chrono #23
Comments
how does iso8601 "behave magical"? it's a very small crate that is intended to one format and nothing else. |
@hoodie it's not actually "intended to one format", see the "autodetect the format" link I posted above. The stuff it tries to parse is a random format specific to that crate, and not an internationally-defined standard like iso8601. |
That sounds like a valid issue to report to the iso8601 crate |
short answer: rfc3339 makes the punctuation mandatory for simplicity sake while in ISO8601 it is [optional](https://en.wikipedia.org/wiki/ISO_8601#Dates] |
iso8601 and the underlying nom crate are reported by cargo as not compatible with the upcoming Rust 2024 edition. Just run: for details. In a nutshell, there are two ways to go about:
Given that the 2024 edition is scheduled for Feb this year, I suggest to resolve this rather early before incompatibilities reports pour in. |
ah thanks for letting us know, I'll take a look at iso8601 |
it says |
It looks like the iso8601 crate is no longer actively maintained: badboy/iso8601#19
It would be good to switch to the chrono crate. This will help reduce the amount of unmaintained code floating around.
The major difference is that iso8601 has more flexible parsing (it tries to autodetect the format), whereas chrono wants you to specify the format up-front.
Arguably iso8601's "magic behaviour" of parsing is potentially surprising and not such a great thing anyways, but if really needed one could maybe implement it using chrono's primitives.
The text was updated successfully, but these errors were encountered: