Commit 7ef5b8b2 authored by Glenn Morris's avatar Glenn Morris
Browse files

(calendar-current-date): Rework previous change.

parent 3ce82f97
2009-07-08 Glenn Morris <>
* calendar/calendar.el (calendar-current-date): Rework previous change.
2009-07-08 Ed Reingold <>
* calendar/calendar.el (calendar-current-date):
......@@ -1786,12 +1786,13 @@ the STRINGS are just concatenated and the result truncated."
(defun calendar-current-date (&optional offset)
"Return the current date in a list (month day year).
Optional OFFSET is number of days from current date."
(let ((now (decode-time)))
(+ (calendar-absolute-from-gregorian
(list (nth 4 now) (nth 3 now) (nth 5 now)))
(if offset offset 0)))))
Optional integer OFFSET is a number of days from the current date."
(let* ((now (decode-time))
(now (list (nth 4 now) (nth 3 now) (nth 5 now))))
(if (zerop (or offset 0))
(+ offset (calendar-absolute-from-gregorian now))))))
(defun calendar-column-to-segment ()
"Convert current column to calendar month \"segment\".
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment