Lines Matching refs:end
1097 * The start and end points are {@code this} and the specified instant.
1098 * The result will be negative if the end is before the start.
1111 * amount = start.until(end, SECONDS);
1112 * amount = SECONDS.between(start, end);
1128 * @param endExclusive the end date, exclusive, which is converted to an {@code Instant}, not null
1130 * @return the amount of time between this instant and the end instant
1131 * @throws DateTimeException if the amount cannot be calculated, or the end
1138 Instant end = Instant.from(endExclusive);
1142 case NANOS: return nanosUntil(end);
1143 case MICROS: return nanosUntil(end) / 1000;
1144 case MILLIS: return Math.subtractExact(end.toEpochMilli(), toEpochMilli());
1145 case SECONDS: return secondsUntil(end);
1146 case MINUTES: return secondsUntil(end) / SECONDS_PER_MINUTE;
1147 case HOURS: return secondsUntil(end) / SECONDS_PER_HOUR;
1148 case HALF_DAYS: return secondsUntil(end) / (12 * SECONDS_PER_HOUR);
1149 case DAYS: return secondsUntil(end) / (SECONDS_PER_DAY);
1153 return unit.between(this, end);
1156 private long nanosUntil(Instant end) {
1157 long secsDiff = Math.subtractExact(end.seconds, seconds);
1159 return Math.addExact(totalNanos, end.nanos - nanos);
1162 private long secondsUntil(Instant end) {
1163 long secsDiff = Math.subtractExact(end.seconds, seconds);
1164 long nanosDiff = end.nanos - nanos;