Search
DateTime.compareTo Method
See Also
 






Compares the current DateTime instance with another DateTime object and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Namespace: MindFusion.Scheduling
File: DateTime.js

 Syntax

JavaScript  Copy Code

function compareTo (date)

 Parameters

date

DateTime. A DateTime object to compare with this instance.

 Return Value

Number. A value that indicates the relative order of the DateTime objects being compared.

 Remarks

The return value has these meanings: -1 - This instance precedes dateTime in the sort order. 0 - This instance occurs in the same position in the sort order as dateTime. 1 - This instance follows dateTime in the sort order.

 See Also