다음을 통해 공유


IChronoLocalDate.IsBefore(IChronoLocalDate) Method

Definition

Checks if this date is before the specified date ignoring the chronology.

[Android.Runtime.Register("isBefore", "(Ljava/time/chrono/ChronoLocalDate;)Z", "GetIsBefore_Ljava_time_chrono_ChronoLocalDate_Handler:Java.Time.Chrono.IChronoLocalDate, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual bool IsBefore (Java.Time.Chrono.IChronoLocalDate? other);
[<Android.Runtime.Register("isBefore", "(Ljava/time/chrono/ChronoLocalDate;)Z", "GetIsBefore_Ljava_time_chrono_ChronoLocalDate_Handler:Java.Time.Chrono.IChronoLocalDate, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member IsBefore : Java.Time.Chrono.IChronoLocalDate -> bool
override this.IsBefore : Java.Time.Chrono.IChronoLocalDate -> bool

Parameters

other
IChronoLocalDate

the other date to compare to, not null

Returns

true if this is before the specified date

Attributes

Remarks

Checks if this date is before the specified date ignoring the chronology.

This method differs from the comparison in #compareTo in that it only compares the underlying date and not the chronology. This allows dates in different calendar systems to be compared based on the time-line position. This is equivalent to using date1.toEpochDay() < date2.toEpochDay().

This default implementation performs the comparison based on the epoch-day.

Java documentation for java.time.chrono.ChronoLocalDate.isBefore(java.time.chrono.ChronoLocalDate).

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