mc #7532(2008/09/01 05:01 GMT) [ Common Lisp ] Rating0/0=0.00
see: net-telent-date
1 2 3 4 5 6 7 8 9 10 11
(require :net-telent-date) (require :lw-compat) (defpackage :doukaku-204 (:use :cl :date :lispworks)) (in-package :doukaku-204) (defun date-ex (sec &optional time-string) (when-let (ut (if time-string (parse-time time-string) (get-universal-time))) (universal-time-to-rfc2822-date (+ ut sec))))
Rating0/0=0.00-0+
[ reply ]
mc
#7532()
[
Common Lisp
]
Rating0/0=0.00
他にも様々な形式をパーズしてくれるライブラリです。
CLの引数の順番はお題の例とは逆にしています。
(date-ex 40 "Thu, 28 Aug 2007 23:59:25 +0900")
;=> "Thu, 30 Aug 2007 00:00:05 +0900"
(date-ex -3600)
;=> "Mon, 01 Sep 2008 17:56:51 +0900"
see: net-telent-date
(require :net-telent-date) (require :lw-compat) (defpackage :doukaku-204 (:use :cl :date :lispworks)) (in-package :doukaku-204) (defun date-ex (sec &optional time-string) (when-let (ut (if time-string (parse-time time-string) (get-universal-time))) (universal-time-to-rfc2822-date (+ ut sec))))Rating0/0=0.00-0+
[ reply ]