Reference/es_date_init
Syntax
int es_date_init( unsigned lowYYYY, unsigned highYYYY );
Arguments
unsigned lowYYYY |
Lowest year in date-id range eg. 1973. |
unsigned highYYYY |
Highest year in date-id range. eg. 2073 |
Return Codes
ES_ERROR_NONE |
Success. No errors. |
ES_ERROR_FAILTOINITDATE |
highYYYY is less than lowYYYY. |
Description
Initialize date calculator with respect to a range of years from lowYYYY to highYYYY inclusive. Years are expressed in YYYY format (eg. 2009).
highYYYY must be greater than or equal to lowYYYY . Returns ES_ERROR_FAILTOINITDATE if input range is invalid.
Any date falling in the range 1st January lowYYYY to 31st December highYYYY can be converted to a date-id via es_date_getid_c() or es_date_getid_i(). A date-id is an unsigned integer in the range 1..N, where 1 corresponds to 1st January lowYYYY and N corresponds to 31st December highYYYY . The maximum date-id N can be retrieved via es_date_getmaxid().
es_date_init() may be called multiple times to reinitialize the calculator to different date ranges.
[Back To Reference]
[Back To Reference/es_date]
|