/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 | 310 DayOfWeek dow = DayOfWeek.SUNDAY.plus(calDow - 1); in of() 761 return date.plus(days, DAYS); in ofWeekBasedYear() 935 return (R) temporal.plus(newVal - currentVal, baseUnit); in adjustInto() 986 date = chrono.date(year, 1, 1).plus(Math.subtractExact(month, 1), MONTHS); in resolveWoM() 989 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoM() 996 date = date.plus(weeks * 7 + days, DAYS); in resolveWoM() 1014 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoY() 1019 date = date.plus(weeks * 7 + days, DAYS); in resolveWoY() 1039 date = date.plus(weeks, WEEKS); in resolveWBY() 1180 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 | 305 return ZERO.plus(amount, unit); in of() 333 duration = duration.plus(amount.get(unit), unit); in from() 672 public Duration plus(Duration duration) { in plus() method in Duration 673 return plus(duration.getSeconds(), duration.getNano()); in plus() 692 public Duration plus(long amountToAdd, TemporalUnit unit) { in plus() method in Duration 695 return plus(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY), 0); in plus() 730 return plus(Math.multiplyExact(daysToAdd, SECONDS_PER_DAY), 0); in plusDays() 743 return plus(Math.multiplyExact(hoursToAdd, SECONDS_PER_HOUR), 0); in plusHours() 756 return plus(Math.multiplyExact(minutesToAdd, SECONDS_PER_MINUTE), 0); in plusMinutes() 769 return plus(secondsToAdd, 0); in plusSeconds() [all …]
|
D | Instant.java | 780 public Instant plus(TemporalAmount amountToAdd) { in plus() method in Instant 843 public Instant plus(long amountToAdd, TemporalUnit unit) { in plus() method in Instant 847 case MICROS: return plus(amountToAdd / 1000_000, (amountToAdd % 1000_000) * 1000); in plus() 872 return plus(secondsToAdd, 0); in plusSeconds() 886 return plus(millisToAdd / 1000, (millisToAdd % 1000) * 1000_000); in plusMillis() 900 return plus(0, nanosToAdd); in plusNanos() 914 private Instant plus(long secondsToAdd, long nanosToAdd) { in plus() method in Instant 972 …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()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | AbstractChronology.java | 526 return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS); in resolveYMD() 545 return dateYearDay(y, 1).plus(days, DAYS); in resolveYD() 557 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS); in resolveYMAA() 562 ChronoLocalDate date = date(y, moy, 1).plus((aw - 1) * 7 + (ad - 1), DAYS); in resolveYMAA() 580 …ChronoLocalDate date = date(y, moy, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow))… in resolveYMAD() 592 return dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS); in resolveYAA() 596 ChronoLocalDate date = dateYearDay(y, 1).plus((aw - 1) * 7 + (ad - 1), DAYS); in resolveYAA() 612 …ChronoLocalDate date = dateYearDay(y, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow… in resolveYAD() 620 ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS); in resolveAligned() 622 date = date.plus((dow - 1) / 7, WEEKS); in resolveAligned() [all …]
|
D | ChronoPeriodImpl.java | 175 public ChronoPeriod plus(TemporalAmount amountToAdd) { in plus() method in ChronoPeriodImpl 260 temporal = temporal.plus(years, YEARS); in addTo() 265 temporal = temporal.plus(years * monthRange + months, MONTHS); in addTo() 268 temporal = temporal.plus(years, YEARS); in addTo() 270 temporal = temporal.plus(months, MONTHS); in addTo() 274 temporal = temporal.plus(days, DAYS); in addTo()
|
D | ChronoLocalDateImpl.java | 192 public D plus(TemporalAmount amount) { in plus() method in ChronoLocalDateImpl 193 return (D) ChronoLocalDate.super.plus(amount); in plus() 199 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()
|
/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 | 168 ChronoPeriod result = period.plus(period2); in test_plus() 178 period.plus(isoPeriod); in test_plus_wrongChrono() 179 period.plus(thaiPeriod); in test_plus_wrongChrono() 206 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/math/BigDecimal/ |
D | NegateTests.java | 41 return bd.negate().plus(mc); in negateThenRound() 46 return bd.abs().plus(mc); in absThenRound()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalDate.java | 106 return date.with(date.getMonth().plus(1)); in next() 153 LocalDate t = TEST_2007_07_15.plus(MockSimplePeriod.ZERO_DAYS); in test_plus_Period_zero() 159 LocalDate t = TEST_2007_07_15.plus(0, ChronoUnit.DAYS); in test_plus_longPeriodUnit_zero() 466 .plus(quarterYears, IsoFields.QUARTER_YEARS); in test_plus_QuarterYears() 468 .plus(quarterYears, ChronoUnit.MONTHS) in test_plus_QuarterYears() 469 .plus(quarterYears, ChronoUnit.MONTHS) in test_plus_QuarterYears() 470 .plus(quarterYears, ChronoUnit.MONTHS); in test_plus_QuarterYears()
|
/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 …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | TimeUnit8Test.java | 174 assertEquals(Long.MIN_VALUE + 1, u.convert(min.plus(1, NANOS))); in testConvertDuration_nearOverflow() 175 assertEquals(Long.MIN_VALUE + 1, u.convert(min.plus(1, cu))); in testConvertDuration_nearOverflow() 176 assertEquals(Long.MAX_VALUE, u.convert(max.plus(1, NANOS))); in testConvertDuration_nearOverflow() 178 assertEquals(Long.MAX_VALUE, u.convert(max.plus(1, cu))); in testConvertDuration_nearOverflow()
|