@js-joda/core 5.3.2 → 5.4.0

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.
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/core - 5.3.2
1
+ //! @version @js-joda/core - 5.4.0
2
2
  //! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
3
3
  //! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
4
  //! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
@@ -1335,7 +1335,7 @@ var ChronoField = function (_TemporalField) {
1335
1335
  };
1336
1336
 
1337
1337
  _proto.isDateBased = function isDateBased() {
1338
- var dateBased = this === ChronoField.DAY_OF_WEEK || this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH || this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR || this === ChronoField.DAY_OF_MONTH || this === ChronoField.DAY_OF_YEAR || this === ChronoField.EPOCH_DAY || this === ChronoField.ALIGNED_WEEK_OF_MONTH || this === ChronoField.ALIGNED_WEEK_OF_YEAR || this === ChronoField.MONTH_OF_YEAR || this === ChronoField.YEAR_OF_ERA || this === ChronoField.YEAR || this === ChronoField.ERA;
1338
+ var dateBased = this === ChronoField.DAY_OF_WEEK || this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH || this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR || this === ChronoField.DAY_OF_MONTH || this === ChronoField.DAY_OF_YEAR || this === ChronoField.EPOCH_DAY || this === ChronoField.ALIGNED_WEEK_OF_MONTH || this === ChronoField.ALIGNED_WEEK_OF_YEAR || this === ChronoField.MONTH_OF_YEAR || this === ChronoField.PROLEPTIC_MONTH || this === ChronoField.YEAR_OF_ERA || this === ChronoField.YEAR || this === ChronoField.ERA;
1339
1339
  return dateBased;
1340
1340
  };
1341
1341
 
@@ -1391,7 +1391,7 @@ function _init$k() {
1391
1391
  ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR = new ChronoField('AlignedDayOfWeekInYear', ChronoUnit.DAYS, ChronoUnit.WEEKS, ValueRange.of(1, 7));
1392
1392
  ChronoField.DAY_OF_MONTH = new ChronoField('DayOfMonth', ChronoUnit.DAYS, ChronoUnit.MONTHS, ValueRange.of(1, 28, 31), 'day');
1393
1393
  ChronoField.DAY_OF_YEAR = new ChronoField('DayOfYear', ChronoUnit.DAYS, ChronoUnit.YEARS, ValueRange.of(1, 365, 366));
1394
- ChronoField.EPOCH_DAY = new ChronoField('EpochDay', ChronoUnit.DAYS, ChronoUnit.FOREVER, ValueRange.of(Math.floor(YearConstants.MIN_VALUE * 365.25), Math.floor(YearConstants.MAX_VALUE * 365.25)));
1394
+ ChronoField.EPOCH_DAY = new ChronoField('EpochDay', ChronoUnit.DAYS, ChronoUnit.FOREVER, ValueRange.of(-365961662, 364522971));
1395
1395
  ChronoField.ALIGNED_WEEK_OF_MONTH = new ChronoField('AlignedWeekOfMonth', ChronoUnit.WEEKS, ChronoUnit.MONTHS, ValueRange.of(1, 4, 5));
1396
1396
  ChronoField.ALIGNED_WEEK_OF_YEAR = new ChronoField('AlignedWeekOfYear', ChronoUnit.WEEKS, ChronoUnit.YEARS, ValueRange.of(1, 53));
1397
1397
  ChronoField.MONTH_OF_YEAR = new ChronoField('MonthOfYear', ChronoUnit.MONTHS, ChronoUnit.YEARS, ValueRange.of(1, 12), 'month');
@@ -7624,16 +7624,16 @@ var YearMonth = function (_Temporal) {
7624
7624
  return monthsUntil;
7625
7625
 
7626
7626
  case ChronoUnit.YEARS:
7627
- return monthsUntil / 12;
7627
+ return MathUtil.intDiv(monthsUntil, 12);
7628
7628
 
7629
7629
  case ChronoUnit.DECADES:
7630
- return monthsUntil / 120;
7630
+ return MathUtil.intDiv(monthsUntil, 120);
7631
7631
 
7632
7632
  case ChronoUnit.CENTURIES:
7633
- return monthsUntil / 1200;
7633
+ return MathUtil.intDiv(monthsUntil, 1200);
7634
7634
 
7635
7635
  case ChronoUnit.MILLENNIA:
7636
- return monthsUntil / 12000;
7636
+ return MathUtil.intDiv(monthsUntil, 12000);
7637
7637
 
7638
7638
  case ChronoUnit.ERAS:
7639
7639
  return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);
@@ -8722,22 +8722,22 @@ var OffsetTime = function (_Temporal) {
8722
8722
  return nanosUntil;
8723
8723
 
8724
8724
  case ChronoUnit.MICROS:
8725
- return Math.floor(nanosUntil / 1000);
8725
+ return MathUtil.intDiv(nanosUntil, 1000);
8726
8726
 
8727
8727
  case ChronoUnit.MILLIS:
8728
- return Math.floor(nanosUntil / 1000000);
8728
+ return MathUtil.intDiv(nanosUntil, 1000000);
8729
8729
 
8730
8730
  case ChronoUnit.SECONDS:
8731
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_SECOND);
8731
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND);
8732
8732
 
8733
8733
  case ChronoUnit.MINUTES:
8734
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_MINUTE);
8734
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE);
8735
8735
 
8736
8736
  case ChronoUnit.HOURS:
8737
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_HOUR);
8737
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR);
8738
8738
 
8739
8739
  case ChronoUnit.HALF_DAYS:
8740
- return Math.floor(nanosUntil / (12 * LocalTime.NANOS_PER_HOUR));
8740
+ return MathUtil.intDiv(nanosUntil, 12 * LocalTime.NANOS_PER_HOUR);
8741
8741
  }
8742
8742
 
8743
8743
  throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);