Tools.h++ Class Reference

Table Of Contents
RWDate(unsigned day, unsigned month, unsigned year);
Constructs an RWDate with the given day of the month, month of the year, and year.
Days should be 1-31, months should be 1-12, and the year may be specified as (for
example) 1990, or 90. The member function isValid() can be used to test whether the
results are a valid date.
RWDate(unsigned day, const char* mon, unsigned year,
const RWLocale& locale = RWLocale::global());
Constructs an RWDate with the given day of the month, month and year. The locale
argument is used to convert the month name. Days should be 1-31, months may be
specified as (for example): January, JAN, or Jan, and the year may be specified as (for
example) 1990, or 90. The member function isValid() can be used to test whether the
results are a valid date.
RWDate(istream& s,const RWLocale& locale =
RWLocale::global());
A full line is read, and converted to a date by the locale argument. The member function
isValid() must be used to test whether the results are a valid date. Because RWLocale
cannot rigorously check date input, dates created in this way should also be reconfirmed
by the user.
RWDate(const RWCString& str,
const RWLocale& locale = RWLocale::global());
The string str is converted to a date. The member function isValid() must be used to test
whether the results are a valid date. Because RWLocale cannot rigorously check date
input, dates created in this way should also be reconfirmed by the user.
RWDate(const RWTime& t,
const RWZone& zone = RWZone::local());
Constructs an RWDate from an RWTime. The time zone used defaults to local. The
member function isValid() must be used to test whether the results are a valid date.
RWDate(const struct tm*);
Constructs an RWDate from the contents of the struct tm argument members tm_year,
tm_mon, and tm_mday. Note that the numbering of months and years used in struct tm
differs from that used for RWDate and RWTime operations. struct tm is declared in the
standard include file <time.h>.
RWDate(unsigned long jd);
Construct a date from the Julian Day number jd. Note that it is possible to construct a
valid RWDate which represents a day previous to the beginning of the Gregorian calendar
for some locality. Rogue Wave doesn't know the specifics for your locality, so will not
enforce an arbitrary cutoff for "validity."