Date.parse and new Date() fail on valid formats - by ckozl

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 723740 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 2/6/2012 2:25:12 PM
Access Restriction Public

Description

console output:
>> Date.parse('2011-11-29T15:52:30.5') 
NaN 
>> Date.parse('2011-11-29T15:52:30.52') 
NaN 

-------------

These are both valid according to the w3c's algorithm for parsing their recognized subset of ISO8601:

--- excerpt from [http://dev.w3.org/html5/spec/common-microsyntaxes.html]:
2.5.5.4 Times

A time consists of a specific time with no time-zone information, consisting of an hour, a minute, a second, and a fraction of a second.

A string is a valid time string representing an hour hour, a minute minute, and a second second if it consists of the following components in the given order:

1.  Two digits, representing hour, in the range 0 ≤ hour ≤ 23
2.  A U+003A COLON character (:)
3.  Two digits, representing minute, in the range 0 ≤ minute ≤ 59
4.  Optionally (required if second is non-zero):
        1.  A U+003A COLON character (:)
        2.  Two digits, representing the integer part of second, in the range 0 ≤ s ≤ 59
        3.  Optionally (required if second is not an integer):
                1. A 002E FULL STOP character (.)
                2. One, two, or three digits, representing the fractional part of second

--- end excerpt

4. -> 3. -> 2. says that length is not enforced and fractional part of the second need not be zero padded as is currently required.

I would even go as far as to suggest that anything beyond thousandths (0.000XXXXX...)  should just be ignored and should NOT result in a parser error as is the current behavior in both the current versions of Firefox and Chrome.  But that is above and beyond.

This also seems to contradict your own documentation located at [http://msdn.microsoft.com/en-us/library/windows/apps/ff743760(v=vs.94).aspx] where it states:

sss    Milliseconds    00 to 999

making it seem as if you would accept a 2 digit value for milliseconds.

Thanks for your time -ck
Sign in to post a comment.
Posted by Microsoft on 6/4/2012 at 10:22 AM


Thank you for your feedback.

We are sorry this has taken so long.
This issue was resolved in Internet Explorer 10 on Windows 8 Release Preview released on 5/31/2012. You can download the Release Preview from here: http://windows.microsoft.com/en-US/windows-8/download. Please verify the changes and file a new feedback or reactivate the existing one if the problem persists.

We appreciate your help and patience.

Best regards,

The Internet Explorer Team

Posted by ckozl on 2/21/2012 at 7:42 AM
Why isn't this feedback public or being reviewed yet? Did I somehow push this into purgatory? It's been "Active" for over 2 weeks now.. is that the normal turnaround?