/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
H A D | TestChronoUnit.java | 109 assertEquals(YEARS.between(start, end), expected); 114 assertEquals(YEARS.between(end, start), -expected); 119 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 30)), expected); 125 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); 127 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); 133 assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected); 140 assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); 142 assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected); 182 assertEquals(MONTHS.between(start, end), expected); 187 assertEquals(MONTHS.between(en [all...] |
/libcore/luni/src/test/java/libcore/java/time/ |
H A D | DurationTest.java | 51 // These tests are a little tautological, but since Duration.between is well-tested, 54 Duration.between(Instant.EPOCH, Instant.MAX).addTo(Instant.EPOCH)); 56 Duration.between(Instant.MIN, Instant.MAX).addTo(Instant.MIN)); 58 Duration.between(Instant.MIN, Instant.EPOCH).addTo(Instant.MIN)); 65 Duration.between(Instant.MIN, Instant.EPOCH).subtractFrom(Instant.EPOCH)); 67 Duration.between(Instant.MIN, Instant.MAX).subtractFrom(Instant.MAX)); 69 Duration.between(Instant.EPOCH, Instant.MAX).subtractFrom(Instant.MAX)); 75 { Instant.EPOCH, Duration.between(Instant.EPOCH, Instant.MAX).plusNanos(1) }, 77 { Instant.EPOCH, Duration.between(Instant.EPOCH, Instant.MIN).minusNanos(1) }, 78 { Instant.EPOCH, Duration.between(Instan [all...] |
/libcore/ojluni/src/main/java/java/time/temporal/ |
H A D | TemporalUnit.java | 231 * Calculates the amount of time between two temporal objects. 238 * For example, the amount in hours between two temporal objects can be 239 * calculated using {@code HOURS.between(startTime, endTime)}. 242 * complete units between the two temporals. 243 * For example, the amount in hours between the times 11:30 and 13:29 251 * between = thisUnit.between(start, end); 252 * between = start.until(end, thisUnit); 256 * For example, this method allows the number of days between two dates to 259 * long daysBetween = DAYS.between(star 284 long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive); method in interface:TemporalUnit [all...] |
H A D | ChronoUnit.java | 122 * at midnight - when converting between calendar systems, the date should be 271 public long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive) { method in class:ChronoUnit
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | ChronoPeriod.java | 98 * Obtains a {@code ChronoPeriod} consisting of amount of time between two dates. 113 * @return the period between this date and the end date, not null 116 public static ChronoPeriod between(ChronoLocalDate startDateInclusive, ChronoLocalDate endDateExclusive) { method in interface:ChronoPeriod
|
H A D | ChronoLocalDateImpl.java | 84 * The calendar system, represented by a {@link java.time.chrono.Chronology}, expresses the relationship between 393 return unit.between(this, end);
|
H A D | ChronoZonedDateTimeImpl.java | 319 return unit.between(this, end);
|
H A D | ChronoLocalDateTimeImpl.java | 396 return unit.between(this, end);
|
/libcore/tzdata/testing/ |
H A D | Android.mk | 17 # Library of test-support classes for tzdata updates. Shared between CTS and other tests. 28 # Library of test-support classes for tzdata updates. Shared between CTS and other tests.
|
/libcore/ |
H A D | Docs.mk | 3 # Shared between libcore and frameworks/base.
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | TCKDuration.java | 755 // between() 776 Duration t = Duration.between(start, end); 785 assertEquals(Duration.between(end, start), Duration.between(start, end).negated()); 798 Duration t = Duration.between(start, end); 805 assertEquals(Duration.between(end, start), Duration.between(start, end).negated()); 837 Duration t = Duration.between(start, end); 844 assertEquals(Duration.between(end, start), Duration.between(star [all...] |
H A D | TCKPeriod.java | 436 // between(LocalDate,LocalDate) 438 @DataProvider(name="between") 525 @Test(dataProvider="between") 529 Period test = Period.between(start, end); 536 Period.between((LocalDate) null, LocalDate.of(2010, 1, 1)); 541 Period.between(LocalDate.of(2010, 1, 1), (LocalDate) null);
|
H A D | TCKInstant.java | 584 public long between(Temporal temporal1, Temporal temporal2) { 619 public long between(Temporal temporal1, Temporal temporal2) { 1827 long amount = unit.between(i1, i2);
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
H A D | TCKChronoUnit.java | 130 // isSupportedBy(), addTo() and between() 174 assertEquals(unit.between(base, result), amount);
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
H A D | CopticDate.java | 97 * The difference between the Coptic and Coptic epoch day count. 305 return unit.between(this, end);
|
H A D | TCKChronoLocalDate.java | 414 public long between(Temporal temporal1, Temporal temporal2) { method in class:TCKChronoLocalDate.FixedTemporalUnit
|
H A D | TCKChronoLocalDateTime.java | 435 public long between(Temporal temporal1, Temporal temporal2) { method in class:TCKChronoLocalDateTime.FixedTemporalUnit
|
/libcore/ojluni/src/main/java/java/time/ |
H A D | Instant.java | 106 * {@code int} representing nanosecond-of-second, which will always be between 0 and 999,999,999. 180 * boundary between the two segments is the instant where UT1 = UTC 181 * between 1972-11-03T00:00 and 1972-11-04T12:00. 1095 * This calculates the amount of time between two {@code Instant} 1100 * complete units between the two instants. 1103 * For example, the amount in days between two dates can be calculated 1108 * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}: 1112 * amount = SECONDS.between(start, end); 1122 * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)} 1130 * @return the amount of time between thi [all...] |
H A D | OffsetTime.java | 554 * To take into account the difference between the offsets, and adjust the time fields, 571 * adjusted by the difference between the two offsets. 1123 * This calculates the amount of time between two {@code OffsetTime} 1127 * For example, the amount in hours between two times can be calculated 1132 * If the offset differs between the two times, then the specified 1136 * complete units between the two times. 1137 * For example, the amount in hours between 11:30Z and 13:29Z will only 1142 * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}: 1146 * amount = MINUTES.between(start, end); 1156 * is obtained by invoking {@code TemporalUnit.between(Tempora [all...] |
H A D | Period.java | 303 * permit mixing between the {@code PnYnMnD} and {@code PnW} formats. 362 * and days between two dates. 376 * @return the period between this date and the end date, not null 379 public static Period between(LocalDate startDateInclusive, LocalDate endDateExclusive) { method in class:Period
|
H A D | Year.java | 862 * This calculates the amount of time between two {@code Year} 868 * For example, the amount in decades between two year can be calculated 872 * complete units between the two years. 873 * For example, the amount in decades between 2012 and 2031 878 * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}: 882 * amount = YEARS.between(start, end); 892 * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)} 900 * @return the amount of time between this year and the end year 920 return unit.between(this, end);
|
H A D | YearMonth.java | 994 * This calculates the amount of time between two {@code YearMonth} 1000 * For example, the amount in years between two year-months can be calculated 1004 * complete units between the two year-months. 1005 * For example, the amount in decades between 2012-06 and 2032-05 1010 * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}: 1014 * amount = MONTHS.between(start, end); 1024 * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)} 1032 * @return the amount of time between this year-month and the end year-month 1053 return unit.between(this, end);
|
H A D | Duration.java | 113 * representing nanosecond-of-second, which will always be between 0 and 999,999,999. 445 * Obtains a {@code Duration} representing the duration between two temporal objects. 447 * This calculates the duration between two temporal objects. If the objects 462 * @throws DateTimeException if the seconds between the temporals cannot be obtained 465 public static Duration between(Temporal startInclusive, Temporal endExclusive) { method in class:Duration 554 * The circular dependency between Duration and ChronoUnit prevents 566 * A {@code Duration} represents a directed distance between two points on 579 * A {@code Duration} represents a directed distance between two points on 598 * A {@code Duration} represents a directed distance between two points on the time-line. 616 * A {@code Duration} represents a directed distance between tw [all...] |
H A D | LocalTime.java | 1333 * This calculates the amount of time between two {@code LocalTime} 1339 * For example, the amount in hours between two times can be calculated 1343 * complete units between the two times. 1344 * For example, the amount in hours between 11:30 and 13:29 will only 1349 * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}: 1353 * amount = MINUTES.between(start, end); 1363 * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)} 1371 * @return the amount of time between this time and the end time 1393 return unit.between(this, end);
|
H A D | OffsetDateTime.java | 659 * To take into account the difference between the offsets, and adjust the time fields, 676 * adjusted by the difference between the two offsets. 1598 * This calculates the amount of time between two {@code OffsetDateTime} 1602 * For example, the amount in days between two date-times can be calculated 1607 * If the offset differs between the two date-times, the specified 1611 * complete units between the two date-times. 1612 * For example, the amount in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z 1617 * The second is to use {@link TemporalUnit#between(Temporal, Temporal)}: 1621 * amount = MONTHS.between(start, end); 1633 * is obtained by invoking {@code TemporalUnit.between(Tempora [all...] |