Re: Newbie: How should Lispers deal with date/times? Any packages?



Michael Kohout <mwkohout@xxxxxxxxx> writes:

Hi-

I've been playing around with Clozure Lisp for a little while, and I'm
looking to use it to (at least) prototype a system with it (and cl-
weblocks).

This application/prototype performs operations on dates and times.
I've done some reading and discovered decode-universal-time and get-
usersal-time and understand their encoding, but coming from a Java
background, these functions seem kind of basic.

So I was hoping one of you fine folks might know of a more robust
library. Off the top of my head it would need to be able to take a
datetime and convert it to a string(at this stage, since this is a
prototype i18n isn't necessary), verify that a privided datetime is
valid(so that it will error should someone try to create a date object
for November 31, for example) and do date math.

Any suggestions?

I think this is something so easy to roll on demand, nobody has of
late written a reusable, public library for such tasks. It'd be pretty
nice to have a defacto answer for this question, but I don't know of
one.

I have my own date-part binding function, and a date stringifying
function (it does stuff like (format-time nil "~{Month} ~{Year}
~{Day}")), but they're not something I'm ready to release as reusable
software.

Zach
.



Relevant Pages