help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Insert Todays Date Plus Ten Days


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

Michael Heerdegen <address@hidden> writes:

> (defun my-insert-date (&optional arg)
>   "Insert current date at point. With prefix arg, add that many days."
>   (interactive "*P")
>   (insert
>    (format-time-string
>     "%Y_%m_%d"
>     (time-add
>      (days-to-time
>       (if arg
>         (prefix-numeric-value arg)
>           0))
>      (current-time)))))

That's really excellent;). Thanks. 

-- 
Esben Stien is address@hidden     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]