Tools.h++ Manual

104011 Tandem Computers Incorporated 21-91
21
Program output:
03/22/91
03/17/91
Public constructors
RWDate();
Default constructor. Constructs an
RWDate
with the present date.
RWDate(const RWDate&);
Copy constructor.
RWDate(unsigned day, unsigned year);
Constructs an
RWDate
with a given day of the year and a given year. The
member function
isValid()
can be used to test whether the results are a
valid date.
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.