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

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

Re: The wild and weird world of Emacs Lisp date/time arithmetic


From: Skip Montanaro
Subject: Re: The wild and weird world of Emacs Lisp date/time arithmetic
Date: Thu, 17 Dec 2020 14:51:29 -0600

> `format-time-string’ seems to use Lisp timestamps which can be created
> with `encode-time’.  The following seems to solve your initial problem:
>
> (format-time-string
>  "%Y-%m-%d"
>  (encode-time (decoded-time-add (parse-time-string "2020-05-17")
>                                 (make-decoded-time :day 1))))

Thanks, yes, I just hit on that as well. Now to actually use this
knowledge before I forget it... :-)

Skip



reply via email to

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