Instant.MinusSeconds(Int64) Method

Definition

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

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

Parameters

secondsToSubtract
Int64

long: the seconds to subtract, positive or negative

Returns

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

Attributes

Remarks

Returns a copy of this instant with the specified duration in seconds subtracted. 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.minusSeconds.

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