Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
BOOL operator==( const COleDateTimeSpan& dateSpan ) const;
BOOL operator!=( const COleDateTimeSpan& dateSpan ) const;
BOOL operator<( const COleDateTimeSpan& dateSpan ) const;
BOOL operator>( const COleDateTimeSpan& dateSpan ) const;
BOOL operator<=( const COleDateTimeSpan& dateSpan ) const;
BOOL operator>=( const COleDateTimeSpan& dateSpan ) const;
Remarks
These operators compare two date/time-span values and return nonzero if the condition is true; otherwise 0.
Note The return value of the ordering operations (<, <=, >, >=) is undefined if the status of either operand is null or invalid. The equality operators (==, !=) consider the status of the operands.
Example
COleDateTimeSpan spanOne(3, 12, 0, 0); // 3 days and 12 hours
COleDateTimeSpan spanTwo(spanOne); // 3 days and 12 hours
BOOL b;
b = spanOne == spanTwo; // TRUE
spanTwo.SetStatus(COleDateTimeSpan::invalid);
b = spanOne == spanTwo; // FALSE, different status
b = spanOne != spanTwo; // TRUE, different status
b = spanOne < spanTwo; // FALSE, same value
b = spanOne > spanTwo; // FALSE, same value
b = spanOne <= spanTwo; // TRUE, same value
b = spanOne >= spanTwo; // TRUE, same value
Note The last four lines of the preceding example will ASSERT in debug mode.
COleDateTimeSpan ts1(100.0); // one hundred days
COleDateTimeSpan ts2(110.0); // ten more days
ASSERT( (ts1 != ts2) && (ts1 < ts2) && (ts1 <= ts2) );