Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

3.2 Calendar and Time Formats

RWDateTime allows you to calculate, read, write, and otherwise manipulate dates and times in a wide variety of formats.

3.2.1 UTC (GMT) 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.

3.2.2 Julian Day Number vs. Julian Date

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.

3.2.3 Gregorian Calendar

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.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.