diff options
| author | Paul Eggert | 2019-08-04 09:57:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-08-04 10:09:25 -0700 |
| commit | 5f3f3884a0d2a88101d330b82ef5b584cfc02aa6 (patch) | |
| tree | 1fe0f5f8779f6836748d26ecfc58cee88da8e46e /doc | |
| parent | f01597a43ea2eac38cfbb829f301c2e6e3bcbe83 (diff) | |
| download | emacs-5f3f3884a0d2a88101d330b82ef5b584cfc02aa6.tar.gz emacs-5f3f3884a0d2a88101d330b82ef5b584cfc02aa6.zip | |
Improve time function doc
* doc/misc/emacs-mime.texi (time-date): Don’t give
parse-iso8601-time-string in the example, as the function is
not autoloaded.
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
No need to call encode-time or use floating point here.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/os.texi | 4 | ||||
| -rw-r--r-- | doc/misc/emacs-mime.texi | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index b3444838d3b..7bb9833467d 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1559,7 +1559,7 @@ or more arguments. The first six arguments @var{second}, | |||
| 1559 | specify most of the components of a decoded time. If there are more | 1559 | specify most of the components of a decoded time. If there are more |
| 1560 | than six arguments the @emph{last} argument is used as @var{zone} and | 1560 | than six arguments the @emph{last} argument is used as @var{zone} and |
| 1561 | any other extra arguments are ignored, so that @code{(apply | 1561 | any other extra arguments are ignored, so that @code{(apply |
| 1562 | #\\='encode-time (decode-time ...))} works; otherwise @var{zone} defaults | 1562 | #'encode-time (decode-time ...))} works; otherwise @var{zone} defaults |
| 1563 | to the current time zone rule (@pxref{Time Zone Rules}). The decoded | 1563 | to the current time zone rule (@pxref{Time Zone Rules}). The decoded |
| 1564 | time's @var{dst} component is treated as if it was @minus{}1, and | 1564 | time's @var{dst} component is treated as if it was @minus{}1, and |
| 1565 | @var{form} takes its default value. | 1565 | @var{form} takes its default value. |
| @@ -1581,7 +1581,7 @@ You can perform simple date arithmetic by using out-of-range values for | |||
| 1581 | for example, day 0 means the day preceding the given month. | 1581 | for example, day 0 means the day preceding the given month. |
| 1582 | 1582 | ||
| 1583 | The operating system puts limits on the range of possible time values; | 1583 | The operating system puts limits on the range of possible time values; |
| 1584 | if you try to encode a time that is out of range, an error results. | 1584 | if the limits are exceeded while encoding the time, an error results. |
| 1585 | For instance, years before 1970 do not work on some systems; | 1585 | For instance, years before 1970 do not work on some systems; |
| 1586 | on others, years as early as 1901 do work. | 1586 | on others, years as early as 1901 do work. |
| 1587 | @end defun | 1587 | @end defun |
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 6e95013c186..1f384f4f270 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi | |||
| @@ -1541,10 +1541,6 @@ Here's a bunch of time/date/second/day examples: | |||
| 1541 | 1000000) | 1541 | 1000000) |
| 1542 | @result{} (905595714000000 . 1000000) | 1542 | @result{} (905595714000000 . 1000000) |
| 1543 | 1543 | ||
| 1544 | (encode-time (parse-iso8601-time-string "1998-09-12T12:21:54+0200") | ||
| 1545 | 1000000) | ||
| 1546 | @result{} (905595714000000 . 1000000) | ||
| 1547 | |||
| 1548 | (float-time '(905595714000000 . 1000000)) | 1544 | (float-time '(905595714000000 . 1000000)) |
| 1549 | @result{} 905595714.0 | 1545 | @result{} 905595714.0 |
| 1550 | 1546 | ||
| @@ -1627,7 +1623,7 @@ These are the functions available: | |||
| 1627 | Take a date and return a time. | 1623 | Take a date and return a time. |
| 1628 | 1624 | ||
| 1629 | @item float-time | 1625 | @item float-time |
| 1630 | Take a time and return seconds. (This is a built-in function.) | 1626 | Take a time and return seconds. |
| 1631 | 1627 | ||
| 1632 | @item encode-time | 1628 | @item encode-time |
| 1633 | Take seconds (and other ways to represent time, notably decoded time | 1629 | Take seconds (and other ways to represent time, notably decoded time |