|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: stepping on toes with toISOStringAllen -
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@... > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list es-discuss@... https://mail.mozilla.org/listinfo/es-discuss |
|
|
RE: stepping on toes with toISOStringArguably, 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@... [mailto:es-discuss- >bounces@...] On Behalf Of William Edney >Sent: Friday, July 17, 2009 2:21 PM >To: David-Sarah Hopwood >Cc: es-discuss@... >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@... >> https://mail.mozilla.org/listinfo/es-discuss > >_______________________________________________ >es-discuss mailing list >es-discuss@... >https://mail.mozilla.org/listinfo/es-discuss es-discuss mailing list es-discuss@... https://mail.mozilla.org/listinfo/es-discuss |
|
|
Re: stepping on toes with toISOStringJust a random comment from someone outside.
I saw one library at one point which which rather than picking, just picked a default and used a `strict` parameter which would allow someone to pass true or false to chose "T" or " "; Also rather than just toISOString it supported .toISOTimeString, .toISODateString and a .toISOString which was based on it. When I came up with prototypes to add for MonkeyScript (still just drafting) I followed that same idea: http://draft.monkeyscript.org/api/_std/Date.html ((Of course, I'll modify the MonkeyScript drafts to comply with anything standardized for ES5)) ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] Allen Wirfs-Brock wrote: > 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@... [mailto:es-discuss- >> bounces@...] On Behalf Of William Edney >> Sent: Friday, July 17, 2009 2:21 PM >> To: David-Sarah Hopwood >> Cc: es-discuss@... >> 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@... >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> _______________________________________________ >> es-discuss mailing list >> es-discuss@... >> https://mail.mozilla.org/listinfo/es-discuss >> > _______________________________________________ > es-discuss mailing list > es-discuss@... > https://mail.mozilla.org/listinfo/es-discuss > -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] _______________________________________________ es-discuss mailing list es-discuss@... https://mail.mozilla.org/listinfo/es-discuss |
| Free embeddable forum powered by Nabble | Forum Help |