Skip to content
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

Open
infinity0 opened this issue Dec 19, 2018 · 7 comments
Open

Switch from iso8601 to chrono #23

infinity0 opened this issue Dec 19, 2018 · 7 comments

Comments

@infinity0
Copy link

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.

@hoodie
Copy link
Contributor

hoodie commented Dec 20, 2018

how does iso8601 "behave magical"? it's a very small crate that is intended to one format and nothing else.

@infinity0
Copy link
Author

@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.

@hoodie
Copy link
Contributor

hoodie commented Dec 27, 2018

That sounds like a valid issue to report to the iso8601 crate

@hoodie
Copy link
Contributor

hoodie commented Nov 11, 2019

short answer: rfc3339 makes the punctuation mandatory for simplicity sake while in ISO8601 it is [optional](https://en.wikipedia.org/wiki/ISO_8601#Dates]

@marvin-hansen
Copy link

marvin-hansen commented Jan 2, 2025

iso8601 and the underlying nom crate are reported by cargo as not compatible with the upcoming Rust 2024 edition.

Just run:
cargo report future-incompatibilities --id 1

for details. In a nutshell, there are two ways to go about:

  1. Update iso8601 to the latest version and see if that does the trick
  2. Think about an adequate replacement.

Given that the 2024 edition is scheduled for Feb this year, I suggest to resolve this rather early before incompatibilities reports pour in.

@hoodie
Copy link
Contributor

hoodie commented Jan 2, 2025

ah thanks for letting us know, I'll take a look at iso8601

@hoodie
Copy link
Contributor

hoodie commented Jan 2, 2025

it says error: no reports are currently available. anything I missed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants