I am trying to parse a date string using d3.js. The format is like "2012-11-02T08:32:55-04:00"
You can see the console output below. Relavent API is here. D3 parser is stricter, as explains the doc. But, I was expecting '%Y-%m-%dT%H:%M:%SZ' as the format string. Which returns null. Any help appreciated.
Thanks.
format = d3.time.format('%Y-%m-%dT%H:%M:%SZ')
%Y-%m-%dT%H:%M:%SZ
format.parse("2012-11-02T08:32:55-04:00");
null
format.parse("2011-07-01T19:15:28Z");
Fri Jul 01 2011 19:15:28 GMT-0400 (EDT)
format = d3.time.format('%Y-%m-%dT%H:%M:%S%Z')
%Y-%m-%dT%H:%M:%S%Z
format.parse("2011-07-01T19:15:28Z");
null
format.parse("2012-11-02T08:32:55-04:00");
null