< previous page page_463 next page >

Page 463
Appendix B
Almost Standards
This section considers several different topics which, for various reasons, are not being issued as SCDTL standards.
In each case, the functions in question have been coded and tested; however, the source code remains hard-coded in the DTLT series of test programs. These functions are not prototyped in any of the SCDTL header files, nor are they discussed in any of the previous chapters.
B.1
Elapsed Time
Some applications, such as genealogy, require treatment of elapsed time, considered as an age in terms of years, months, and days.
Because the Western calendar does not define a calendric month with a uniform length, the month as a counting unit does not have a uniform length. Hence, any application that counts elapsed time in terms of months will have difficulty in applying the usual rules of addition and subtraction to produce consistent results.
This section looks at some functions which deal with elapsed time in terms that include the month.
B.1.1
age_in_years ()
The age_in_years () function answers the perennial question pressed upon small children by intrusive adults. Given a date of birth and today's date, the function uses the common rules for determining one's age in years.
This function is defined and tested in the test program DTLT_178.C.

 
< previous page page_463 next page >