From: David E. Young
Subject: Common Lisp date package
Date: 
Message-ID: <387E7A24.D53D1FA4@computer.org>
Greetings. Would anyone happen to know of a nice date formatting package
for Common Lisp? I'm looking for something like the Emacs
format-date-string(). I realize I could write an FFI for C's date
formatting routines, but I'd rather keep our software pure Lisp, if
possible. If I've completely missed some existing CL date functionality,
please forgive me.

FWIW, we're running ACL 5.0 on Linux.

--

-----------------------------------------------------------------
David E. Young
Fujitsu Network Communications  "The fact that ... we still
(········@computer.org)          live well cannot ease the pain of
                                 feeling that we no longer live nobly."
                                  -- John Updike
"Programming should be fun,
 programs should be beautiful"
  -- P. Graham

From: Robert Monfera
Subject: Re: Common Lisp date package
Date: 
Message-ID: <387E9867.2C7D770D@fisec.com>
Hi David,

If you have some ad-hoc need, you can put together some simple fragment
like this:

(defun write-date-to-string (n)
    (letbind (((h m s day month year offset)
               :values (decode-universal-time (* 24 60 60 n))))
           (format nil "~2,'0D / ~2,'0D / ~4,'0D"
                   month day year)))

Probably it's easier to use encode-universal-time&co to manage time than
to link to C code.  For example, it is trivial to put together code that
does mathemathics with dates.  You can check the Hyperspec's excellent
permuted glossary at entry 'time'.

Regards
Robert

"David E. Young" wrote:
>
> Greetings. Would anyone happen to know of a nice date formatting package
> for Common Lisp? I'm looking for something like the Emacs
> format-date-string(). I realize I could write an FFI for C's date
> formatting routines, but I'd rather keep our software pure Lisp, if
> possible. If I've completely missed some existing CL date functionality,
> please forgive me.
>
> FWIW, we're running ACL 5.0 on Linux.
From: Sam Steingold
Subject: Re: Common Lisp date package
Date: 
Message-ID: <uln5sbmjt.fsf@ksp.com>
>>>> In message <·················@computer.org>
>>>> On the subject of "Common Lisp date package"
>>>> Sent on Thu, 13 Jan 2000 20:21:40 -0500
>>>> Honorable "David E. Young" <········@computer.org> writes:
 >> Greetings. Would anyone happen to know of a nice date formatting
 >> package for Common Lisp? I'm looking for something like the Emacs
 >> format-date-string(). I realize I could write an FFI for C's date
 >> formatting routines, but I'd rather keep our software pure Lisp, if
 >> possible. If I've completely missed some existing CL date
 >> functionality, please forgive me.

You might find http://www.podval.org/~sds/data/cllib.zip:date.lsp
useful.  it works with ACL 4.3, ACL 5, CLISP, CMUCL, LWL.

It is not so much date *formatting* as date *handling* - comparison,
parsing &c.

-- 
Sam Steingold (http://www.podval.org/~sds/)
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
Man has 2 states: hungry/angry and sate/sleepy.  Catch him in transition.