Tools.h++ Manual

104011 Tandem Computers Incorporated 21-93
21
Public member functions
RWCString asString(char format = 'x',
const RWLocale& =
RWLocale::global()) const;
Returns the date as a string, formatted by the
RWLocale
argument. Formats
are as defined the standard C library function
strftime()
.
RWBoolean between(const RWDate& a, const
RWDate& b) const;
Returns
TRUE
if this
RWDate
is between
a
and
b
, inclusive.
size_t binaryStoreSize() const;
Returns the number of bytes necessary to store the object using the global
function
RWFile& operator<<(RWFile&, const RWDate&);
int compareTo(const RWDate* d)
const;
Compares self to the
RWDate
pointed to by
d
and returns:
0 if self == *
d
;
1 if self > *
d
;
–1 if self < *
d
.
unsigned day() const;
Returns the day of the year (1-366) for this date.
unsigned dayOfMonth() const;
Returns the day of the month (1-31) for this date.
void extract(struct tm*) const;
Returns with the
struct tm
argument filled out completely, with the time
members set to 0 and
tm_isdst
set to -1.
Note – the encoding for months and days of the week used in
struct tm
differs from that used elsewhere in
RWDate
. If the date is invalid, all fields are
set to -1.
unsigned firstDayOfMonth() const;
Returns the day of the year (1-336) corresponding to the first day of this
RWDate
’s month and year.