CTime::operator +=,-=

Syntax

const CTime& operator +=( CTimeSpan timeSpan );

const CTime& operator –=( CTimeSpan timeSpan );

Remarks

These operators allow you to add and subtract a CTimeSpan object to and from this CTime object.

Example

CTime t( 1999, 3, 19, 22, 15, 0 ); // 10:15PM March 19, 1999

t += CTimeSpan( 0, 1, 0, 0 ); // one hour exactly

ASSERT( t.GetHour() == 23 );