次の月を求める - lisp-cookbook-ja/common-lisp GitHub Wiki
Common Lispの標準には universal time のような秒単位のものしかありませんので、自作するか、ライブラリを利用することになるでしょう
(defun next-month (y m)
(multiple-value-bind (ig no re d m y)
(decode-universal-time
(1+ (encode-universal-time 59 59 23 31 m y)))
(declare (ignore ig no re d))
(list y m)))
(next-month 2012 12)
;=> (2013 1)
local-time を利用
(ql:quickload :local-time)
(defun next-month (y m)
(let ((ts (local-time:timestamp+ (local-time:encode-timestamp 0 0 0 0 1 m y)
1 :month)))
(list (local-time:timestamp-year ts)
(local-time:timestamp-month ts))))
(next-month 2012 12)
;=> (2013 1)