This project has moved. For the latest updates, please go here.


IsoDateTimeConverter Produces Invalid Date Strings in IE9


The IsoDateTimeConverter produces date strings like the following:


If you consume the JSON that includes these time strings in the browser and attempt to parse these date strings with new Date(), the first one will parse fine cross-browser. However, the second one will fail in IE9, saying "Invalid Date," because it requires 3 digits in the milliseconds place of the string:

Open that in IE9 and you'll see the first 3 entries parse out as Invalid Date. In IE10 and Chrome, they parse just fine.

Screenshot of IE9 failing to parse most date time strings attached.

An easy fix would be to format the milliseconds portion with 3 digits regardless of how it rounds.

file attachments

Closed Jun 20, 2013 at 2:01 AM by JamesNK
There are a number of settings to make always write 3 millisecond digits


SoopahMan wrote Jun 20, 2013 at 2:36 AM

Sure, but should the default behavior fail in IE9?

wrote Jun 20, 2013 at 7:22 AM

SoopahMan wrote Jun 20, 2013 at 7:22 AM

If you'd like to fix this so the library works out of the box in IE9 and below, here's the patch.