Home
last modified time | relevance | path

Searched refs:withYear (Results 1 – 20 of 20) sorted by relevance

/libcore/ojluni/src/test/java/util/zip/
DTestLocalTime.java44 test(ldt.withYear(1968)); in main()
45 test(ldt.withYear(1970)); in main()
46 test(ldt.withYear(1982)); in main()
47 test(ldt.withYear(2037)); in main()
48 test(ldt.withYear(2100)); in main()
49 test(ldt.withYear(2106)); in main()
54 testWithTZ(tz, ldt.withYear(1982)); in main()
55 testWithTZ(tz, ldt.withYear(2037)); in main()
56 testWithTZ(tz, ldt.withYear(2100)); in main()
57 testWithTZ(tz, ldt.withYear(2106)); in main()
/libcore/ojluni/src/main/java/java/time/chrono/
DJapaneseDate.java524 return this.withYear(nvalue); in with()
526 return with(isoDate.withYear(nvalue)); in with()
528 return this.withYear(JapaneseEra.of(nvalue), yearOfEra); in with()
583 private JapaneseDate withYear(JapaneseEra era, int yearOfEra) { in withYear() method in JapaneseDate
585 return with(isoDate.withYear(year)); in withYear()
601 private JapaneseDate withYear(int year) { in withYear() method in JapaneseDate
602 return withYear(getEra(), year); in withYear()
DMinguoDate.java321 …return with(isoDate.withYear(getProlepticYear() >= 1 ? nvalue + YEARS_DIFFERENCE : (1 - nvalue) +… in with()
323 return with(isoDate.withYear(nvalue + YEARS_DIFFERENCE)); in with()
325 … return with(isoDate.withYear((1 - getProlepticYear()) + YEARS_DIFFERENCE)); in with()
DThaiBuddhistDate.java321 …return with(isoDate.withYear((getProlepticYear() >= 1 ? nvalue : 1 - nvalue) - YEARS_DIFFERENCE)); in with()
323 return with(isoDate.withYear(nvalue - YEARS_DIFFERENCE)); in with()
325 … return with(isoDate.withYear((1 - getProlepticYear()) - YEARS_DIFFERENCE)); in with()
/libcore/ojluni/src/main/java/java/time/
DYearMonth.java683 case YEAR_OF_ERA: return withYear((int) (year < 1 ? 1 - newValue : newValue)); in with()
684 case YEAR: return withYear((int) newValue); in with()
685 case ERA: return (getLong(ERA) == newValue ? this : withYear(1 - year)); in with()
702 public YearMonth withYear(int year) { in withYear() method in YearMonth
DLocalDate.java1057 case YEAR_OF_ERA: return withYear((int) (year >= 1 ? newValue : 1 - newValue)); in with()
1058 case YEAR: return withYear((int) newValue); in with()
1059 case ERA: return (getLong(ERA) == newValue ? this : withYear(1 - year)); in with()
1078 public LocalDate withYear(int year) { in withYear() method in LocalDate
DOffsetDateTime.java988 public OffsetDateTime withYear(int year) { in withYear() method in OffsetDateTime
989 return with(dateTime.withYear(year), offset); in withYear()
DZonedDateTime.java1328 public ZonedDateTime withYear(int year) { in withYear() method in ZonedDateTime
1329 return resolveLocal(dateTime.withYear(year)); in withYear()
DLocalDateTime.java979 public LocalDateTime withYear(int year) { in withYear() method in LocalDateTime
980 return with(date.withYear(year), time); in withYear()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestLocalDate.java104 date = date.withYear(date.getYear() + 1); in next()
116 date = date.withYear(date.getYear() - 1); in previous()
129 LocalDate t = TEST_2007_07_15.withYear(2007); in test_withYear_int_noChange_same()
DTestOffsetDateTime.java152 OffsetDateTime test = base.withYear(2008); in test_withYear_noChange()
DTestLocalDateTime.java126 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2007); in test_withYear_int_noChange()
/libcore/ojluni/annotations/hiddenapi/java/time/
DOffsetDateTime.java237 public java.time.OffsetDateTime withYear(int year) { in withYear() method in OffsetDateTime
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYearMonth.java577 assertEquals(test.withYear(1999), YearMonth.of(1999, 6)); in test_withYear()
583 assertEquals(test.withYear(2008), test); in test_withYear_int_noChange_equal()
589 test.withYear(Year.MIN_VALUE - 1); in test_withYear_tooLow()
595 test.withYear(Year.MAX_VALUE + 1); in test_withYear_tooHigh()
DTCKLocalDate.java467 date = date.withYear(date.getYear() + 1);
479 date = date.withYear(date.getYear() - 1);
936 LocalDate t = TEST_2007_07_15.withYear(2008);
942 TEST_2007_07_15.withYear(Year.MIN_VALUE - 1);
947 LocalDate t = LocalDate.of(2008, 2, 29).withYear(2007);
DTCKZonedDateTime.java1161 assertEquals(test, ZonedDateTime.of(ldt.withYear(2007), ZONE_0100));
1370 ZonedDateTime test = base.withYear(2007);
1371 …assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withYear(2007), ZONE_0100));
1377 ZonedDateTime test = base.withYear(2008);
DTCKLocalDateTime.java1188 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2008);
1194 TEST_2007_07_15_12_30_40_987654321.withYear(Year.MIN_VALUE - 1);
1199 LocalDateTime t = LocalDateTime.of(2008, 2, 29, 12, 30).withYear(2007);
DTCKOffsetDateTime.java808 OffsetDateTime test = base.withYear(2007);
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeFormatters.java1110 private ZonedDateTime endDate = date.withYear(2005).withMonth(1).withDayOfMonth(2); in weekDate()
/libcore/api/
Dcurrent.txt11597 method public java.time.LocalDate withYear(int);
11679 method public java.time.LocalDateTime withYear(int);
11878 method public java.time.OffsetDateTime withYear(int);
12061 method public java.time.YearMonth withYear(int);
12174 method public java.time.ZonedDateTime withYear(int);