Duration.Abs Method

Definition

Returns a copy of this duration with a positive length.

[Android.Runtime.Register("abs", "()Ljava/time/Duration;", "", ApiSince=26)]
public Java.Time.Duration? Abs();
[<Android.Runtime.Register("abs", "()Ljava/time/Duration;", "", ApiSince=26)>]
member this.Abs : unit -> Java.Time.Duration

Returns

a Duration based on this duration with an absolute length, not null

Attributes

Remarks

Returns a copy of this duration with a positive length. This method returns a positive duration by effectively removing the sign from any negative total length. For example, PT-1.3S will be returned as PT1.3S. This instance is immutable and unaffected by this method call.

Java reference for java.time.Duration.abs.

Applies to