Commit 3ce82f97 authored by Glenn Morris's avatar Glenn Morris
Browse files

Ed Reingold <reingold at emr.cs.iit.edu>

(calendar-current-date): Add an optional argument giving an offset from today.
parent 4904e462
2009-07-08 Ed Reingold <reingold@emr.cs.iit.edu>
* calendar/calendar.el (calendar-current-date):
Add an optional argument giving an offset from today.
2009-07-08 Glenn Morris <rgm@gnu.org>
* tutorial.el (tutorial--describe-nonstandard-key):
......
......@@ -1784,10 +1784,14 @@ the STRINGS are just concatenated and the result truncated."
(t (set-buffer buffer)
(bury-buffer))))))
(defun calendar-current-date ()
"Return the current date in a list (month day year)."
(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)))
(list (nth 4 now) (nth 3 now) (nth 5 now))))
(calendar-gregorian-from-absolute
(+ (calendar-absolute-from-gregorian
(list (nth 4 now) (nth 3 now) (nth 5 now)))
(if offset offset 0)))))
(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