Tools.h++ Manual

104011 Tandem Computers Incorporated 21-95
21
RWCString weekDayName(const RWLocale& =
RWLocale::global());
Returns the name of the day of the week for this date, according to the optional
RWLocale
argument.
unsigned weekDay() const;
Returns the number of the day of the week for this date, where Monday = 1, ...,
Sunday = 7.
unsigned year() const;
Returns the year of this date.
Static member functions
static unsigned dayOfWeek(const char* dayName,
const RWLocale& =
RWLocale::global());
Returns the number of the day of the week corresponding to the given
dayName
. “Monday” = 1, ..., “Sunday” = 7. Names are interpreted by the
RWLocale
argument. Returns 0 if no match is found.
static unsigned daysInYear(unsigned year);
Returns the number of days in a given year.
static RWBoolean dayWithinMonth(unsigned
monthNum, unsigned dayNum,
unsigned year);
Returns
TRUE
if a day (1-31) is within a given month in a given year.
static unsigned indexOfMonth(const char*
monthName, const RWLocale& =
RWLocale::global());
Returns the number of the month (1–12) corresponding to the given
monthName
. Returns 0 for no match.
static unsigned long jday(unsigned mon, unsigned day,
unsigned year);
Returns the Julian day corresponding to the given month (1–12), day (1-31) and
year. Returns zero (0) if the date is invalid.