Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWDate
Synopsis
Description
Persistence
Example
Public Constructors
Public Member Operators
Public Member Functions
Static Public Member Functions
Related Global Operators
Synopsis
#include <rw/rwdate.h>RWDate a; // Construct today's date
Description
Class RWDate represents a date, stored as a Julian day number. The member function isValid()
can be used to determine whether an RWDate is a valid date. For example, isValid() would
return FALSE for the date 29 February 1991 because 1991 is not a leap year. See "Using Class
RWDate" in the Tools.h++ User's Guide.
RWDate's can be converted to and from RWTime's, and to and from the Standard C library type
struct tm defined in <time.h>.
Note that using a 2-digit year specifier in your code may lead to less-than-perfect behavior at
the turn of the century. We urge you to create programs that are "millenially correct" by using
4-digit year specifiers.
Note that because the default constructor for this class creates an instance holding the current
date, constructing a large array of RWDate may be slow.
RWDate v[5000]; // Figures out the current date 5000 times