Rogue Wave Banner

Click on the banner to return to the user guide home page.

©Copyright 1996 Rogue Wave Software

Chapter 4: Using Class RWDate

Class RWDate represents a date, stored as a Julian day number. Commonly used in software, this compact representation allows rapid calendar calculations, shields you from details such as leap years, and performs easy conversions to and from conventional calendar formats.

You don't need to know Julian day numbers to benefit from their use in Tools.h++. If you are interested, the algorithm Tools.h++ uses to convert common calendar dates to Julian day numbers is given in "Algorithm 199" from Communications of the ACM, Volume 6, No. 8, Aug. 1963, p. 444.

The Gregorian calendar now used nearly world-wide was introduced by Pope Gregory XIII in 1582, and adopted in various places at various times. It was adopted by England on September 14, 1752, and thus came to the United States. We mention this because an RWDate for a day prior to the adoption of the Gregorian calendar is only valid in the sense that it is an extrapolation back from the Gregorian system. Printing such an RWDate , or using its methods to deal with specific day or month names, may have unexpected results.

Previous file Table of Contents Next file