diff options
| author | Lars Ingebrigtsen | 2021-10-12 21:55:26 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-10-12 21:55:26 +0200 |
| commit | 85edcf7af5d897fcc94ef1a0efb527c4b5e2bcc5 (patch) | |
| tree | a5fd5d846454840f06ebcfa92db9237f5897640e | |
| parent | 83195c57e6136a8efdeed243e9fffbc1da344f7a (diff) | |
| download | emacs-85edcf7af5d897fcc94ef1a0efb527c4b5e2bcc5.tar.gz emacs-85edcf7af5d897fcc94ef1a0efb527c4b5e2bcc5.zip | |
decoded-time-add doc string addition
* lisp/calendar/time-date.el (decoded-time-add): Add a usage example.
| -rw-r--r-- | lisp/calendar/time-date.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 0aa38166bc1..155c34927fd 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. | |||
| 406 | 406 | ||
| 407 | For instance, if you want to \"add two months\" to TIME, then | 407 | For instance, if you want to \"add two months\" to TIME, then |
| 408 | leave all other fields but the month field in DELTA nil, and make | 408 | leave all other fields but the month field in DELTA nil, and make |
| 409 | the month field 2. The values in DELTA can be negative. | 409 | the month field 2. For instance: |
| 410 | |||
| 411 | (decoded-time-add (decode-time) (make-decoded-time :month 2)) | ||
| 412 | |||
| 413 | The values in DELTA can be negative. | ||
| 410 | 414 | ||
| 411 | If applying a month/year delta leaves the time spec invalid, it | 415 | If applying a month/year delta leaves the time spec invalid, it |
| 412 | is decreased to be valid (\"add one month\" to January 31st 2019 | 416 | is decreased to be valid (\"add one month\" to January 31st 2019 |