Tools.h++ Manual
21-186 104011 Tandem Computers Incorporated
21
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.
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 – 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 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, generated by the compiler.
RWTime operator++();
Prefix increment operator. Add one second to self, then return the results.