< previous page page_79 next page >

Page 79
These functions are written explicitly for the Western calendar. Because they are trivial to write for most calendars, given the core functions for converting date and Julian Day number, they are not implemented for every calendar in the SCDTL project. A set typically is included for the calendars in current and common use by large numbers of people, to make the function set complete for those calendars, but generally is omitted for historical or minor calendars.
Note that the days-since and days-until functions are simply special cases of the days-after and days-before functions, in which one of the dates is supplied by the date-today function. These two functions therefore depend upon the date-today function, and the caveats regarding its implementation also apply to these two functions.
5.5.3
The Time Part of the Julian Day
The Julian Day number consists of an integer part and a fractional part. The integer part is largely concerned with the date, and the fractional part in largely concerned with time in the sense of "part of one day." Thus, the date may be extracted from a complete Julian Day number, and a time of day may be extracted separately as well []. The convention of 0.0 indicating noon means that the integral and fractional parts of the Julian Day number must be considered together to extract either the date or the time.
5.5.4
The Complete Julian Day
The Julian Day number can likewise be assembled from its constituent parts of date and time [see JD_time_part () and date_and_time_to_JD () in Listing 5.10, page 98].
5.6
Some Basic Western Calendar Applications
The following discussion presents functions useful for implementing certain basic applications with the Western calendar.
The validation functions are the minimum set needed for the SCDTL system with the Western calendar.
The stamping and compression routines allow dates and times to be stored to and retrieved from compressed format.
The type functions exploit certain aspects of the perpetual calendar that can be used to simplify certain calculations, classify time periods, and explore cyclic behavior in the calendar.
The time conversion functions allow the use of two alternative formats for timekeeping  the decimal hour and the 12-hour clock. The SCDTL system uses the 24-hour clock with hour-minute-second (HMS) format as its standard time format, providing a minimum function set which allows an application to access these alternative formats.

 
< previous page page_79 next page >