brief-date-and-time |
| &optional universal-time&key time-zone | [Function] |
Purpose
Generate a brief date-and-time description.
Package :gbbopen-tools
(home package is :module-manager
Module :module-manager
Arguments and values
universal-time | A Universal Time (default is nil ,
which is equivalent to the value returned by
(get-universal-time) | |
time-zone | A time zone (default is nil ,
which is equivalent to the current time zone adjusted for daylight
saving time)
| |
month-precedes-date | A generalized boolean (default is
| |
year-first | A generalized boolean (default is
| |
include-seconds | A generalized boolean (default is nil )
| |
destination | Either nil , t , a stream, or a string with a fill
pointer (default is nil )
| |
result | A string or nil
|
Returns
If destination is non-nil
, then nil
; otherwise, a string.
Description
A 12-character description (15 characters, if
nil
) is generated. If the
If nil
, the current time
(as returned by get-universal-time
If time-zone is not supplied or is nil
, it defaults to the
current time zone adjusted for daylight saving time. If
If month-precedes-date is true, the month is presented in front of the date; otherwise the date precedes the month.
If year-first is supplied and is non-nil
, the year is presented in
front of the month and date; otherwise the year follows the month and date.
If include-seconds is supplied and is non-nil
, seconds are included
in the presented time.
See also
*month-precedes-date*
brief-date
full-date-and-time
http-date-and-time
internet-text-date-and-time
iso8601-date-and-time
message-log-date-and-time
very-brief-date
Examples
Display the current date and time:
> (brief-date-and-time) "Feb 16 13:11" >Display the current date and time (with seconds):
> (brief-date-and-time nil :include-seconds 't) "Feb 16 13:11:38" >Display the current date and time as GMT:
> (brief-date-and-time nil :time-zone 0) "Feb 16 18:11" >The date and time 10 days ago:
> (brief-date-and-time (- (get-universal-time) (* 60 60 24 10))) "Feb 6 13:11" >The date and time 125 days ago:
> (brief-date-and-time (- (get-universal-time) (* 60 60 24 125))) "Oct 12, 2004" >The date and time 125 days ago (with seconds, but ignored because no time of day is included for dates that are not within 120 days of the given time):
> (brief-date-and-time (- (get-universal-time) (* 60 60 24 125)) :include-seconds 't) "Oct 12, 2004 " >
Note
This function is loaded with the :module-manager
The GBBopen Project
brief-date-and-time |