TimeStamp - A replacement for COleDateTime and COleDateTimeSpan
Like Chris Sells' replacement, it was also started from the MFC version, and uses system calls for dates and times. However, internally, the class uses a method called getAsDouble to determine whether an OLE DATE format is used or a double for the time span is used. It incorporates all the functionality of COleDateTime and COleDataTimeSpan, but it uses a small character to start the method names.
An example of using the TimeStamp class is:
// set start and end of time window TimeStamp start; start.getCurTimeStamp(); TimeStamp end = start + TimeStamp::getdays (7);
There are static methods for returning a time interval, as in the above example, which can then be added to another time stamp to produce an end time.
Lastly, there are several string methods for getting the date time as a string. These methods simplify usage so that you don't have to pull up help for GetTimeFormat/GetDateFormat to get the time as a string.
Download source - 5 KB TimeStamp_src.zip

Comments
Bug in code...
Posted by Legacy on 10/16/2003 12:00amOriginally posted by: ron
The setDateTime function used the minutes param as the month param....
Reply