How are you currently parsing ISO8601 dates e.g. 2010-02-23T23:04:48Z in JavaScript?
Some browsers return NaN (including Chrome) when using the cod
As others have mentioned, it's not in the 3rd edition specification. It is in the 5th edition specification however, and I quote:
ECMAScript defines a string interchange format for date-times based upon a simplification of the ISO 8601 Extended Format. The format is as follows: YYYY-MM-DDTHH:mm:ss.sssZ
So it should be trickling into browsers soon (IE9, Chrome 1, Firefox 4 are at least some of the browsers supporting ISO 8601 dates). If you want to implement a solution in the meantime, you might want to optimize so that your script can take advantage of the native if available:
(function ()
{
if (isNaN(Date.parse("2010-02-23T23:04:48Z")))
{
var oldParse = Date.parse;
Date.parse = function (strTime)
{
// regex test strTime for ISO 8601, use oldParse if it isn't
// Use custom parser if it is.
}
}
})();