assume this is my string in my data object
{ date: "2013-03-04 12:00:00+0000" }
var parseDate = d3.time.format("%Y-%m-%d_%H:%M:%S+%Z");
data.forEach(function(d) {
d.date = parseDate(d.date);
});
yet in my forEach method, my date object returns null every time. I don't understand why this fails.
Similarly
{ date: "2013-03-04 00:00:00+0000" }
with
d3.time.format("%Y-%m-%d 00:00:00+00").parse
works fine. But the date is less precise because it assumes everything happens at midnight in my visualization
Why is my string date parser failing with my first scenario? I tried stepping through the date parser in console/inspect element in chrome, but to no avail.
here are the d3.time.format documents https://github.com/mbostock/d3/wiki/Time-Formatting
d3.time.format("%Y-%m-%d_%H:%M:%S%Z").parse