/libcore/ojluni/src/test/java/time/test/java/time/ |
H A D | TestPeriod.java | 65 import java.time.Period; 77 assertImmutable(Period.class); 85 assertSame(Period.ZERO, Period.ZERO); 86 assertSame(Period.ofYears(0), Period.ZERO); 87 assertSame(Period.ofMonths(0), Period.ZERO); 88 assertSame(Period.ofDays(0), Period [all...] |
H A D | TestLocalDateTime.java | 69 import java.time.Period; 224 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(Period.ZERO); 356 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(Period.ZERO);
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | TCKPeriod.java | 70 import java.time.Period; 86 * Test Period. 96 assertPeriod(Period.ofYears(0), 0, 0, 0); 97 assertPeriod(Period.ofYears(1), 1, 0, 0); 98 assertPeriod(Period.ofYears(234), 234, 0, 0); 99 assertPeriod(Period.ofYears(-100), -100, 0, 0); 100 assertPeriod(Period.ofYears(Integer.MAX_VALUE), Integer.MAX_VALUE, 0, 0); 101 assertPeriod(Period.ofYears(Integer.MIN_VALUE), Integer.MIN_VALUE, 0, 0); 109 assertPeriod(Period.ofMonths(0), 0, 0, 0); 110 assertPeriod(Period [all...] |
H A D | TCKYearMonth.java | 89 import java.time.Period; 794 {YearMonth.of(1, 1), Period.ofYears(1), YearMonth.of(2, 1), null}, 795 {YearMonth.of(1, 1), Period.ofYears(-12), YearMonth.of(-11, 1), null}, 796 {YearMonth.of(1, 1), Period.ofYears(0), YearMonth.of(1, 1), null}, 797 {YearMonth.of(999999999, 12), Period.ofYears(0), YearMonth.of(999999999, 12), null}, 798 {YearMonth.of(-999999999, 1), Period.ofYears(0), YearMonth.of(-999999999, 1), null}, 799 {YearMonth.of(0, 1), Period.ofYears(-999999999), YearMonth.of(-999999999, 1), null}, 800 {YearMonth.of(0, 12), Period.ofYears(999999999), YearMonth.of(999999999, 12), null}, 802 {YearMonth.of(1, 1), Period.ofMonths(1), YearMonth.of(1, 2), null}, 803 {YearMonth.of(1, 1), Period [all...] |
H A D | TCKYear.java | 86 import java.time.Period; 482 // plus(Period) 487 {2012, Period.ofYears(0), 2012}, 488 {2012, Period.ofYears(1), 2013}, 489 {2012, Period.ofYears(2), 2014}, 490 {2012, Period.ofYears(-2), 2010}, 502 {Period.of(0, 1, 0)}, 503 {Period.of(0, 0, 1)}, 504 {Period.of(0, 1, 1)}, 505 {Period [all...] |
H A D | TCKOffsetTime.java | 104 import java.time.Period; 901 OffsetTime t = TEST_11_30_59_500_PONE.plus(Period.ZERO); 996 OffsetTime t = TEST_11_30_59_500_PONE.minus(Period.ZERO);
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
H A D | TCKPeriodSerialization.java | 65 import java.time.Period; 68 * Test serialization of Period. 76 assertSerializable(Period.ZERO); 77 assertSerializable(Period.ofDays(1)); 78 assertSerializable(Period.of(1, 2, 3)); 83 assertNotSerializable(Period.class);
|
/libcore/luni/src/test/java/libcore/java/time/ |
H A D | PeriodTest.java | 19 import java.time.Period; 25 * Additional tests for {@link Period}. 33 // Period always uses the IsoChronology. 34 assertSame(IsoChronology.INSTANCE, Period.ZERO.getChronology());
|
/libcore/ojluni/src/main/java/java/time/ |
H A D | Period.java | 104 * By contrast, a {@code Period} will add a conceptual day, trying to maintain 108 * 18:00 on the evening before a daylight savings gap. The {@code Period} will add 129 public final class Period class in inherits:ChronoPeriod,Serializable 135 public static final Period ZERO = new Period(0, 0, 0); 167 * Obtains a {@code Period} representing a number of years. 175 public static Period ofYears(int years) { 180 * Obtains a {@code Period} representing a number of months. 188 public static Period ofMonths(int months) { 193 * Obtains a {@code Period} representin 405 private Period(int years, int months, int days) { method in class:Period [all...] |
H A D | Ser.java | 150 * <li><a href="../../serialized-form.html#java.time.Period">Period.writeReplace</a> 208 ((Period) object).writeExternal(out); 234 * <li><a href="../../serialized-form.html#java.time.Period">Period</a> - {@code Period.of(years, months, days);} 269 case PERIOD_TYPE: return Period.readExternal(in);
|
H A D | LocalDate.java | 1120 * The amount is typically {@link Period} but may be any other type implementing 1138 if (amountToAdd instanceof Period) { 1139 Period periodToAdd = (Period) amountToAdd; 1353 * The amount is typically {@link Period} but may be any other type implementing 1371 if (amountToSubtract instanceof Period) { 1372 Period periodToSubtract = (Period) amountToSubtract; 1624 * Calculates the period between this date and another date as a {@code Period}. 1644 * The second is to use {@link Period#betwee [all...] |
H A D | LocalDateTime.java | 1123 * The amount is typically {@link Period} or {@link Duration} but may be 1141 if (amountToAdd instanceof Period) { 1142 Period periodToAdd = (Period) amountToAdd; 1342 * The amount is typically {@link Period} or {@link Duration} but may be 1360 if (amountToSubtract instanceof Period) { 1361 Period periodToSubtract = (Period) amountToSubtract;
|
H A D | ZonedDateTime.java | 1529 * The amount is typically {@link Period} or {@link Duration} but may be 1547 if (amountToAdd instanceof Period) { 1548 Period periodToAdd = (Period) amountToAdd; 1781 * The amount is typically {@link Period} or {@link Duration} but may be 1799 if (amountToSubtract instanceof Period) { 1800 Period periodToSubtract = (Period) amountToSubtract;
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
H A D | TemporalAmount.java | 66 import java.time.Period; 84 * {@link Period} is a date-based implementation, storing years, months and days. 91 * around instances of concrete types, such as {@code Period} and {@code Duration}.
|
H A D | TemporalUnit.java | 67 import java.time.Period; 79 * See {@link Period} for a class that represents an amount in terms of the common units.
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
H A D | TCKInstantPrinterParser.java | 68 import java.time.Period; 229 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 239 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 258 assertEquals(parsed.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 270 assertEquals(parsed.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO);
|
H A D | TCKDateTimeParseResolver.java | 101 import java.time.Period; 554 {null, 0, 0, 0, 0, LocalTime.of(0, 0, 0, 0), Period.ZERO}, 555 {null, 1, 0, 0, 0, LocalTime.of(1, 0, 0, 0), Period.ZERO}, 556 {null, 0, 2, 0, 0, LocalTime.of(0, 2, 0, 0), Period.ZERO}, 557 {null, 0, 0, 3, 0, LocalTime.of(0, 0, 3, 0), Period.ZERO}, 558 {null, 0, 0, 0, 4, LocalTime.of(0, 0, 0, 4), Period.ZERO}, 559 {null, 1, 2, 3, 4, LocalTime.of(1, 2, 3, 4), Period.ZERO}, 560 {null, 23, 59, 59, 123456789, LocalTime.of(23, 59, 59, 123456789), Period.ZERO}, 564 {ResolverStyle.LENIENT, 14, 59, 60, 123456789, LocalTime.of(15, 0, 0, 123456789), Period.ZERO}, 568 {ResolverStyle.LENIENT, 23, 59, 60, 123456789, LocalTime.of(0, 0, 0, 123456789), Period [all...] |
/libcore/ojluni/src/main/java/java/time/format/ |
H A D | Parsed.java | 86 import java.time.Period; 157 Period excessDays = Period.ZERO; 281 updateCheckConflict(cldt.toLocalTime(), Period.ZERO); 292 updateCheckConflict((LocalTime) resolvedObject, Period.ZERO); 544 updateCheckConflict(LocalTime.ofNanoOfDay(nod), Period.ofDays(excessDays)); 550 updateCheckConflict(LocalTime.MIDNIGHT, Period.ofDays(1)); 554 updateCheckConflict(LocalTime.of(hodVal, mohVal, somVal, nosVal), Period.ZERO); 563 excessDays = Period.ZERO; 603 private void updateCheckConflict(LocalTime timeToSet, Period periodToSe [all...] |
H A D | DateTimeFormatter.java | 80 import java.time.Period; 1279 * {@code LocalTime} and an excess {@code Period} in days. 1284 * {@code Period} of one day. 1298 * "24:00" LocalTime.of(0, 0) Period.ofDays(1) 1304 * Period extraDays = parsed.query(DateTimeFormatter.parsedExcessDays()); 1308 public static final TemporalQuery<Period> parsedExcessDays() { 1311 private static final TemporalQuery<Period> PARSED_EXCESS_DAYS = t -> { 1315 return Period.ZERO;
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
H A D | TCKChronoPeriod.java | 71 import java.time.Period; 174 ChronoPeriod isoPeriod = Period.of(2, 3, 4); 192 ChronoPeriod isoPeriod = Period.of(2, 3, 4); 274 if (period instanceof Period == false) {
|
H A D | CopticDate.java | 70 import java.time.Period; 309 public Period until(ChronoLocalDate endDate) { 324 return Period.of(Math.toIntExact(years), months, days);
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | IsoChronology.java | 80 import java.time.Period; 574 * years, months and days. See {@link Period} for further details. 583 public Period period(int years, int months, int days) { 584 return Period.of(years, months, days);
|
H A D | MinguoDate.java | 74 import java.time.Period; 427 Period period = isoDate.until(endDate);
|
H A D | ThaiBuddhistDate.java | 74 import java.time.Period; 427 Period period = isoDate.until(endDate);
|
H A D | JapaneseDate.java | 77 import java.time.Period; 668 Period period = isoDate.until(endDate);
|