This would also imply that (new Date(NaN).toJSON()) also throws. Is everybody fine with that??
Allen >-----Original Message----- >From: Brendan Eich [mailto:[email protected]] >Sent: Wednesday, June 10, 2009 9:42 AM >To: Allen Wirfs-Brock >Cc: John Cowan; Adam Peller; [email protected]; es5- >[email protected] >Subject: Re: Date.prototype.toISOString and Invalid Date > >On Jun 10, 2009, at 8:48 AM, Allen Wirfs-Brock wrote: > >> I believe that support for ISO dates in ES5 is intended to provide a >> standard interchange format for dates, not for providing a locale >> customized format for human consumption. Since ISO 8601 apparently >> doesn't provide an encoding for "invalid date/time", arguably new >> Date(NaN).toISOString() should never be passed to someone expecting >> a valid ISO date. If that is true, then be best thing to do may be >> to specify that toISOString throws a RangeError when applied to such >> Date objects. > >+1, or more. > >/be > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

