std-date-diff, std-date-sum | ![]() |
Does arithmetic calculations with DATE objects, which may be defined in one of the three main formats, DATE, CDATE or DATLST. The proper format is "guessed" from the value of each argument. If 19000000 < date < 20320000 then the CDATE format is assumed, as list the DATLST format otherwise the DATE format which represents the day, with possible fractional parts
Defined is addition and subtraction.
They return the calculated date in CDATE format for easier readability and convertability, not for maximal accuracy.
If accuracy in the milliseconds range is required the preferred ways is calculating via DATE numbers manually.
Note
The numeric precision with CDATE numbers is maximally kept to seconds but not to milliseconds! See STD-CDATE-DATE why CDATE is a bad format for seconds and milliseconds.
date1, date2: Numbers or list of numbers. A date in either DATE, CDATE or DATLST format. Any number between 19000000 and 20320000 is treated as special CDATE all other numbers are days and their fractional parts.
Returns the calculated date in CDATE format for easier readability and convertability, not for maximal accuracy.
None.
(std-require 'STDTIME)
#- SMALL
Defined in STDTIME