Functions handling the different internal time formats: DATE, CDATE and datlst: list of numbers representing the calendar.
CDATE is a very AutoCAD specific real number to represent a time. It's mainly a string representation converted to a number. You may not use it for mathematical calculations (add, substract). Therefore the Julian DATE format is used.
In string context the date is a string with year, month and day, localized, e.g.: "2/21/98" or "21.2.98" and the time is formatted as "hh:mm:ss", using 24 hours.
datlst is a list of (yr mo day hh mm sec) as numbers. Some functions extend datlst to hold other values, such as day of week or ampm, but they must use indices after the above six specified.
(STD-DATE->DATLST date) ;
(STD-CDATE->DATLST cdate) ; => (yr mo day hh mm sec)
(STD-DATE->CDATE date) ;
(STD-CDATE->DATE cdate) ;
(STD-DATLST->CDATE datlst) ;
(STD-DATLST->DATE datlst) ;
*DATE-FORMAT-STRING* ; eng. default: "m/d/yy"
*TIME-FORMAT-STRING* ; eng. default: "hh:nn:ss AMPM"
(STD-TODAY) ; date as string,
; using *DATE-FORMAT-STRING*
(STD-TODAY-LONG) ; like "7.July 1998", using "d.mmmm yyyy"
(STD-CDATE->DATE-STRING cdate) ; => "2/21/98" using *DATE-FORMAT-STRING*
(STD-CDATE->TIME-STRING cdate) ; => "14:00:23" using *TIME-FORMAT-STRING*
(STD-CANONIZE-CDATE cdate) ; e.g. day>31 -> month+1
(STD-DATE-DIFF date1 date2) ; difference in days
(STD-DATE-SUM date1 date2) ; add two dates
(STD-DATLST-YEAR datlst) ; year in 4 digit format
(STD-DATLST-MONTH datlst) ; month [1-12]
(STD-DATLST-DAY datlst) ; day [1-31]
(STD-DATLST-HOUR datlst) ; hour [0-23]
(STD-DATLST-MIN datlst) ; minute [0-59]
(STD-DATLST-SECS datlst) ; seconds [0-59.9] (real)
(STD-DATLST-DOW datlst) ; day of week, [0-6] Monday - Sunday
(STD-SLEEP seconds) ; halts execution
(STD-TIME 'function) ; measures a lot, according
*TIMER-FORMAT-STRING*
(STD-TIMER-START) ; starts stopclock, => timer
(STD-TIMER-STOP timer) ; result since the given or last timer start