The es_date interface provides date arithmetic functionality. This includes the ability to add or subtract days and months to a date, to take the difference in days between any two dates and to compute the day of the week that a particular date falls on.
The date calculator must be initialized with respect to a range of years via a call to es_date_init(). Only dates within this range are subsequently valid.
es_date can convert a date supplied in either composite (i.e. YYYYMMDD) or individual (seperate year, month and day) format to a date-id and back again. A date-id is an unsigned integer representing a date as the number of days from January 1st of the beginning year in the valid range.
Calendar days can be added to or subtracted from a date by simply adding to or subtracting from a date-id.
The interface functions are as follows:
|Copyright © 2012 by Richard Brooks|