@internationalized/date 3.5.1-nightly.4230 → 3.5.1-nightly.4242

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/import.mjs CHANGED
@@ -779,7 +779,7 @@ function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
779
779
  }
780
780
  let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
781
781
  if (mutableDate.year > maxYear) {
782
- var _mutableDate_calendar, _mutableDate_calendar_isInverseEra;
782
+ var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
783
783
  let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
784
784
  mutableDate.year = maxYear;
785
785
  mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
@@ -798,7 +798,7 @@ function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
798
798
  return mutableDate;
799
799
  }
800
800
  function $735220c2d4774dd3$var$addYears(date, years) {
801
- var _date_calendar, _date_calendar_isInverseEra;
801
+ var _date_calendar_isInverseEra, _date_calendar;
802
802
  if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;
803
803
  date.year += years;
804
804
  }
@@ -912,7 +912,7 @@ function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options
912
912
  break;
913
913
  }
914
914
  case "year":
915
- var _mutable_calendar, _mutable_calendar_isInverseEra;
915
+ var _mutable_calendar_isInverseEra, _mutable_calendar;
916
916
  if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;
917
917
  // The year field should not cycle within the era as that can cause weird behavior affecting other fields.
918
918
  // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
@@ -2439,7 +2439,7 @@ class $fb18d541ea1ad717$export$ad991b66133851cf {
2439
2439
  return this.formatter.formatRange(start, end);
2440
2440
  if (end < start) throw new RangeError("End date must be >= start date");
2441
2441
  // Very basic fallback for old browsers.
2442
- return `${this.formatter.format(start)} ${this.formatter.format(end)}`;
2442
+ return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
2443
2443
  }
2444
2444
  /** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
2445
2445
  // @ts-ignore
@@ -2455,7 +2455,7 @@ class $fb18d541ea1ad717$export$ad991b66133851cf {
2455
2455
  })),
2456
2456
  {
2457
2457
  type: "literal",
2458
- value: " ",
2458
+ value: " \u2013 ",
2459
2459
  source: "shared"
2460
2460
  },
2461
2461
  ...endParts.map((p)=>({
package/dist/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  var $kgI3C$swchelperscjs_class_private_field_initcjs = require("@swc/helpers/cjs/_class_private_field_init.cjs");
2
2
 
3
+
3
4
  function $parcel$export(e, n, v, s) {
4
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
5
6
  }
@@ -843,7 +844,7 @@ function $5c0571aa5b6fb5da$export$e16d8520af44a096(date, duration) {
843
844
  }
844
845
  let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
845
846
  if (mutableDate.year > maxYear) {
846
- var _mutableDate_calendar, _mutableDate_calendar_isInverseEra;
847
+ var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
847
848
  let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
848
849
  mutableDate.year = maxYear;
849
850
  mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
@@ -862,7 +863,7 @@ function $5c0571aa5b6fb5da$export$e16d8520af44a096(date, duration) {
862
863
  return mutableDate;
863
864
  }
864
865
  function $5c0571aa5b6fb5da$var$addYears(date, years) {
865
- var _date_calendar, _date_calendar_isInverseEra;
866
+ var _date_calendar_isInverseEra, _date_calendar;
866
867
  if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;
867
868
  date.year += years;
868
869
  }
@@ -976,7 +977,7 @@ function $5c0571aa5b6fb5da$export$d52ced6badfb9a4c(value, field, amount, options
976
977
  break;
977
978
  }
978
979
  case "year":
979
- var _mutable_calendar, _mutable_calendar_isInverseEra;
980
+ var _mutable_calendar_isInverseEra, _mutable_calendar;
980
981
  if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;
981
982
  // The year field should not cycle within the era as that can cause weird behavior affecting other fields.
982
983
  // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
@@ -2503,7 +2504,7 @@ class $8f23a04ae90a588b$export$ad991b66133851cf {
2503
2504
  return this.formatter.formatRange(start, end);
2504
2505
  if (end < start) throw new RangeError("End date must be >= start date");
2505
2506
  // Very basic fallback for old browsers.
2506
- return `${this.formatter.format(start)} ${this.formatter.format(end)}`;
2507
+ return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
2507
2508
  }
2508
2509
  /** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
2509
2510
  // @ts-ignore
@@ -2519,7 +2520,7 @@ class $8f23a04ae90a588b$export$ad991b66133851cf {
2519
2520
  })),
2520
2521
  {
2521
2522
  type: "literal",
2522
- value: " ",
2523
+ value: " \u2013 ",
2523
2524
  source: "shared"
2524
2525
  },
2525
2526
  ...endParts.map((p)=>({