See the Essential Tools Module Reference Guide for a complete description of RWDate. Refer to Section 3.8 for information about migrating to RWDateTime.
You can construct an RWDate in several ways:
With the current date:
This is the default constructor for RWDate. Because this method of construction must check the system date each time it creates an instance of an RWDate, constructing a large array of RWDate can be very slow. You should consider using RWDateTime in such cases.
For a given day of the month (1-31), month number (1-12) and year. Although the class supports 2-digit year specifiers, we urge you to use the 4-digit variety if possible to avoid confusion:
RWDate d1(1, 24, 2001) // 1/24/2001 RWDate d2(1, 24, 01) // 1/24/1901 (oops!)
Using locale-specific strings. If you do nothing, a default locale using United States conventions and names is applied:
RWDate d1(10, "June", 2001); // 6/10/2001
Using French month names. Assuming your system supports a French locale, you could construct an RWDate with the following:
RWDate d2("10 Juin 2025") // 6/10/2025
For detailed examples on using locales, see Chapter 8.
©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.