HTML date format and Date.parse()

Anne van Kesteren annevk at annevk.nl
Wed Apr 23 13:57:13 PDT 2014


On Wed, May 1, 2013 at 5:45 PM, Jason Orendorff
<jason.orendorff at gmail.com> wrote:
> On Tue, Apr 30, 2013 at 4:34 PM, Allen Wirfs-Brock
> <allen at wirfs-brock.com> wrote:
>> ES6 annex B is the appropriate place to define browser host web reality
>> extensions  to Date.parse.
>
> I'm proposing a one-line change to 15.9.1.15 (allow a space in place
> of 'T') and an equally minor change to 15.9.1.15.1 (extended years),
> plus a sentence or two of rationale. The proposal has nothing to do
> with the unspecified legacy formats.
>
> I agree it'd be nice to get the intersection of those formats
> documented, but it's a tangent.
>
>> For that reason, it would probably be better to define "static" methods for
>> parsing specific formats. For example,
>> Date.parseHTMLDate(str) //only recognizes whatever HTML defines
>
> The reason I propose changing 15.9.1.15 is to have one *less* thing to
> remember. To unify, since we actually have an opportunity to do that
> here, for once!
>
> Why is it important to have Date.parse("2013-01-01 10:30Z") return NaN?

Can we please reconsider this? Getting HTML and ES more aligned would
be *so* nice :-)


-- 
http://annevankesteren.nl/


More information about the es-discuss mailing list