語言

OffsetDateTime.IsBefore(OffsetDateTime) 方法

定義

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

[Android.Runtime.Register("isBefore", "(Ljava/time/OffsetDateTime;)Z", "", ApiSince=26)]
public bool IsBefore(Java.Time.OffsetDateTime? other);
[<Android.Runtime.Register("isBefore", "(Ljava/time/OffsetDateTime;)Z", "", ApiSince=26)>]
member this.IsBefore : Java.Time.OffsetDateTime -> bool

參數

other
OffsetDateTime

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

傳回

若此值發生在指定日期時間之前,則為真

屬性

備註

檢查該日期-時間點是否早於指定日期時間。 此方法與 compareTo(java.time.OffsetDateTime) 中的比較不同,因為它只比較日期時間的瞬間。 這相當於使用 dateTime1.toInstant().isBefore(dateTime2.toInstant();。

Java 參考 java.time.OffsetDateTime.isBefore。

適用於