[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Insert Todays Date Plus Ten Days

From: Esben Stien
Subject: Insert Todays Date Plus Ten Days
Date: Mon, 22 Oct 2012 01:53:24 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

I'm using this to insert todays date: 

;;insert current date in ISO format,timestamp
  (defun insert-date (prefix)
    "Insert the current date. With prefix-argument, use ISO format. With
   two prefix arguments, write out the day and month name."
    (interactive "P")
    (let ((format (cond
     ;;              ((not prefix) "%d.%m.%Y")
                   ((not prefix) "%Y-%m-%d")
                   ((equal prefix '(4)) "%Y-%m-%d")
                   ((equal prefix '(16)) "%A, %d. %B %Y")))
          (system-time-locale "nb_NO"))
      (insert (format-time-string format))))

, but I'm unsure how I can insert the date in 10 days. 

There doesn't seem to be a way to do arithmetic on

Any pointers as to how I can do this?. 

Esben Stien is b0ef@e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e 
           jid:b0ef@    n     n

reply via email to

[Prev in Thread] Current Thread [Next in Thread]