![]() | ![]() | ![]() | brief-date-and-time | ![]() |
|
| &optional universal-time time-zone include-seconds
destination
=> result | [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)
| |
| 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 include-seconds is non-nil) is generated. If the universal-time value is within 120 days
of the current time, the result string includes the time of
day but not the year; otherwise, the year is included but not the time
of day.
If universal-time is not supplied or is nil, the current time
(as returned by get-universal-time is used.
If time-zone is not supplied or is nil, it defaults to the
current time zone adjusted for daylight saving time. If
time-zone is supplied, it is assumed to include any adjustment
for daylight saving time.
See also
*month-precedes-date*
brief-date
internet-text-date-and-time
iso8661-date-and-time
message-log-date-and-time
Examples
Display the current date and time:
> (brief-date-and-time) "Feb 16 12:11" >Display the current date and time (with seconds):
> (brief-date-and-time nil nil 't) "Feb 16 12:11:38" >Display the current date and time as GMT:
> (brief-date-and-time nil 0) "Feb 16 17:11" >The date and time 10 days ago:
> (brief-date-and-time (- (get-universal-time) (* 60 60 24 10))) "Feb 6 12:11" >The date and time 100 days ago:
> (brief-date-and-time (- (get-universal-time) (* 60 60 24 100))) "Nov 8, 2004" >The date and time 100 days ago (with seconds):
> (brief-date-and-time (- (get-universal-time) (* 60 60 24 100))) "Nov 8, 2004 " >
Note
This function is loaded with the :module-manager module in order
to to make it available as early as possible.
The GBBopen Project
![]() | ![]() | ![]() | brief-date-and-time | ![]() |