Return a string representing the date and time.
hcl
date-string &optional universal-time expand-month => string
universal-time⇩ | nil (default) or an integer. |
expand-month⇩ |
A generalized boolean, default false. |
string⇩ |
A string. |
The function date-string
returns a string representing the date and time (including seconds).
If universal-time is non-nil then it is interpreted as a universal time. If universal-time is nil
(the default), then the value returned by calling get-universal-time is used. string is the printed representation of that universal time in the current time zone.
If expand-month is true then the date is written as DD MMM YYYY, with the month in characters. Otherwise, the date is written as YYYY/MM/DD, with the month in digits.
The time follows the date, separated by a space, and is always written as HH:MM:SS.
date-string
is intended as a quick way of marking some text as related to some time. For example, the function log-bug-form starts by doing something like:
(format stream "=== Log at ~a ===~2%" (date-string))
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35