Home
last modified time | relevance | path

Searched refs:minusYears (Results 1 – 23 of 23) sorted by relevance

/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYear.java660 assertEquals(Year.of(2007).minusYears(-1), Year.of(2008)); in test_minusYears()
661 assertEquals(Year.of(2007).minusYears(0), Year.of(2007)); in test_minusYears()
662 assertEquals(Year.of(2007).minusYears(1), Year.of(2006)); in test_minusYears()
663 assertEquals(Year.of(2007).minusYears(2), Year.of(2005)); in test_minusYears()
665 assertEquals(Year.of(Year.MAX_VALUE - 1).minusYears(-1), Year.of(Year.MAX_VALUE)); in test_minusYears()
666 assertEquals(Year.of(Year.MAX_VALUE).minusYears(0), Year.of(Year.MAX_VALUE)); in test_minusYears()
668 assertEquals(Year.of(Year.MIN_VALUE + 1).minusYears(1), Year.of(Year.MIN_VALUE)); in test_minusYears()
669 assertEquals(Year.of(Year.MIN_VALUE).minusYears(0), Year.of(Year.MIN_VALUE)); in test_minusYears()
675 assertEquals(base.minusYears(0), base); in test_minusYear_zero_equals()
681 assertEquals(Year.of(40).minusYears(years), Year.of((int) (40L - years))); in test_minusYears_big()
[all …]
DTCKPeriod.java823 assertPeriod(Period.of(1, 2, 3).minusYears(0), 1, 2, 3); in test_minusYears()
824 assertPeriod(Period.of(1, 2, 3).minusYears(10), -9, 2, 3); in test_minusYears()
825 assertPeriod(Period.of(1, 2, 3).minusYears(-10), 11, 2, 3); in test_minusYears()
826 assertPeriod(Period.of(1, 2, 3).minusYears(-1), 2, 2, 3); in test_minusYears()
837 test.minusYears(-1); in test_minusYears_overflowTooBig()
843 test.minusYears(1); in test_minusYears_overflowTooSmall()
DTCKYearMonth.java846 assertEquals(test.minusYears(1), YearMonth.of(2007, 6)); in test_minusYears_long()
852 assertEquals(test.minusYears(0), test); in test_minusYears_long_noChange_equal()
858 assertEquals(test.minusYears(-1), YearMonth.of(2009, 6)); in test_minusYears_long_negative()
864 …assertEquals(test.minusYears(20L + Year.MAX_VALUE), YearMonth.of((int) (40L - 20L - Year.MAX_VALUE… in test_minusYears_long_big()
870 test.minusYears(-1); in test_minusYears_long_invalidTooLarge()
876 test.minusYears(Long.MAX_VALUE); in test_minusYears_long_invalidTooLargeMaxSubtractMax()
882 test.minusYears(Long.MIN_VALUE); in test_minusYears_long_invalidTooLargeMaxSubtractMin()
888 test.minusYears(1); in test_minusYears_long_invalidTooSmall()
DTCKLocalDate.java1406 LocalDate t = TEST_2007_07_15.minusYears(1);
1412 LocalDate t = TEST_2007_07_15.minusYears(-1);
1418 LocalDate t = LocalDate.of(2008, 2, 29).minusYears(1);
1426 LocalDate test = LocalDate.of(40, 6, 1).minusYears(years);
1433 test.minusYears(-1);
1439 test.minusYears(Long.MAX_VALUE);
1445 test.minusYears(Long.MIN_VALUE);
1450 LocalDate.of(Year.MIN_VALUE, 1, 1).minusYears(1);
1549 LocalDate t = TEST_2007_07_15.minusYears(-1).minusWeeks(104);
DTCKLocalDateTime.java2134 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(1);
2140 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(-1);
2146 LocalDateTime t = createDateMidnight(2008, 2, 29).minusYears(1);
2152 createDateMidnight(Year.MAX_VALUE, 1, 1).minusYears(-1);
2157 createDateMidnight(Year.MIN_VALUE, 1, 1).minusYears(1);
2281 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(-1).minusWeeks(104);
DTCKZonedDateTime.java1884 ZonedDateTime test = base.minusYears(1);
1885 assertEquals(test, ZonedDateTime.of(ldt.minusYears(1), ZONE_0100));
1892 ZonedDateTime test = base.minusYears(0);
DTCKOffsetDateTime.java1069 OffsetDateTime test = base.minusYears(1);
/libcore/ojluni/src/main/java/java/time/chrono/
DThaiBuddhistDate.java396 ThaiBuddhistDate minusYears(long yearsToSubtract) { in minusYears() method in ThaiBuddhistDate
397 return super.minusYears(yearsToSubtract); in minusYears()
DMinguoDate.java396 MinguoDate minusYears(long yearsToSubtract) { in minusYears() method in MinguoDate
397 return super.minusYears(yearsToSubtract); in minusYears()
DHijrahDate.java561 HijrahDate minusYears(long yearsToSubtract) { in minusYears() method in HijrahDate
562 return super.minusYears(yearsToSubtract); in minusYears()
DJapaneseDate.java641 JapaneseDate minusYears(long yearsToSubtract) { in minusYears() method in JapaneseDate
642 return super.minusYears(yearsToSubtract); in minusYears()
DChronoLocalDateImpl.java311 D minusYears(long yearsToSubtract) { in minusYears() method in ChronoLocalDateImpl
/libcore/ojluni/src/test/java/time/test/java/time/
DTestOffsetDateTime.java270 OffsetDateTime test = base.minusYears(0); in test_minusYears_zero()
DTestLocalDate.java292 LocalDate t = TEST_2007_07_15.minusYears(0); in test_minusYears_long_noChange_same()
DTestLocalDateTime.java374 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(0); in test_minusYears_int_noChange()
/libcore/ojluni/src/main/java/java/time/
DYear.java791 public Year minusYears(long yearsToSubtract) { in minusYears() method in Year
DPeriod.java729 public Period minusYears(long yearsToSubtract) { in minusYears() method in Period
DYearMonth.java910 public YearMonth minusYears(long yearsToSubtract) { in minusYears() method in YearMonth
DOffsetDateTime.java1399 public OffsetDateTime minusYears(long years) { in minusYears() method in OffsetDateTime
DLocalDateTime.java1413 public LocalDateTime minusYears(long years) { in minusYears() method in LocalDateTime
DLocalDate.java1424 public LocalDate minusYears(long yearsToSubtract) { in minusYears() method in LocalDate
/libcore/ojluni/annotations/hiddenapi/java/time/
DOffsetDateTime.java322 public java.time.OffsetDateTime minusYears(long years) { in minusYears() method in OffsetDateTime
/libcore/ojluni/src/main/java/java/time/temporal/
DIsoFields.java610 return (int) getWeekRange(date.withDayOfYear(180).minusYears(1)).getMaximum(); in getWeek()