@js-joda/core 5.3.2 → 5.4.1

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/js-joda.js CHANGED
@@ -1,4 +1,4 @@
1
- //! @version @js-joda/core - 5.3.2
1
+ //! @version @js-joda/core - 5.4.1
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)
@@ -1337,7 +1337,7 @@
1337
1337
  };
1338
1338
 
1339
1339
  _proto.isDateBased = function isDateBased() {
1340
- 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;
1340
+ 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;
1341
1341
  return dateBased;
1342
1342
  };
1343
1343
 
@@ -1393,7 +1393,7 @@
1393
1393
  ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR = new ChronoField('AlignedDayOfWeekInYear', ChronoUnit.DAYS, ChronoUnit.WEEKS, ValueRange.of(1, 7));
1394
1394
  ChronoField.DAY_OF_MONTH = new ChronoField('DayOfMonth', ChronoUnit.DAYS, ChronoUnit.MONTHS, ValueRange.of(1, 28, 31), 'day');
1395
1395
  ChronoField.DAY_OF_YEAR = new ChronoField('DayOfYear', ChronoUnit.DAYS, ChronoUnit.YEARS, ValueRange.of(1, 365, 366));
1396
- 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)));
1396
+ ChronoField.EPOCH_DAY = new ChronoField('EpochDay', ChronoUnit.DAYS, ChronoUnit.FOREVER, ValueRange.of(-365961662, 364522971));
1397
1397
  ChronoField.ALIGNED_WEEK_OF_MONTH = new ChronoField('AlignedWeekOfMonth', ChronoUnit.WEEKS, ChronoUnit.MONTHS, ValueRange.of(1, 4, 5));
1398
1398
  ChronoField.ALIGNED_WEEK_OF_YEAR = new ChronoField('AlignedWeekOfYear', ChronoUnit.WEEKS, ChronoUnit.YEARS, ValueRange.of(1, 53));
1399
1399
  ChronoField.MONTH_OF_YEAR = new ChronoField('MonthOfYear', ChronoUnit.MONTHS, ChronoUnit.YEARS, ValueRange.of(1, 12), 'month');
@@ -7626,16 +7626,16 @@
7626
7626
  return monthsUntil;
7627
7627
 
7628
7628
  case ChronoUnit.YEARS:
7629
- return monthsUntil / 12;
7629
+ return MathUtil.intDiv(monthsUntil, 12);
7630
7630
 
7631
7631
  case ChronoUnit.DECADES:
7632
- return monthsUntil / 120;
7632
+ return MathUtil.intDiv(monthsUntil, 120);
7633
7633
 
7634
7634
  case ChronoUnit.CENTURIES:
7635
- return monthsUntil / 1200;
7635
+ return MathUtil.intDiv(monthsUntil, 1200);
7636
7636
 
7637
7637
  case ChronoUnit.MILLENNIA:
7638
- return monthsUntil / 12000;
7638
+ return MathUtil.intDiv(monthsUntil, 12000);
7639
7639
 
7640
7640
  case ChronoUnit.ERAS:
7641
7641
  return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);
@@ -8724,22 +8724,22 @@
8724
8724
  return nanosUntil;
8725
8725
 
8726
8726
  case ChronoUnit.MICROS:
8727
- return Math.floor(nanosUntil / 1000);
8727
+ return MathUtil.intDiv(nanosUntil, 1000);
8728
8728
 
8729
8729
  case ChronoUnit.MILLIS:
8730
- return Math.floor(nanosUntil / 1000000);
8730
+ return MathUtil.intDiv(nanosUntil, 1000000);
8731
8731
 
8732
8732
  case ChronoUnit.SECONDS:
8733
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_SECOND);
8733
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND);
8734
8734
 
8735
8735
  case ChronoUnit.MINUTES:
8736
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_MINUTE);
8736
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE);
8737
8737
 
8738
8738
  case ChronoUnit.HOURS:
8739
- return Math.floor(nanosUntil / LocalTime.NANOS_PER_HOUR);
8739
+ return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR);
8740
8740
 
8741
8741
  case ChronoUnit.HALF_DAYS:
8742
- return Math.floor(nanosUntil / (12 * LocalTime.NANOS_PER_HOUR));
8742
+ return MathUtil.intDiv(nanosUntil, 12 * LocalTime.NANOS_PER_HOUR);
8743
8743
  }
8744
8744
 
8745
8745
  throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);