开发者

Storing dates in Common Lisp

开发者 https://www.devze.com 2023-01-24 20:21 出处:网络
What\'s the proper way to store dates in Common Lisp? The closest thing I found to an answer is this, which doesn开发者_开发知识库\'t really seem to cut it for me.How about ENCODE-UNIVERSAL-TIME?

What's the proper way to store dates in Common Lisp? The closest thing I found to an answer is this, which doesn开发者_开发知识库't really seem to cut it for me.


How about ENCODE-UNIVERSAL-TIME?

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


If you want to store a date converted to 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))
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号