-
Notifications
You must be signed in to change notification settings - Fork 185
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 Sedate IXDTF (extended ISO) string parsing function #2127
Comments
Note: currently we have https://unicode-org.github.io/icu4x-docs/doc/icu_datetime/mock/fn.parse_gregorian_from_str.html We should start with a design doc for this. We likely want to end up with a parser type named something like |
Question: do we want to have specific, stricter parsers for each individual type, as well as the fully-featured one conforming to IETF Sedate? |
We need to design how the parser will be architected so that it can be easily implemented. Discuss with: Optional: |
Do we want to leverage an existing implementation, such as the |
Hi! FWIW, we have an initial parsing implementation in |
Open to doing so with a Cargo feature. Though I think this is the kind of thing that is okay for us to expose if we wish. |
I think a SEDATE parser should be its own crate. Maybe it lives in our repo, maybe in the temporal_rs repo, maybe but maybe not in the time or chrono repo. |
I changed the title of this issue to emphasize that we're talking about IXDTF, which is not functionality I'm aware of in Rust except for temporal_rs mentioned above. |
Just to expand on my above comment. From what I can tell after reading through the IETF doc, I think the parser in I'm pretty neutral on whether the functionality lives in For reference, here are all the tests for that parser. |
Thanks for the reference! Looking over that code, it seems to be well-written and suitable as a dependency of the icu4x project. I think it would be worthwhile pulling this code into an |
Sounds good. I'll move the code over to the directory. update it with the above comments., and submit a PR |
Discussion: after @nekevss's PR is landed, we will add LGTM: @sffc @Manishearth @robertbastian |
#4646 basically fixes this issue but there were some minor follow-ups. I'm re-opening this issue to track that, or we can move those to another issue and re-close this one. |
I can definitely work on the follow ups for the |
Schedule release review for the IXDTF crateStart: 11:01 Options:
Discussion:
|
Checklist:
|
Plan: 1a. @sffc to finish the IXDTF checklist. |
Note from #5260: |
What is missing here? |
Graduation of the I think we're pretty much done with the general ICU4X datetime parsing functions now! |
We should add a function that parses ISO-8601 strings. We should follow the Temporal grammar:
https://tc39.es/proposal-temporal/#sec-temporal-iso8601grammar
i.e., we should implement a string parser conforming to IETF Sedate that parses a string into its components (date, time, time zone, calendar), and use this parser in APIs and anywhere else we parse date strings. Think about where to put this code in the crate structure.
We should start with the DateTime production, and work our way up towards CalendarDateTime and TemporalZonedDateTimeString.
Examples of strings that are accepted as part of the DateTime grammar:
2022-06-27T16:31:00.000
2022-06-27t16:31:00.000
2022-06-27 16:31:00.000
20220627 16:31:00.000
20220627 163100.000
20220627 163100
20220627 1631
The text was updated successfully, but these errors were encountered: