IChronoZonedDateTime.CompareTo(IChronoZonedDateTime) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares this date-time to another date-time, including the chronology.
[Android.Runtime.Register("compareTo", "(Ljava/time/chrono/ChronoZonedDateTime;)I", "GetCompareTo_Ljava_time_chrono_ChronoZonedDateTime_Handler:Java.Time.Chrono.IChronoZonedDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual int CompareTo(Java.Time.Chrono.IChronoZonedDateTime? other);
[<Android.Runtime.Register("compareTo", "(Ljava/time/chrono/ChronoZonedDateTime;)I", "GetCompareTo_Ljava_time_chrono_ChronoZonedDateTime_Handler:Java.Time.Chrono.IChronoZonedDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member CompareTo : Java.Time.Chrono.IChronoZonedDateTime -> int
override this.CompareTo : Java.Time.Chrono.IChronoZonedDateTime -> int
Parameters
- other
- IChronoZonedDateTime
the other date-time to compare to, not null
Returns
the first nonzero comparison of the instant, local date-time, zone ID, and chronology, in that order; otherwise zero. The local date-time comparison can itself compare chronologies.
- Attributes
Remarks
Compares this date-time to another date-time, including the chronology. The comparison is based first on the instant, then on the local date-time, then on the zone ID, then on the chronology. The default local date-time comparison compares local dates first; that comparison can use the chronology before local times are compared. It is "consistent with equals", as defined by Comparable. If all the date-time objects being compared are in the same chronology, then the additional chronology stage is not required. This default implementation performs the comparison defined above.
Java reference for java.time.chrono.ChronoZonedDateTime.compareTo.