@js-joda/core
Advanced tools
Comparing version 5.3.2 to 5.4.0
{ | ||
"name": "@js-joda/core", | ||
"version": "5.3.2", | ||
"version": "5.4.0", | ||
"description": "a date and time library for javascript", | ||
@@ -51,3 +51,3 @@ "repository": { | ||
}, | ||
"gitHead": "9b15fdaae1f66b31aebb9e2ceadc90293d66dbec" | ||
"gitHead": "6c4e14fdb41e71dbb23adc929730033e4caa15a4" | ||
} |
@@ -446,8 +446,8 @@ /** | ||
case ChronoUnit.NANOS: return nanosUntil; | ||
case ChronoUnit.MICROS: return Math.floor(nanosUntil / 1000); | ||
case ChronoUnit.MILLIS: return Math.floor(nanosUntil / 1000000); | ||
case ChronoUnit.SECONDS: return Math.floor(nanosUntil / LocalTime.NANOS_PER_SECOND); | ||
case ChronoUnit.MINUTES: return Math.floor(nanosUntil / LocalTime.NANOS_PER_MINUTE); | ||
case ChronoUnit.HOURS: return Math.floor(nanosUntil / LocalTime.NANOS_PER_HOUR); | ||
case ChronoUnit.HALF_DAYS: return Math.floor(nanosUntil / (12 * LocalTime.NANOS_PER_HOUR)); | ||
case ChronoUnit.MICROS: return MathUtil.intDiv(nanosUntil, 1000); | ||
case ChronoUnit.MILLIS: return MathUtil.intDiv(nanosUntil, 1000000); | ||
case ChronoUnit.SECONDS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND); | ||
case ChronoUnit.MINUTES: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE); | ||
case ChronoUnit.HOURS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR); | ||
case ChronoUnit.HALF_DAYS: return MathUtil.intDiv(nanosUntil, (12 * LocalTime.NANOS_PER_HOUR)); | ||
} | ||
@@ -454,0 +454,0 @@ throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`); |
@@ -324,3 +324,3 @@ /** | ||
this === ChronoField.MONTH_OF_YEAR || | ||
//this === ChronoField.EPOCH_MONTH || | ||
this === ChronoField.PROLEPTIC_MONTH || | ||
this === ChronoField.YEAR_OF_ERA || | ||
@@ -451,3 +451,3 @@ this === ChronoField.YEAR || | ||
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))); | ||
ChronoField.EPOCH_DAY = new ChronoField('EpochDay', ChronoUnit.DAYS, ChronoUnit.FOREVER, ValueRange.of(-365961662, 364522971)); // [LocalDate.MIN.toEpochDay() .. LocalDate.MAX.toEpochDay()] | ||
@@ -454,0 +454,0 @@ ChronoField.ALIGNED_WEEK_OF_MONTH = new ChronoField('AlignedWeekOfMonth', ChronoUnit.WEEKS, ChronoUnit.MONTHS, ValueRange.of(1, 4, 5)); |
@@ -854,6 +854,6 @@ /* | ||
case ChronoUnit.MONTHS: return monthsUntil; | ||
case ChronoUnit.YEARS: return monthsUntil / 12; | ||
case ChronoUnit.DECADES: return monthsUntil / 120; | ||
case ChronoUnit.CENTURIES: return monthsUntil / 1200; | ||
case ChronoUnit.MILLENNIA: return monthsUntil / 12000; | ||
case ChronoUnit.YEARS: return MathUtil.intDiv(monthsUntil, 12); | ||
case ChronoUnit.DECADES: return MathUtil.intDiv(monthsUntil, 120); | ||
case ChronoUnit.CENTURIES: return MathUtil.intDiv(monthsUntil, 1200); | ||
case ChronoUnit.MILLENNIA: return MathUtil.intDiv(monthsUntil, 12000); | ||
case ChronoUnit.ERAS: return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA); | ||
@@ -860,0 +860,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
7473662