@d3plus/dom 3.0.9 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/date.js +2 -0
- package/package.json +1 -1
- package/umd/d3plus-dom.full.js +3 -1
- package/umd/d3plus-dom.full.js.map +1 -1
- package/umd/d3plus-dom.full.min.js +48 -48
- package/umd/d3plus-dom.js +3 -1
- package/umd/d3plus-dom.js.map +1 -1
- package/umd/d3plus-dom.min.js +2 -2
package/es/src/date.js
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
date4.setFullYear(d);
|
|
57
57
|
return date4;
|
|
58
58
|
}
|
|
59
|
+
var iso8601 = new RegExp(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/g).exec(s);
|
|
60
|
+
if (iso8601) return new Date(s);
|
|
59
61
|
// falls back to Date object, replacing hyphens with slashes
|
|
60
62
|
return new Date(s.replace(/-/g, "/"));
|
|
61
63
|
}
|
package/package.json
CHANGED
package/umd/d3plus-dom.full.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
@d3plus/dom v3.0.
|
|
2
|
+
@d3plus/dom v3.0.10
|
|
3
3
|
JavaScript functions for manipulating and analyzing DOM elements.
|
|
4
4
|
Copyright (c) 2025 D3plus - https://d3plus.org
|
|
5
5
|
@license MIT
|
|
@@ -222,6 +222,8 @@
|
|
|
222
222
|
date.setFullYear(d);
|
|
223
223
|
return date;
|
|
224
224
|
}
|
|
225
|
+
const iso8601 = new RegExp(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/g).exec(s);
|
|
226
|
+
if (iso8601) return new Date(s);
|
|
225
227
|
// falls back to Date object, replacing hyphens with slashes
|
|
226
228
|
return new Date(s.replace(/-/g, "/"));
|
|
227
229
|
}
|