Tools.h++ Manual

104011 Tandem Computers Incorporated 21-97
21
RWDate operator+(const RWDate& d,
int s);
RWDate operator+(int s, const
RWDate& d);
Returns the date s days in the future from the date
d
.
unsigned long operator-(const RWDate& d1,
const RWDate& d2);
Returns the number of days between
d1
and
d2
.
RWDate operator-(const RWDate& d,
int s);
Returns the date s days in the past from
d
.
ostream& operator<<(ostream& s, const
RWDate& d);
Outputs the date
d
on ostream
s
, according to the locale imbued in the stream
(see class
RWLocale
), or by
RWLocale::global()
if none.
istream& operator>>(istream& s,
RWDate& t);
Reads
t
from
istream s
. One full line is read, and the string contained is
converted according to the locale imbued in the stream (see class
RWLocale
),
or by
RWLocale::global()
if none. The function
RWDate::isValid()
must be used to test whether the results are a valid date.
RWvostream& operator<<(RWvostream&, const
RWDate& date);
RWFile& operator<<(RWFile&, const
RWDate& date);
Saves the date
date
to a virtual stream or
RWFile
, respectively.
RWvistream& operator>>(RWvistream&,
RWDate& date);
RWFile& operator>>(RWFile&, RWDate&
date);
Restores the date into
date
from a virtual stream or
RWFile
, respectively,
replacing the previous contents of
date
.