/libcore/luni/src/test/java/libcore/java/time/ |
D | OffsetTimeTest.java | 46 NOON_UTC.plus(1, ChronoUnit.HOURS)); in test_plus() 48 NOON_UTC.plus(23, ChronoUnit.HOURS)); in test_plus() 50 NOON_UTC.plus(1, ChronoUnit.MINUTES)); in test_plus() 52 NOON_UTC.plus(60, ChronoUnit.SECONDS)); in test_plus() 54 NOON_UTC.plus(1, ChronoUnit.MILLIS)); in test_plus() 56 NOON_UTC.plus(1, ChronoUnit.NANOS)); in test_plus() 71 assertSame(NOON_UTC, NOON_UTC.plus(amount, unit)); in assertPlusIsNoop() 78 NOON_UTC.plus(1, unit); in test_plus_minus_invalidUnits()
|
D | OffsetDateTimeTest.java | 44 ODT.plus(1, ChronoUnit.HOURS)); in test_plus() 46 ODT.plus(23, ChronoUnit.HOURS)); in test_plus() 48 ODT.plus(1, ChronoUnit.MINUTES)); in test_plus() 50 ODT.plus(60, ChronoUnit.SECONDS)); in test_plus() 52 ODT.plus(1, ChronoUnit.MILLIS)); in test_plus() 54 ODT.plus(1, ChronoUnit.NANOS)); in test_plus()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | Temporal.java | 261 default Temporal plus(TemporalAmount amount) { in plus() method 297 Temporal plus(long amountToAdd, TemporalUnit unit); in plus() method 370 …return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amou… in minus()
|
D | TemporalAdjusters.java | 209 return (temporal) -> temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS); in firstDayOfNextMonth() 270 return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS); in firstDayOfNextYear() 355 return temp.plus(dowDiff, DAYS); in dayOfWeekInMonth() 364 return temp.plus(daysDiff, DAYS); in dayOfWeekInMonth() 391 return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); 420 return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS);
|
D | TemporalUnit.java | 179 temporal.plus(1, this); in isSupportedBy() 185 temporal.plus(-1, this); in isSupportedBy()
|
D | WeekFields.java | 290 DayOfWeek dow = DayOfWeek.SUNDAY.plus(weekData.firstDayOfWeek - 1); in of() 735 return date.plus(days, DAYS); in ofWeekBasedYear() 909 return (R) temporal.plus(newVal - currentVal, baseUnit); in adjustInto() 960 date = chrono.date(year, 1, 1).plus(Math.subtractExact(month, 1), MONTHS); in resolveWoM() 963 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoM() 970 date = date.plus(weeks * 7 + days, DAYS); in resolveWoM() 988 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoY() 993 date = date.plus(weeks * 7 + days, DAYS); in resolveWoY() 1013 date = date.plus(weeks, WEEKS); in resolveWBY() 1147 date = date.plus(yearLen - doy + 1 + 7, ChronoUnit.DAYS); in rangeWeekOfWeekBasedYear()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestChronoLocalDate.java | 95 dates.add(date.plus(1, ChronoUnit.DAYS)); in test_date_comparator_checkGenerics_ISO() 96 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_date_comparator_checkGenerics_ISO() 97 dates.add(date.plus(1, ChronoUnit.MONTHS)); in test_date_comparator_checkGenerics_ISO() 98 dates.add(date.plus(1, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO() 99 dates.add(date.plus(10, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO() 119 dates.add(date.plus(1, ChronoUnit.DAYS)); 120 dates.add(date.plus(1, ChronoUnit.WEEKS)); 121 dates.add(date.plus(1, ChronoUnit.MONTHS)); 122 dates.add(date.plus(1, ChronoUnit.YEARS)); 123 dates.add(date.plus(10, ChronoUnit.YEARS)); [all …]
|
D | TestExampleCode.java | 109 .plus(1, ChronoUnit.YEARS) in test_chronoPackageExample() 162 .plus(1, ChronoUnit.YEARS) in test_calendarPackageExample() 204 return (D) date.plus(1, ChronoUnit.DAYS); in next() 216 return (ChronoLocalDateTime<D>) date.plus(1, ChronoUnit.DAYS).atTime(LocalTime.of(12, 0)); in tomorrowNoon()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 304 return ZERO.plus(amount, unit); in of() 332 duration = duration.plus(amount.get(unit), unit); in from() 671 public Duration plus(Duration duration) { in plus() method in Duration 672 return plus(duration.getSeconds(), duration.getNano()); in plus() 691 public Duration plus(long amountToAdd, TemporalUnit unit) { in plus() method in Duration 694 return plus(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY), 0); in plus() 729 return plus(Math.multiplyExact(daysToAdd, SECONDS_PER_DAY), 0); in plusDays() 742 return plus(Math.multiplyExact(hoursToAdd, SECONDS_PER_HOUR), 0); in plusHours() 755 return plus(Math.multiplyExact(minutesToAdd, SECONDS_PER_MINUTE), 0); in plusMinutes() 768 return plus(secondsToAdd, 0); in plusSeconds() [all …]
|
D | Instant.java | 781 public Instant plus(TemporalAmount amountToAdd) { in plus() method in Instant 844 public Instant plus(long amountToAdd, TemporalUnit unit) { in plus() method in Instant 848 case MICROS: return plus(amountToAdd / 1000_000, (amountToAdd % 1000_000) * 1000); in plus() 873 return plus(secondsToAdd, 0); in plusSeconds() 887 return plus(millisToAdd / 1000, (millisToAdd % 1000) * 1000_000); in plusMillis() 901 return plus(0, nanosToAdd); in plusNanos() 915 private Instant plus(long secondsToAdd, long nanosToAdd) { in plus() method in Instant 973 …return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amou… in minus()
|
D | Year.java | 649 public Year plus(TemporalAmount amountToAdd) { in plus() method in Year 702 public Year plus(long amountToAdd, TemporalUnit unit) { in plus() method in Year 779 …return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amou… in minus()
|
D | OffsetTime.java | 842 public OffsetTime plus(TemporalAmount amountToAdd) { in plus() method in OffsetTime 872 public OffsetTime plus(long amountToAdd, TemporalUnit unit) { in plus() method in OffsetTime 874 return with(time.plus(amountToAdd, unit), offset); in plus() 987 …return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amou… in minus()
|
D | DayOfWeek.java | 365 public DayOfWeek plus(long days) { in plus() method in DayOfWeek 382 return plus(-(days % 7)); in minus()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | AbstractChronology.java | 556 return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS); in resolveYMD() 575 return dateYearDay(y, 1).plus(days, DAYS); in resolveYD() 587 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS); in resolveYMAA() 592 ChronoLocalDate date = date(y, moy, 1).plus((aw - 1) * 7 + (ad - 1), DAYS); in resolveYMAA() 610 …ChronoLocalDate date = date(y, moy, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow))… in resolveYMAD() 622 return dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS); in resolveYAA() 626 ChronoLocalDate date = dateYearDay(y, 1).plus((aw - 1) * 7 + (ad - 1), DAYS); in resolveYAA() 642 …ChronoLocalDate date = dateYearDay(y, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow… in resolveYAD() 650 ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS); in resolveAligned() 652 date = date.plus((dow - 1) / 7, WEEKS); in resolveAligned() [all …]
|
D | ChronoPeriodImpl.java | 176 public ChronoPeriod plus(TemporalAmount amountToAdd) { in plus() method in ChronoPeriodImpl 262 temporal = temporal.plus(years, YEARS); in addTo() 267 temporal = temporal.plus(years * monthRange + months, MONTHS); in addTo() 270 temporal = temporal.plus(years, YEARS); in addTo() 272 temporal = temporal.plus(months, MONTHS); in addTo() 276 temporal = temporal.plus(days, DAYS); in addTo()
|
D | ChronoLocalDateImpl.java | 191 public D plus(TemporalAmount amount) { in plus() method in ChronoLocalDateImpl 192 return (D) ChronoLocalDate.super.plus(amount); in plus() 198 public D plus(long amountToAdd, TemporalUnit unit) { in plus() method in ChronoLocalDateImpl 213 return (D) ChronoLocalDate.super.plus(amountToAdd, unit); in plus()
|
D | MinguoDate.java | 350 public MinguoDate plus(TemporalAmount amount) { in plus() method in MinguoDate 351 return super.plus(amount); in plus() 386 public MinguoDate plus(long amountToAdd, TemporalUnit unit) { in plus() method in MinguoDate 387 return super.plus(amountToAdd, unit); in plus()
|
D | ThaiBuddhistDate.java | 350 public ThaiBuddhistDate plus(TemporalAmount amount) { in plus() method in ThaiBuddhistDate 351 return super.plus(amount); in plus() 386 public ThaiBuddhistDate plus(long amountToAdd, TemporalUnit unit) { in plus() method in ThaiBuddhistDate 387 return super.plus(amountToAdd, unit); in plus()
|
D | ChronoLocalDate.java | 448 default ChronoLocalDate plus(TemporalAmount amount) { in plus() method 449 return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.plus(amount)); in plus() 458 default ChronoLocalDate plus(long amountToAdd, TemporalUnit unit) { in plus() method
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKChronoLocalDateTime.java | 147 cdt.plus(adjuster); in test_badPlusAdjusterChrono() 155 ChronoLocalDateTime<?> result = cdt.plus(adjuster); in test_badPlusAdjusterChrono() 195 cdt.plus(1, adjuster); in test_badPlusTemporalUnitChrono() 203 ChronoLocalDateTime<?> result = cdt.plus(1, adjuster); in test_badPlusTemporalUnitChrono() 276 dates.add(date.plus(1, ChronoUnit.NANOS)); in test_datetime_comparisons() 277 dates.add(date.plus(1, ChronoUnit.SECONDS)); in test_datetime_comparisons() 278 dates.add(date.plus(1, ChronoUnit.MINUTES)); in test_datetime_comparisons() 279 dates.add(date.plus(1, ChronoUnit.HOURS)); in test_datetime_comparisons() 280 dates.add(date.plus(1, ChronoUnit.DAYS)); in test_datetime_comparisons() 281 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_datetime_comparisons() [all …]
|
D | TCKChronoZonedDateTime.java | 148 czdt.plus(adjuster); in test_badPlusAdjusterChrono() 156 ChronoZonedDateTime<?> result = czdt.plus(adjuster); in test_badPlusAdjusterChrono() 196 czdt.plus(1, adjuster); in test_badPlusTemporalUnitChrono() 204 ChronoZonedDateTime<?> result = czdt.plus(1, adjuster); in test_badPlusTemporalUnitChrono() 279 dates.add(date.plus(1, ChronoUnit.NANOS)); in test_zonedDateTime_comparisons() 280 dates.add(date.plus(1, ChronoUnit.SECONDS)); in test_zonedDateTime_comparisons() 281 dates.add(date.plus(1, ChronoUnit.MINUTES)); in test_zonedDateTime_comparisons() 282 dates.add(date.plus(1, ChronoUnit.HOURS)); in test_zonedDateTime_comparisons() 283 dates.add(date.plus(1, ChronoUnit.DAYS)); in test_zonedDateTime_comparisons() 284 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_zonedDateTime_comparisons() [all …]
|
D | TCKChronoLocalDate.java | 146 date.plus(adjuster); in test_badPlusAdjusterChrono() 153 ChronoLocalDate result = date.plus(adjuster); in test_badPlusAdjusterChrono() 192 date.plus(1, adjuster); in test_badPlusTemporalUnitChrono() 200 ChronoLocalDate result = date.plus(1, adjuster); in test_badPlusTemporalUnitChrono() 269 dates.add(date.plus(1, ChronoUnit.DAYS)); in test_date_comparisons() 270 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_date_comparisons() 271 dates.add(date.plus(1, ChronoUnit.MONTHS)); in test_date_comparisons() 272 dates.add(date.plus(1, ChronoUnit.YEARS)); in test_date_comparisons()
|
D | TCKChronoPeriod.java | 167 ChronoPeriod result = period.plus(period2); in test_plus() 177 period.plus(isoPeriod); in test_plus_wrongChrono() 178 period.plus(thaiPeriod); in test_plus_wrongChrono() 205 assertEquals(result, date.plus(14, MONTHS).plus(3, DAYS)); in test_addTo()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestReducedParser.java | 394 {IsoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono() 395 {IsoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono() 397 {HijrahChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono() 398 {HijrahChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono() 400 {JapaneseChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono() 401 {JapaneseChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono() 403 {MinguoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono() 404 {MinguoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono() 406 {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono() 407 {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKPeriod.java | 635 assertEquals(base.plus(add), expected); in test_plus_TemporalAmount() 640 pymd(4, 5, 6).plus(ThaiBuddhistChronology.INSTANCE.period(1, 0, 0)); in test_plus_TemporalAmount_nonISO() 670 pymd(4, 5, 6).plus(amount); in test_plus_TemporalAmount_DaysHours() 683 assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(0)), 1, 2, 3); in test_plusYears() 684 assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(10)), 11, 2, 3); in test_plusYears() 685 assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(-10)), -9, 2, 3); in test_plusYears() 686 assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(-1)), 0, 2, 3); in test_plusYears() 711 assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(0)), 1, 2, 3); in test_plusMonths() 712 assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(10)), 1, 12, 3); in test_plusMonths() 713 assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(-10)), 1, -8, 3); in test_plusMonths() [all …]
|