Language

OffsetDateTime.IsBefore(OffsetDateTime) Method

Definition

Checks if the instant of this date-time is before that of the specified date-time.

[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

Parameters

other
OffsetDateTime

the other date-time to compare to, not null

Returns

true if this is before the instant of the specified date-time

Attributes

Remarks

Checks if the instant of this date-time is before that of the specified date-time. This method differs from the comparison in compareTo(java.time.OffsetDateTime) in that it only compares the instant of the date-time. This is equivalent to using dateTime1.toInstant().isBefore(dateTime2.toInstant());.

Java reference for java.time.OffsetDateTime.isBefore.

Applies to