Commit ed987d06 authored by Mike Bostock's avatar Mike Bostock
Browse files

Fix ISO date parsing on Safari 5.

parent 7dbb732a
{
"name": "d3",
"version": "3.0.7",
"version": "3.0.8",
"main": "./d3.js"
}
d3 = function() {
var π = Math.PI, ε = 1e-6, d3 = {
version: "3.0.7"
version: "3.0.8"
}, d3_radians = π / 180, d3_degrees = 180 / π, d3_document = document, d3_window = window;
function d3_target(d) {
return d.target;
......@@ -7521,7 +7521,7 @@ d3 = function() {
return format;
};
var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
d3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;
d3.time.format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso;
function d3_time_formatIsoNative(date) {
return date.toISOString();
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "d3",
"version": "3.0.7",
"version": "3.0.8",
"description": "A small, free JavaScript library for manipulating documents based on data.",
"keywords": [
"dom",
......
var π = Math.PI,
ε = 1e-6,
d3 = {version: "3.0.7"}, // semver
d3 = {version: "3.0.8"}, // semver
d3_radians = π / 180,
d3_degrees = 180 / π,
d3_document = document,
......
var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
d3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;
d3.time.format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z")
? d3_time_formatIsoNative
: d3_time_formatIso;
function d3_time_formatIsoNative(date) {
return date.toISOString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment