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

Document string-parsing FAQ in the string-parsing docs page #2046

Closed
justingrant opened this issue Feb 8, 2022 · 0 comments · Fixed by #2059
Closed

Document string-parsing FAQ in the string-parsing docs page #2046

justingrant opened this issue Feb 8, 2022 · 0 comments · Fixed by #2059
Labels
documentation Additions to documentation no-spec-text PR can be ignored by implementors

Comments

@justingrant
Copy link
Collaborator

justingrant commented Feb 8, 2022

In js-temporal/temporal-polyfill#133, I answered what have been common questions around Temporal's string parsing. At some point, we should probably add a FAQ to the existing docs page about the string format: https://tc39.es/proposal-temporal/docs/iso-string-ext.html. Here's some questions that could go there, most of which are answered in js-temporal/temporal-polyfill#133.

  • What's the right Temporal type to use for parsing a particular string?
  • Why is Temporal.PlainDateTime usually the wrong type to use for string parsing, and what type should I use instead?
  • When should I use toString vs. toLocaleString when converting Temporal types to a string?
  • Why is a bracketed time zone annotation required for ZonedDateTime.from?
  • Why can't I parse a UTC "Z" string using Temporal.PlainXxx types?
  • In the unusual case where I want to get the calendar/clock units from a UTC "Z" string, how can I do that?
  • What industry standards apply to the string formats that Temporal uses?
  • When and how will Temporal's string extensions be standardized?
  • How do Temporal string serialization formats relate to those used by other platforms and libraries?
  • Why doesn't Temporal support parsing localized formats like MM/DD/YY?

While we're there, we should probably update that page to discuss the IETF standardization work and downplay ISO because we're not planning to standardize with ISO at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Additions to documentation no-spec-text PR can be ignored by implementors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant