cx 23.5.1 → 23.5.3

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/dist/charts.js CHANGED
@@ -21,6 +21,7 @@ import {
21
21
  closest,
22
22
  getTopLevelBoundingClientRect,
23
23
  Format,
24
+ parseDateInvariant,
24
25
  zeroTime,
25
26
  } from "cx/util";
26
27
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -4069,7 +4070,7 @@ Format$1.registerFactory("yearOrMonth", function (format) {
4069
4070
  var year = Format$1.parse("datetime;yyyy");
4070
4071
  var month = Format$1.parse("datetime;MMM");
4071
4072
  return function (date) {
4072
- var d = new Date(date);
4073
+ var d = parseDateInvariant(date);
4073
4074
  if (d.getMonth() == 0) return year(d);
4074
4075
  else return month(d);
4075
4076
  };
@@ -4078,7 +4079,7 @@ Format$1.registerFactory("monthOrDay", function (format) {
4078
4079
  var month = Format$1.parse("datetime;MMM");
4079
4080
  var day = Format$1.parse("datetime;dd");
4080
4081
  return function (date) {
4081
- var d = new Date(date);
4082
+ var d = parseDateInvariant(date);
4082
4083
  if (d.getDate() == 1) return month(d);
4083
4084
  else return day(d);
4084
4085
  };
@@ -4244,11 +4245,11 @@ var TimeScale = /*#__PURE__*/ (function () {
4244
4245
  var v = this.dateCache[date];
4245
4246
  if (!v) {
4246
4247
  if (this.decode) date = this.decode(date);
4247
- v = this.dateCache[date] = Date.parse(date);
4248
+ v = this.dateCache[date] = parseDateInvariant(date).getTime();
4248
4249
  }
4249
4250
  return v;
4250
4251
  case "number":
4251
- return date;
4252
+ return parseDateInvariant(date).getTime();
4252
4253
  }
4253
4254
  };
4254
4255
  _proto2.encodeValue = function encodeValue(v) {