stepping on toes with toISOString
bedney at technicalpursuit.com
Fri Jul 17 14:20:47 PDT 2009
Here's a link to ISO 8601:2004(E):
"The character [T] shall be used as time designator to indicate the
start of the representation of the time of day
component in these expressions."
this is then followed by:
"NOTE By mutual agreement of the partners in information interchange,
the character [T] may be omitted in
applications where there is no risk of confusing a date and time of
day representation with others defined in this
In addition I found IETF RFC3339:
"NOTE: ISO 8601 defines date and time separated by "T".
Applications using this syntax may choose, for the sake of
readability, to specify a full-date and full-time separated by
(say) a space character."
So this leaves us in a bit of a bind. The 'out' for the 'T' provided
in the ISO8601 spec says that 'by mutual agreement of the partners in
information interchange'... (the T can be omitted).
Unfortunately, I think that's impossible given the nature of the Web.
I could produce an 8601 date without the 'T' in JS, but then transmit
it to any one of hundreds of thousands of servers that are running
software that expects it. There is no way to have 'mutual agreement'
amongst a potentially infinite set of folks using ISO8601.
Therefore, unfortunately (because I agree with David about readability
and would like to be able to +1 this), I have to give this a -1 and
recommend that we go with the spec 'conservatively' and enforce the 'T'.
On Jul 16, 2009, at 11:17 PM, David-Sarah Hopwood wrote:
> Allen Wirfs-Brock wrote:
>> Also if Stockton is correct that the T is now optional in the ISO
>> standard, I'd suggest making it optional in ES a well. Or, if
>> is too much trouble, forbidding T and requiring a space instead. A
>> small change, but the timestamps are so much nicer without the T!
>> it would be a shame for ES to get stuck with the T while ISO and
>> everyone who uses it moves away from the T.
> +1. With a space instead of the T, the format is actually reasonably
> pleasant to read.
> David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss