Home
last modified time | relevance | path

Searched refs:plusYears (Results 1 – 24 of 24) sorted by relevance

/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateImpl.java205 case YEARS: return plusYears(amountToAdd); in plus()
206 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
207 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
208 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
243 abstract D plusYears(long yearsToAdd); in plusYears() method in ChronoLocalDateImpl
312 …tract == Long.MIN_VALUE ? ((ChronoLocalDateImpl<D>)plusYears(Long.MAX_VALUE)).plusYears(1) : plusY… in minusYears()
DThaiBuddhistDate.java366 ThaiBuddhistDate plusYears(long years) { in plusYears() method in ThaiBuddhistDate
367 return with(isoDate.plusYears(years)); in plusYears()
DMinguoDate.java366 MinguoDate plusYears(long years) { in plusYears() method in MinguoDate
367 return with(isoDate.plusYears(years)); in plusYears()
DJapaneseDate.java611 JapaneseDate plusYears(long years) { in plusYears() method in JapaneseDate
612 return with(isoDate.plusYears(years)); in plusYears()
DHijrahDate.java520 HijrahDate plusYears(long years) { in plusYears() method in HijrahDate
/libcore/ojluni/src/main/java/java/time/
DYear.java705 case YEARS: return plusYears(amountToAdd); in plus()
706 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
707 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
708 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
725 public Year plusYears(long yearsToAdd) { in plusYears() method in Year
792 …return (yearsToSubtract == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-ye… in minusYears()
DYearMonth.java803 case YEARS: return plusYears(amountToAdd); in plus()
804 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
805 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
806 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
823 public YearMonth plusYears(long yearsToAdd) { in plusYears() method in YearMonth
911 …return (yearsToSubtract == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-ye… in minusYears()
DLocalDate.java1235 case YEARS: return plusYears(amountToAdd); in plus()
1236 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
1237 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
1238 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
1267 public LocalDate plusYears(long yearsToAdd) { in plusYears() method in LocalDate
1425 …return (yearsToSubtract == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-ye… in minusYears()
DPeriod.java640 public Period plusYears(long yearsToAdd) { in plusYears() method in Period
730 …return (yearsToSubtract == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-ye… in minusYears()
DOffsetDateTime.java1210 public OffsetDateTime plusYears(long years) { in plusYears() method in OffsetDateTime
1211 return with(dateTime.plusYears(years), offset); in plusYears()
1400 … return (years == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-years)); in minusYears()
DLocalDateTime.java1214 public LocalDateTime plusYears(long years) { in plusYears() method in LocalDateTime
1215 LocalDate newDate = date.plusYears(years); in plusYears()
1414 … return (years == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-years)); in minusYears()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java266 case YEARS: return plusYears(amountToAdd); in plus()
267 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus()
268 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus()
269 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
277 private CopticDate plusYears(long years) { in plusYears() method in CopticDate
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYear.java528 assertEquals(Year.of(2007).plusYears(-1), Year.of(2006)); in test_plusYears()
529 assertEquals(Year.of(2007).plusYears(0), Year.of(2007)); in test_plusYears()
530 assertEquals(Year.of(2007).plusYears(1), Year.of(2008)); in test_plusYears()
531 assertEquals(Year.of(2007).plusYears(2), Year.of(2009)); in test_plusYears()
533 assertEquals(Year.of(Year.MAX_VALUE - 1).plusYears(1), Year.of(Year.MAX_VALUE)); in test_plusYears()
534 assertEquals(Year.of(Year.MAX_VALUE).plusYears(0), Year.of(Year.MAX_VALUE)); in test_plusYears()
536 assertEquals(Year.of(Year.MIN_VALUE + 1).plusYears(-1), Year.of(Year.MIN_VALUE)); in test_plusYears()
537 assertEquals(Year.of(Year.MIN_VALUE).plusYears(0), Year.of(Year.MIN_VALUE)); in test_plusYears()
543 assertEquals(base.plusYears(0), base); in test_plusYear_zero_equals()
549 assertEquals(Year.of(-40).plusYears(years), Year.of((int) (-40L + years))); in test_plusYears_big()
[all …]
DTCKLocalDate.java1046 LocalDate t = TEST_2007_07_15.plusYears(1);
1052 LocalDate t = TEST_2007_07_15.plusYears(-1);
1058 LocalDate t = LocalDate.of(2008, 2, 29).plusYears(1);
1066 LocalDate test = LocalDate.of(-40, 6, 1).plusYears(years);
1073 test.plusYears(1);
1079 test.plusYears(Long.MAX_VALUE);
1085 test.plusYears(Long.MIN_VALUE);
1090 LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-1);
1095 LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-10);
1194 LocalDate t = TEST_2007_07_15.plusYears(-1).plusWeeks(104);
[all …]
DTCKPeriod.java678 assertPeriod(Period.of(1, 2, 3).plusYears(0), 1, 2, 3); in test_plusYears()
679 assertPeriod(Period.of(1, 2, 3).plusYears(10), 11, 2, 3); in test_plusYears()
680 assertPeriod(Period.of(1, 2, 3).plusYears(-10), -9, 2, 3); in test_plusYears()
681 assertPeriod(Period.of(1, 2, 3).plusYears(-1), 0, 2, 3); in test_plusYears()
692 test.plusYears(1); in test_plusYears_overflowTooBig()
698 test.plusYears(-1); in test_plusYears_overflowTooSmall()
DTCKYearMonth.java631 assertEquals(test.plusYears(1), YearMonth.of(2009, 6)); in test_plusYears_long()
637 assertEquals(test.plusYears(0), test); in test_plusYears_long_noChange_equal()
643 assertEquals(test.plusYears(-1), YearMonth.of(2007, 6)); in test_plusYears_long_negative()
649 …assertEquals(test.plusYears(20L + Year.MAX_VALUE), YearMonth.of((int) (-40L + 20L + Year.MAX_VALUE… in test_plusYears_long_big()
655 test.plusYears(1); in test_plusYears_long_invalidTooLarge()
661 test.plusYears(Long.MAX_VALUE); in test_plusYears_long_invalidTooLargeMaxAddMax()
667 test.plusYears(Long.MIN_VALUE); in test_plusYears_long_invalidTooLargeMaxAddMin()
673 test.plusYears(-1); in test_plusYears_long_invalidTooSmall()
DTCKLocalDateTime.java1445 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(1);
1451 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1);
1457 LocalDateTime t = createDateMidnight(2008, 2, 29).plusYears(1);
1463 createDateMidnight(Year.MAX_VALUE, 1, 1).plusYears(1);
1468 LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-1);
1592 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1).plusWeeks(104);
1702 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1).plusDays(365 + 366);
2391 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(2).minusDays(365 + 366);
DTCKZonedDateTime.java1712 ZonedDateTime test = base.plusYears(1);
1713 assertEquals(test, ZonedDateTime.of(ldt.plusYears(1), ZONE_0100));
1720 ZonedDateTime test = base.plusYears(0);
DTCKOffsetDateTime.java958 OffsetDateTime test = base.plusYears(1);
/libcore/ojluni/src/test/java/time/test/java/time/
DTestOffsetDateTime.java209 OffsetDateTime test = base.plusYears(0); in test_plusYears_zero()
DTestLocalDate.java164 LocalDate t = TEST_2007_07_15.plusYears(0); in test_plusYears_long_noChange_same()
DTestLocalDateTime.java242 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(0); in test_plusYears_int_noChange()
/libcore/ojluni/annotations/hiddenapi/java/time/
DOffsetDateTime.java281 public java.time.OffsetDateTime plusYears(long years) { in plusYears() method in OffsetDateTime
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java471 odt = odt.withDayOfYear(1).plusYears(1).with(LocalTime.MIDNIGHT); in test_London_previousTransition_rulesBased()