-
Notifications
You must be signed in to change notification settings - Fork 4
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
Temporal types, nit picking #32
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've mostly finished my implementation of the CE temporal types, and there are a number of points where the spec seemed ambiguous, so I used the empirical behavior of
enctool
to decide what to do, or just picked something.For location time zones:
The first value is latitude with positive=north, and the second value is longitude with positive=east (based on one of the examples). In general, technical specs aren't consistent about the order of these two values, so I wouldn't assume readers would pick the same order. There's at least one place where CE says "longitude/latitude".
The
+
character is not allowed. That's consistent with other parts of CTE, but never specified here.Leading
0
s are allowed, but the max digits are 2.2/3.2, e.g.,1/1
or01/001
is OK but00001/00001
is not.The
.
is optional, for each value, but if it's present, at least one digit must follow, e.g.,0./0.
is invalid.The Compact Time (i.e., CBE) spec says:
Since temporal types can be map keys, this would seem to suggest that any conforming CE decoder must have a complete map of the time zones of the world, accurate to 0.01°. Nope! Maybe I'll let the user provide their own equality function, or return every map as a multi-map and let the user sort it out.
For named time zones:
enctool
seems stricter than the strictest interpretation of this, but more lenient than the most lenient interpretation. I'm using: "all ASCII", "all graphical characters", "length is 1-127" (before abbreviating), "doesn't start with [+
-
0
-9
]", which seems to work well enough for all the examples, and all the reasonable cases I could think of.For offset time zones:
enctool
already enforces it for CTE.For times:
.
, at least one digit is required to follow. This wasn't entirely clear to me from the table (Mandatory = N, Min Digits = 0).The text was updated successfully, but these errors were encountered: