emacs-diffs
[Top][All Lists]
Advanced

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

master 85edcf7: decoded-time-add doc string addition


From: Lars Ingebrigtsen
Subject: master 85edcf7: decoded-time-add doc string addition
Date: Tue, 12 Oct 2021 15:55:37 -0400 (EDT)

branch: master
commit 85edcf7af5d897fcc94ef1a0efb527c4b5e2bcc5
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    decoded-time-add doc string addition
    
    * lisp/calendar/time-date.el (decoded-time-add): Add a usage example.
---
 lisp/calendar/time-date.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 0aa3816..155c349 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -406,7 +406,11 @@ entries only for the values that should be altered.
 
 For instance, if you want to \"add two months\" to TIME, then
 leave all other fields but the month field in DELTA nil, and make
-the month field 2.  The values in DELTA can be negative.
+the month field 2.  For instance:
+
+  (decoded-time-add (decode-time) (make-decoded-time :month 2))
+
+The values in DELTA can be negative.
 
 If applying a month/year delta leaves the time spec invalid, it
 is decreased to be valid (\"add one month\" to January 31st 2019



reply via email to

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