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

Date parsing: consider referring to RFC 3339 rather than ISO 8601 #65

Open
JKingweb opened this issue Jul 14, 2023 · 0 comments
Open

Date parsing: consider referring to RFC 3339 rather than ISO 8601 #65

JKingweb opened this issue Jul 14, 2023 · 0 comments

Comments

@JKingweb
Copy link

JKingweb commented Jul 14, 2023

The Value Class Pattern date parsing rules make mention of ISO 8601, but this has some problems:

  • The text of ISO 8601 is not readily available
  • Whitespace and lowercase "t" are not allowed as separators for date and time in ISO 8601, but widely used in microformats
  • Technically ISO 8601 negative timezone offsets should use the mathematical minus sign character (U+2212) when possible, complicating parsing
  • Many of the formats in ISO 8601 are mentioned as acceptable in VCP parsing, but not all, leading to ambiguity
  • Some of the formats in ISO 8601 (those without separators) can be inditinguishable from numbers, which might be problematic
  • The -00:00 time zone offset is undefined
  • VCP parsing also accepts formats not in ISO 8601 (e.g. 12-hour clock)

RFC 3339, on the other hand:

  • Can actually be consulted freely
  • Has clearly defined semantics for all elements
  • Allows space and "t" as separators
  • Any desirable formats in ISO 8601 and not in RFC 3339 can be explicitly listed as acceptable along with the 12-hour clock
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

1 participant