RWDateTime, RWDate, and RWTime allow you to calculate, read, write, and otherwise manipulate dates and times in a wide variety of formats. RWDateTime is now the primary class used in the Essential Tools Module for dates and time. It combines the functionality of RWDate and RWTime and adds greater accuracy and range, extending thousands of years beyond that of RWTime.
We recommend that you use RWDateTime for representing dates and times.
Class RWDateTime represents both time and date, stored as the number of milliseconds since 1 January 1901 UTC (Coordinated Universal Time). UTC is also called GMT, for Greenwich Mean Time, five hours ahead of Eastern Standard Time, although UTC has been the preferred term since it replaced GMT in 1972.
Times given in UTC are almost always given in terms of a 24-hour clock. Thus, 14:42 (often written simply 1442) is 2:42 p.m., and 21:17 (2117) is 9:17 p.m.
UTC is used in Iceland, Liberia, Morocco, Senegal, Ghana, Mali, Mauritania, and several other countries. During the winter months, UTC is also the time scale for the United Kingdom and Ireland.
In RWDateTime, four public member functions, all starting with julian, let you manipulate the date via Modified Julian days (MJD). Modified Julian days in RWDateTime function correctly from Julian day 0, but can only be converted to month, date, year for Modified Julian days that fall within the Gregorian Calendar.
Note that the Julian day number is not the same as a date according to the Julian calendar. The Julian day number is calculated using Algorithm 199 from Communications of the ACM, Volume 6, No. 8, (Aug. 1963), p. 444 and is valid for any valid Gregorian date in the Gregorian calendar. The Julian date represents a month and day by a consecutive number starting with Jan. 1. For example, Feb. 1 is Julian 32.
The Gregorian calendar 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. RWDateTime was designed for use with dates after September 14, 1752.
©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.