/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKClock_Tick.java | 88 …Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000_000).toInstant(), PARIS), Duration.ofMil… in test_tick_ClockDuration_250millis() 89 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000_000).toInstant()); in test_tick_ClockDuration_250millis() 96 …Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000).toInstant(), PARIS), Duration.ofNanos(2… in test_tick_ClockDuration_250micros() 97 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000).toInstant()); in test_tick_ClockDuration_250micros() 104 … Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i).toInstant(), PARIS), Duration.ofNanos(20)); in test_tick_ClockDuration_20nanos() 105 assertEquals(test.instant(), ZDT.withNano((i / 20) * 20).toInstant()); in test_tick_ClockDuration_20nanos()
|
D | TCKLocalTime.java | 1236 t = t.withNano(1); in test_withNanoOfSecond_normal() 1238 t = t.withNano(10); in test_withNanoOfSecond_normal() 1240 t = t.withNano(100); in test_withNanoOfSecond_normal() 1242 t = t.withNano(999999999); in test_withNanoOfSecond_normal() 1248 LocalTime t = TEST_12_30_40_987654321.withNano(987654321); in test_withNanoOfSecond_noChange_equal() 1254 LocalTime t = LocalTime.of(0, 0, 0, 1).withNano(0); in test_withNanoOfSecond_toMidnight_equal() 1260 LocalTime t = LocalTime.of(12, 0, 0, 1).withNano(0); in test_withNanoOfSecond_toMidday_equal() 1266 TEST_12_30_40_987654321.withNano(-1); in test_withNanoOfSecond_nanoTooLow() 1271 TEST_12_30_40_987654321.withNano(1000000000); in test_withNanoOfSecond_nanoTooHigh()
|
D | TCKLocalDateTime.java | 1341 t = t.withNano(1); 1343 t = t.withNano(10); 1345 t = t.withNano(100); 1347 t = t.withNano(999999999); 1353 TEST_2007_07_15_12_30_40_987654321.withNano(-1); 1358 TEST_2007_07_15_12_30_40_987654321.withNano(1000000000); 1367 …007_07_15_12_30_40_987654321.truncatedTo(SECONDS), TEST_2007_07_15_12_30_40_987654321.withNano(0));
|
D | TCKOffsetTime.java | 857 OffsetTime test = base.withNano(15); 864 OffsetTime test = base.withNano(1); 874 … assertEquals(TEST_11_30_59_500_PONE.truncatedTo(SECONDS), TEST_11_30_59_500_PONE.withNano(0));
|
D | TCKZonedDateTime.java | 1551 ZonedDateTime test = base.withNano(15); 1552 … assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withNano(15), ZONE_0100)); 1558 ZonedDateTime test = base.withNano(500); 1568 assertEquals(TEST_DATE_TIME.truncatedTo(SECONDS), TEST_DATE_TIME.withNano(0));
|
D | TCKOffsetDateTime.java | 902 OffsetDateTime test = base.withNano(15); 912 …_2008_6_30_11_30_59_000000500.truncatedTo(SECONDS), TEST_2008_6_30_11_30_59_000000500.withNano(0));
|
/libcore/ojluni/src/main/java/java/time/ |
D | LocalTime.java | 832 case NANO_OF_SECOND: return withNano((int) newValue); in with() 834 case MICRO_OF_SECOND: return withNano((int) newValue * 1000); in with() 836 case MILLI_OF_SECOND: return withNano((int) newValue * 1000_000); in with() 914 public LocalTime withNano(int nanoOfSecond) { in withNano() method in LocalTime
|
D | OffsetTime.java | 789 public OffsetTime withNano(int nanoOfSecond) { in withNano() method in OffsetTime 790 return with(time.withNano(nanoOfSecond), offset); in withNano()
|
D | OffsetDateTime.java | 1099 public OffsetDateTime withNano(int nanoOfSecond) { in withNano() method in OffsetDateTime 1100 return with(dateTime.withNano(nanoOfSecond), offset); in withNano()
|
D | ZonedDateTime.java | 1486 public ZonedDateTime withNano(int nanoOfSecond) { in withNano() method in ZonedDateTime 1487 return resolveLocal(dateTime.withNano(nanoOfSecond)); in withNano()
|
D | LocalDateTime.java | 1088 public LocalDateTime withNano(int nanoOfSecond) { in withNano() method in LocalDateTime 1089 LocalTime newTime = time.withNano(nanoOfSecond); in withNano()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalDateTime.java | 206 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withNano(987654321); in test_withNanoOfSecond_noChange() 212 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).withNano(0); in test_withNanoOfSecond_toMidnight() 218 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).withNano(0); in test_withNanoOfSecond_toMidday()
|
D | TestOffsetDateTime.java | 196 OffsetDateTime test = base.withNano(1); in test_withNanoOfSecond_noChange()
|
/libcore/ojluni/annotations/hiddenapi/java/time/ |
D | OffsetDateTime.java | 265 public java.time.OffsetDateTime withNano(int nanoOfSecond) { in withNano() method in OffsetDateTime
|