Year.CompareTo(Year) Method

Definition

Compares this year to another year.

[Android.Runtime.Register("compareTo", "(Ljava/time/Year;)I", "", ApiSince=26)]
public int CompareTo(Java.Time.Year? other);
[<Android.Runtime.Register("compareTo", "(Ljava/time/Year;)I", "", ApiSince=26)>]
member this.CompareTo : Java.Time.Year -> int

Parameters

other
Year

the other year to compare to, not null

Returns

the comparator value, that is less than zero if this is before other, zero if they are equal, or greater than zero if this is after other

Attributes

Remarks

Compares this year to another year. The comparison is based on the value of the year. It is "consistent with equals", as defined by Comparable.

Java reference for java.time.Year.compareTo.

Applies to