Tools.h++ Class Reference

Table Of Contents
RWTime(unsigned hour, unsigned minute, unsigned second=0,
const RWZone& zone = RWZone::local());
Constructs a time with today's date, and the specified hour, minute, and second, relative
to the time zone zone, which defaults to local time.
RWTime(const RWDate& date, unsigned hour = 0,
unsigned minute = 0,unsigned second = 0,
const RWZone& = RWZone::local());
Constructs a time for a given date, hour, minute, and second, relative to the time zone
zone, which defaults to local time. Note that the maximum RWTime is much sooner than
maximum RWDate. (In fact, it is on Feb. 5, 2037 for platforms with 4-byte longs.) This is
a consequence of the fact that RWTime counts seconds while RWDate only deals with
full days.
RWTime(const struct tm*, const RWZone& = RWZone::local());
Constructs a time from the tm_year, tm_mon, tm_mday, tm_hour, tm_min, and tm_sec
components of the struct tm argument. These components are understood to be relative to
the time zone zone, which defaults to local time. Note that the numbering of months and
years in a struct tm differs from that used in RWTime arguments.
RWTime(const RWDate& date, const RWCString& str,
const RWZone& zone = RWZone::local(),
const RWLocale& locale = RWLocale::global());
Constructs a time for the given date, extracting the time from the string str. The string str
should contain only the time. The time is understood to be relative to the time zone zone,
which defaults to local time. The specified locale is used for formatting information . Use
function isValid() to check the results. Note: not all time string errors can be detected by
this function.
Public Member Operators
RWTime&
operator=(const RWTime&);
Assignment operator.
RWTime
operator++();
Prefix increment operator. Add one second to self, then return the results.
RWTime
operator--();
Prefix decrement operator. Subtract one second from self, then return the results.
RWTime
operator++(int);