Storing dates in Common Lisp

What is the correct way to store dates in Common Lisp? The closest thing I found for an answer is this , which doesn't actually cut it for me.

+5
source share
2 answers

How about ENCODE-UNIVERSAL-TIME?

(defparameter *my-birth-date* (encode-universal-time 0 0 0 14 2 1984))
+6
source

If you want to keep the date converted to a string, you can use the following:

(multiple-value-bind
  (s m h d mm y dw dst-p tz) (get-decoded-time)
     (format nil "~D\/~D\/~D" date month year))
+1
source

All Articles