Noda Time
CompareTo Method (other)
NamespacesNodaTimeLocalDateTimeCompareTo(LocalDateTime)

[This is preliminary documentation and is subject to change.]

Indicates whether this date/time is earlier, later or the same as another one.
Declaration Syntax
C#Visual BasicVisual C++
public int CompareTo(
	LocalDateTime other
)
Public Function CompareTo ( _
	other As LocalDateTime _
) As Integer
public:
virtual int CompareTo(
	LocalDateTime other
) sealed
Parameters
other (LocalDateTime)

[Missing <param name="other"/> documentation for "M:NodaTime.LocalDateTime.CompareTo(NodaTime.LocalDateTime)"]

Return Value
A value less than zero if this date/time is earlier than other; zero if this date/time is the same as other; a value greater than zero if this date/time is later than other.
Remarks
The comparison is performed in terms of a calendar-independent notion of dates and times; the calendar systems of both LocalDateTime values are ignored. When both values use the same calendar, this is absolutely natural. However, when comparing a value in one calendar with a value in another, this can lead to surprising results. For example, 1945 in the ISO calendar corresponds to around 1364 in the Islamic calendar, so an Islamic date in year 1400 is "after" a date in 1945 in the ISO calendar.

Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)