The CTime and CTimeSpan Classes

The CTime class encapsulates the run-time time_t data type. Thus it represents absolute time values in the range 1900 to 2036, approximately. There are member functions that convert a time value to years, months, days, hours, minutes, and seconds. The class has overloaded insertion and extraction operators for archiving and for diagnostic dumping.

The CTimeSpan class extends time_t by representing relative time values. If two CTime objects are subtracted, the result is a CTimeSpan object. A CTimeSpan object can be added to or subtracted from a CTime object. A CTimeSpan value is limited to the range of ± 68 years, approximately.