Instant.PlusSeconds(Int64) Method

Definition

Returns a copy of this instant with the specified duration in seconds added.

[Android.Runtime.Register("plusSeconds", "(J)Ljava/time/Instant;", "", ApiSince=26)]
public Java.Time.Instant? PlusSeconds(long secondsToAdd);
[<Android.Runtime.Register("plusSeconds", "(J)Ljava/time/Instant;", "", ApiSince=26)>]
member this.PlusSeconds : int64 -> Java.Time.Instant

Parameters

secondsToAdd
Int64

long: the seconds to add, positive or negative

Returns

an Instant based on this instant with the specified seconds added, not null

Attributes

Remarks

Returns a copy of this instant with the specified duration in seconds added. This instance is immutable and unaffected by this method call.

Throws: ArithmeticException if numeric overflow occurs

Throws: DateTimeException if the result exceeds the maximum or minimum instant

Android reference for java.time.Instant.plusSeconds.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to