All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

date-string

Function
Summary

Return a string representing the date and time.

Package

hcl

Signature

date-string &optional seconds expand-month => string

Arguments

seconds

nil (default) or an integer.

expand-month

A generalized boolean, default false.

Values

string

A string

Description

The function date-string returns a string representing the date and time (including seconds).

If seconds is nil (the default), string represents the current time. Otherwise, seconds is interpreted as a universal time and string represents that time.

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 - 20 Sep 2017

NextPrevUpTopContentsIndex