Home
last modified time | relevance | path

Searched refs:plusSeconds (Results 1 – 25 of 29) sorted by relevance

12

/libcore/ojluni/src/main/java/java/time/
DInstant.java849 case SECONDS: return plusSeconds(amountToAdd); in plus()
850 … case MINUTES: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_MINUTE)); in plus()
851 case HOURS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_HOUR)); in plus()
852 … case HALF_DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY / 2)); in plus()
853 case DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY)); in plus()
871 public Instant plusSeconds(long secondsToAdd) { in plusSeconds() method in Instant
988 return plusSeconds(Long.MAX_VALUE).plusSeconds(1); in minusSeconds()
990 return plusSeconds(-secondsToSubtract); in minusSeconds()
DDuration.java706 …case MICROS: return plusSeconds((amountToAdd / (1000_000L * 1000)) * 1000).plusNanos((amountToAdd … in plus()
708 case SECONDS: return plusSeconds(amountToAdd); in plus()
710 return plusSeconds(Math.multiplyExact(unit.getDuration().seconds, amountToAdd)); in plus()
713 return plusSeconds(duration.getSeconds()).plusNanos(duration.getNano()); in plus()
768 public Duration plusSeconds(long secondsToAdd) { in plusSeconds() method in Duration
914 …return (secondsToSubtract == Long.MIN_VALUE ? plusSeconds(Long.MAX_VALUE).plusSeconds(1) : plusSec… in minusSeconds()
DOffsetDateTime.java696 LocalDateTime adjusted = dateTime.plusSeconds(difference); in withOffsetSameInstant()
1311 public OffsetDateTime plusSeconds(long seconds) { in plusSeconds() method in OffsetDateTime
1312 return with(dateTime.plusSeconds(seconds), offset); in plusSeconds()
1501 …return (seconds == Long.MIN_VALUE ? plusSeconds(Long.MAX_VALUE).plusSeconds(1) : plusSeconds(-seco… in minusSeconds()
DZonedDateTime.java374 localDateTime = localDateTime.plusSeconds(trans.getDuration().getSeconds()); in ofLocal()
1757 public ZonedDateTime plusSeconds(long seconds) { in plusSeconds() method in ZonedDateTime
1758 return resolveInstant(dateTime.plusSeconds(seconds)); in plusSeconds()
2003 …return (seconds == Long.MIN_VALUE ? plusSeconds(Long.MAX_VALUE).plusSeconds(1) : plusSeconds(-seco… in minusSeconds()
DLocalTime.java862 case SECOND_OF_DAY: return plusSeconds(newValue - toSecondOfDay()); in with()
1067 case SECONDS: return plusSeconds(amountToAdd); in plus()
1133 public LocalTime plusSeconds(long secondstoAdd) { in plusSeconds() method in LocalTime
1269 return plusSeconds(-(secondsToSubtract % SECONDS_PER_DAY)); in minusSeconds()
DOffsetTime.java590 LocalTime adjusted = time.plusSeconds(difference); in withOffsetSameInstant()
922 public OffsetTime plusSeconds(long seconds) { in plusSeconds() method in OffsetTime
923 return with(time.plusSeconds(seconds), offset); in plusSeconds()
DLocalDateTime.java1177 case SECONDS: return plusSeconds(amountToAdd); in plus()
1314 public LocalDateTime plusSeconds(long seconds) { in plusSeconds() method in LocalDateTime
/libcore/ojluni/src/test/java/time/test/java/time/
DTestDuration.java97 assertSame(t.plusSeconds(0), t); in plusSeconds_zeroReturnsThis()
103 assertSame(t.plusSeconds(1), Duration.ZERO); in plusSeconds_zeroSingleton()
DTestLocalDateTime.java308 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(0); in test_plusSeconds_noChange()
314 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(24 * 60 * 60); in test_plusSeconds_noChange_oneDay_same()
320 …LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59)).plusSeconds(1); in test_plusSeconds_toMidnight()
326 …LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59)).plusSeconds(1); in test_plusSeconds_toMidday()
DTestInstantSource.java95 assertEquals(test.instant(), instant.plusSeconds(120));
DTestOffsetDateTime.java255 OffsetDateTime test = base.plusSeconds(0); in test_plusSeconds_zero()
/libcore/ojluni/src/test/java/nio/file/attribute/
DBasicFileAttributeViewCreationTimeTest.java101 Instant plusHour = Instant.now().plusSeconds(60L * 60L); in test()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransitionRule.java619 return dateTime.plusSeconds(difference); in createDateTime()
623 return dateTime.plusSeconds(difference); in createDateTime()
DZoneOffsetTransition.java294 return transition.plusSeconds(getDurationSeconds()); in getDateTimeAfter()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTimeImpl.java306 case SECONDS: return plusSeconds(amountToAdd); in plus()
328 ChronoLocalDateTimeImpl<D> plusSeconds(long seconds) { in plusSeconds() method in ChronoLocalDateTimeImpl
DChronoZonedDateTimeImpl.java150 localDateTime = localDateTime.plusSeconds(trans.getDuration().getSeconds()); in ofBest()
/libcore/ojluni/src/test/java/util/zip/
DTestExtraTime.java329 FileTime atime = FileTime.from(now.plusSeconds(7)); in testNullMtime()
330 FileTime mtime = FileTime.from(now.plusSeconds(13)); in testNullMtime()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java472 assertEquals(test.previousTransition(prev.getInstant().plusSeconds(1)), prev); in test_London_previousTransition_historic()
484 assertEquals(test.previousTransition(last.getInstant().plusSeconds(1)), last); in test_London_previousTransition_rulesBased()
499 assertEquals(test.previousTransition(b.getInstant().plusSeconds(1)), b); in test_London_previousTransition_rulesBased()
503 assertEquals(test.previousTransition(a.getInstant().plusSeconds(1)), a); in test_London_previousTransition_rulesBased()
1077 …stdOffsetTransition1 = OffsetDateTime.of(time_of_stdOffsetTransition1, stdOffset1).plusSeconds(1);; in test_of()
1082 …llOffsetTransition1 = OffsetDateTime.of(time_of_wallOffsetTransition1, wallOffset1).plusSeconds(1); in test_of()
1087 …llOffsetTransition2 = OffsetDateTime.of(time_of_wallOffsetTransition2, wallOffset2).plusSeconds(1); in test_of()
1092 …llOffsetTransition3 = OffsetDateTime.of(time_of_wallOffsetTransition3, wallOffset3).plusSeconds(1); in test_of()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalTime.java1638 t = t.plusSeconds(1); in test_plusSeconds_one()
1698 LocalTime t = base.plusSeconds(seconds); in test_plusSeconds_fromZero()
1707 LocalTime t = TEST_12_30_40_987654321.plusSeconds(0); in test_plusSeconds_noChange_equal()
1713 LocalTime t = TEST_12_30_40_987654321.plusSeconds(24 * 60 * 60); in test_plusSeconds_noChange_oneDay_equal()
1719 LocalTime t = LocalTime.of(23, 59, 59).plusSeconds(1); in test_plusSeconds_toMidnight_equal()
1725 LocalTime t = LocalTime.of(11, 59, 59).plusSeconds(1); in test_plusSeconds_toMidday_equal()
2351 LocalDateTime end = start.plusSeconds(2).atDate(LocalDate.of(2010, 6, 30));
2428 t = t.plusSeconds(1);
2463 t = t.plusSeconds(1);
DTCKInstant.java993 t = t.plusSeconds(amount);
1001 t.plusSeconds(Long.MAX_VALUE);
1007 t.plusSeconds(Long.MIN_VALUE);
1840 OffsetDateTime end = start.plusSeconds(2).atOffset(ZoneOffset.ofHours(2));
DTCKLocalDateTime.java357 Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC);
801 assertEquals(test, base.plusSeconds(i));
1872 t = t.plusSeconds(1);
1940 LocalDateTime t = base.plusSeconds(seconds);
1950 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(24 * 60 * 60);
3007 LocalDateTime a = LocalDateTime.of(1970, 1, 1, 0, 0).plusSeconds(j);
DTCKOffsetTime.java942 OffsetTime test = base.plusSeconds(1);
949 OffsetTime test = base.plusSeconds(0);
1110 OffsetDateTime offsetDateTime = offsetTime.plusSeconds(3).atDate(LocalDate.of(1980, 2, 10));
DTCKOffsetDateTime.java1003 OffsetDateTime test = base.plusSeconds(1);
1179 ZonedDateTime zdt = odt.plusSeconds(3).toZonedDateTime();
1272 … OffsetDateTime a = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC).plusSeconds(i);
/libcore/ojluni/annotations/hiddenapi/java/time/
DDuration.java201 public java.time.Duration plusSeconds(long secondsToAdd) { in plusSeconds() method in Duration
DOffsetDateTime.java305 public java.time.OffsetDateTime plusSeconds(long seconds) { in plusSeconds() method in OffsetDateTime

12