@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)
@@ -1331,7 +1331,7 @@ var ChronoField = function (_TemporalField) {
1331
1331
  };
1332
1332
 
1333
1333
  _proto.isDateBased = function isDateBased() {
1334
- 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;
1334
+ 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;
1335
1335
  return dateBased;
1336
1336
  };
1337
1337
 
@@ -1387,7 +1387,7 @@ function _init$k() {
1387
1387
  ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR = new ChronoField('AlignedDayOfWeekInYear', ChronoUnit.DAYS, ChronoUnit.WEEKS, ValueRange.of(1, 7));
1388
1388
  ChronoField.DAY_OF_MONTH = new ChronoField('DayOfMonth', ChronoUnit.DAYS, ChronoUnit.MONTHS, ValueRange.of(1, 28, 31), 'day');
1389
1389
  ChronoField.DAY_OF_YEAR = new ChronoField('DayOfYear', ChronoUnit.DAYS, ChronoUnit.YEARS, ValueRange.of(1, 365, 366));
1390
- 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)));
1390
+ ChronoField.EPOCH_DAY = new ChronoField('EpochDay', ChronoUnit.DAYS, ChronoUnit.FOREVER, ValueRange.of(-365961662, 364522971));
1391
1391
  ChronoField.ALIGNED_WEEK_OF_MONTH = new ChronoField('AlignedWeekOfMonth', ChronoUnit.WEEKS, ChronoUnit.MONTHS, ValueRange.of(1, 4, 5));
1392
1392
  ChronoField.ALIGNED_WEEK_OF_YEAR = new ChronoField('AlignedWeekOfYear', ChronoUnit.WEEKS, ChronoUnit.YEARS, ValueRange.of(1, 53));
1393
1393
  ChronoField.MONTH_OF_YEAR = new ChronoField('MonthOfYear', ChronoUnit.MONTHS, ChronoUnit.YEARS, ValueRange.of(1, 12), 'month');
@@ -7620,16 +7620,16 @@ var YearMonth = function (_Temporal) {
7620
7620
  return monthsUntil;
7621
7621
 
7622
7622
  case ChronoUnit.YEARS:
7623
- return monthsUntil / 12;
7623
+ return MathUtil.intDiv(monthsUntil, 12);
7624
7624
 
7625
7625
  case ChronoUnit.DECADES:
7626
- return monthsUntil / 120;
7626
+ return MathUtil.intDiv(monthsUntil, 120);
7627
7627
 
7628
7628
  case ChronoUnit.CENTURIES:
7629
- return monthsUntil / 1200;
7629
+ return MathUtil.intDiv(monthsUntil, 1200);
7630
7630
 
7631
7631
  case ChronoUnit.MILLENNIA:
7632
- return monthsUntil / 12000;
7632
+ return MathUtil.intDiv(monthsUntil, 12000);
7633
7633
 
7634
7634
  case ChronoUnit.ERAS:
7635
7635
  return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);
@@ -8718,22 +8718,22 @@ var OffsetTime = function (_Temporal) {
8718
8718
  return nanosUntil;
8719
8719
 
8720
8720
  case ChronoUnit.MICROS:
8721
- return Math.floor(nanosUntil / 1000);
8721
+ return MathUtil.intDiv(nanosUntil, 1000);
8722
8722
 
8723
8723
  case ChronoUnit.MILLIS:
8724
- return Math.floor(nanosUntil / 1000000);
8724
+ return MathUtil.intDiv(nanosUntil, 1000000);
8725
8725
 
8726
8726
  case ChronoUnit.SECONDS:
8727
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_SECOND);
8727
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND);
8728
8728
 
8729
8729
  case ChronoUnit.MINUTES:
8730
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_MINUTE);
8730
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE);
8731
8731
 
8732
8732
  case ChronoUnit.HOURS:
8733
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_HOUR);
8733
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR);
8734
8734
 
8735
8735
  case ChronoUnit.HALF_DAYS:
8736
- return Math.floor(nanosUntil / (12 * LocalTime.NANOS_PER_HOUR));
8736
+ return MathUtil.intDiv(nanosUntil, 12 * LocalTime.NANOS_PER_HOUR);
8737
8737
  }
8738
8738
 
8739
8739
  throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);