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

LDML "ZZZZZ" doesn't support "Z" #58

Open
kengruven opened this issue Feb 15, 2024 · 0 comments
Open

LDML "ZZZZZ" doesn't support "Z" #58

kengruven opened this issue Feb 15, 2024 · 0 comments

Comments

@kengruven
Copy link

(Maybe this is nit-picking, but I ran into it yesterday and it frustrated me for a while.)

In the TR35 Date Field Symbol Table, "Z" with No=5 is described as:

The ISO8601 extended format with hours, minutes and optional seconds fields. The ISO8601 UTC indicator "Z" is used when local time offset is 0. This is equivalent to the "XXXXX" specifier.

Elsewhere in this document, in the examples after the sentence "For ISO 8601 time zone format return the results according to the ISO 8601 specification.", it has:

  • Etc/GMT ->
    • "Z" ("ZZZZZ", "X", "XX", "XXX", "XXXX", "XXXXX")

supporting the idea that "ZZZZZ" should support Z.

In gregor, though, it does not:

(~t (moment 2001 2 3 4 5 6 #:tz 0) "XXXXX")
;; =>
"Z"

(~t (moment 2001 2 3 4 5 6 #:tz 0) "ZZZZZ")
;; =>
"+00:00"

I tried to find another implementation of TR35 to confirm, and ran across NSDateFormatter.com. Both "XXXXX" and "ZZZZZ" here generate the output "Z", while "xxxxx" generates "+00:00", as expected.

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