語言

IChronoZonedDateTime.IsBefore(IChronoZonedDateTime) 方法

定義

檢查該日期-時間點是否早於指定日期時間。

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

參數

other
IChronoZonedDateTime

另一個日期時間比較,不是 null

傳回

如果此點發生在指定的日期時間之前,則為真

屬性

備註

檢查該日期-時間點是否早於指定日期時間。 此方法與 compareTo(java.time.chrono.ChronoZonedDateTime<?>) 中的比較不同,因為它只比較日期時間的瞬間。 這相當於使用 dateTime1.toInstant().isBefore(dateTime2.toInstant();。 此預設實作基於紀秒與奈米秒進行比較。

Java 參考 java.time.chrono.ChronoZonedDateTime.isBefore。

適用於