stepping on toes with toISOString

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Fri Jul 17 16:08:30 PDT 2009


Arguably, the "mutual agreement" would be between Data.prototype.toISOString and Date.prototype.parse which are the only specified producers and consumers of this specific format. But I agree that it is probably better to require the "T".  If somebody wants a more readable timestamp it is easy enough for them to replace the "T" with a blank.

Allen

>-----Original Message-----
>From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
>bounces at mozilla.org] On Behalf Of William Edney
>Sent: Friday, July 17, 2009 2:21 PM
>To: David-Sarah Hopwood
>Cc: es-discuss at mozilla.org
>Subject: Re: stepping on toes with toISOString
>
>Allen -
>
>Here's a link to ISO 8601:2004(E):
>
>http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=
>doc.Fetch&nodeid=4021199
>
>Section 4.3.2:
>
>"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
>International Standard."
>
>
>In addition I found IETF RFC3339:
>
>http://tools.ietf.org/html/rfc3339
>
>Section 5.6
>
>"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'.
>
>Cheers,
>
>- Bill
>
>
>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
>>> optional
>>> is too much trouble, forbidding T and requiring a space instead.  A
>>> small change, but the timestamps are so much nicer without the T!
>>> And
>>> 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
>> https://mail.mozilla.org/listinfo/es-discuss
>
>_______________________________________________
>es-discuss mailing list
>es-discuss at mozilla.org
>https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list