[alexandria-devel] format-mixed-radix-number, format-duration

Attila Lendvai attila.lendvai at gmail.com
Sat Jan 26 05:38:02 UTC 2008


> wonder whether the functions below are candidates for alexandria:
>
> ;;; Examples
> (format-duration nil 86401.5) => "1d0h0m1.50s"
>
> (format-duration nil 86401 :format '(" ~,2F second~:P" " ~D
> minute~:P" " ~D hour~:P" " ~D day~:P")) => " 1 day 0 hours 0 minutes
> 1.00 second"

imho, such functionality should go into a lib that is specialized for
date/time handling, because you solve one problem related to
dates/time with this, but there are many more. where should the line
be draw?

i suggest to check out the local-time project. i'll also take a look
how these functions would fit in there.

-- 
 attila



More information about the alexandria-devel mailing list