Expand Minimize

Calendar.Compare | compare method

Applies to Windows and Windows Phone

Compares this calendar to another Calendar object and indicates whether the date and time of one is earlier, equal to, or later than that of the other.

Syntax

Public Function Compare(
  other As Calendar 
) As Integer

Parameters

other

Type: Calendar

The Calendar object to compare to the current calendar.

Return value

Type: Number [JavaScript] | System.Int32 [.NET] | int32 [C++]

One of the following values:

Return valueDescription
Less than zeroThe date and time of this calendar is earlier than that of other.
ZeroThe date and times are equal.
Greater than zeroThe date and time of this calendar is later than that of other.

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Globalization
Windows::Globalization [C++]

Metadata

Windows.winmd

See also

Calendar

 

 

Show:
© 2014 Microsoft