Language

LocalDateTime.IsEqual(IChronoLocalDateTime) Method

Definition

Checks if this date-time is equal to the specified date-time.

[Android.Runtime.Register("isEqual", "(Ljava/time/chrono/ChronoLocalDateTime;)Z", "", ApiSince=26)]
public bool IsEqual(Java.Time.Chrono.IChronoLocalDateTime? other);
[<Android.Runtime.Register("isEqual", "(Ljava/time/chrono/ChronoLocalDateTime;)Z", "", ApiSince=26)>]
abstract member IsEqual : Java.Time.Chrono.IChronoLocalDateTime -> bool
override this.IsEqual : Java.Time.Chrono.IChronoLocalDateTime -> bool

Parameters

other
IChronoLocalDateTime

the other date-time to compare to, not null

Returns

true if this date-time is equal to the specified date-time

Implements

Attributes

Remarks

Checks if this date-time is equal to the specified date-time. This checks to see if this date-time represents the same point on the local time-line as the other date-time.

LocalDateTime a = LocalDateTime.of(2012, 6, 30, 12, 00);
LocalDateTime b = LocalDateTime.of(2012, 7, 1, 12, 00);
a.isEqual(b) == false
a.isEqual(a) == true
b.isEqual(a) == false

This method only considers the position of the two date-times on the local time-line. It does not take into account the chronology, or calendar system. This is different from the comparison in compareTo(ChronoLocalDateTime), but is the same approach as ChronoLocalDateTime.timeLineOrder().

Java reference for java.time.LocalDateTime.isEqual.

Applies to