다음을 통해 공유


IChronoPeriod.Negated Method

Definition

Returns a new instance with each amount in this period negated.

[Android.Runtime.Register("negated", "()Ljava/time/chrono/ChronoPeriod;", "GetNegatedHandler:Java.Time.Chrono.IChronoPeriod, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual Java.Time.Chrono.IChronoPeriod? Negated ();
[<Android.Runtime.Register("negated", "()Ljava/time/chrono/ChronoPeriod;", "GetNegatedHandler:Java.Time.Chrono.IChronoPeriod, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Negated : unit -> Java.Time.Chrono.IChronoPeriod
override this.Negated : unit -> Java.Time.Chrono.IChronoPeriod

Returns

a ChronoPeriod based on this period with the amounts negated, not null

Attributes

Remarks

Returns a new instance with each amount in this period negated.

This returns a period with each supported unit individually negated. For example, a period of "2 years, -3 months and 4 days" will be negated to "-2 years, 3 months and -4 days". No normalization is performed.

Java documentation for java.time.chrono.ChronoPeriod.negated().

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