aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-07-29 14:15:03 +0200
committerLars Ingebrigtsen2019-07-29 14:22:38 +0200
commit6cfda69d72cb9debefc48d0d95e341d389e7303a (patch)
tree031f4d820ab5a0113f25a4d9096c0c5fde98499d /etc
parente4f957fb0794b5616deb0abf792e11132c06e3a9 (diff)
downloademacs-6cfda69d72cb9debefc48d0d95e341d389e7303a.tar.gz
emacs-6cfda69d72cb9debefc48d0d95e341d389e7303a.zip
Add support for dealing with decoded time structures
* doc/lispref/os.texi (Time Conversion): Document the new functions that work on decoded time. (Time Calculations): Document new date/time functions. * lisp/simple.el (decoded-time-second, decoded-time-minute) (decoded-time-hour, decoded-time-day, decoded-time-month) (decoded-time-year, decoded-time-weekday, decoded-time-dst) (decoded-time-zone): New accessor functions for decoded time values. * lisp/calendar/time-date.el (date-days-in-month) (date-ordinal-to-time): New functions. (decoded-time--alter-month, decoded-time--alter-day) (decoded-time--alter-second, make-decoded-time): New functions added to manipulate decoded time structures. * src/timefns.c (Fdecode_time): Mention the new accessors. * test/lisp/calendar/time-date-tests.el: New file to test the decoded time functions and the other new functions.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c654b9ba34a..2bdbfcb8d08 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2069,6 +2069,21 @@ that acts like the '0' flag but also puts a '+' before nonnegative
2069years containing more than four digits. This is for compatibility 2069years containing more than four digits. This is for compatibility
2070with POSIX.1-2017. 2070with POSIX.1-2017.
2071 2071
2072+++
2073*** To access (or alter) the elements a decoded time value, the
2074'decoded-time-second', 'decoded-time-minute', 'decoded-time-hour',
2075'decoded-time-day', 'decoded-time-month', 'decoded-time-year',
2076'decoded-time-weekday', 'decoded-time-dst' and 'decoded-time-zone'
2077accessors can be used.
2078
2079+++
2080*** The new functions `date-days-in-month' (which will say how many
2081days there are in a month in a specific year), `date-ordinal-to-time'
2082(that computes the date of an ordinal day), `decoded-time-add' for
2083doing computations on a decoded time structure), and
2084`make-decoded-time' (for making a decoded time structure with only the
2085given keywords filled out) have been added.
2086
2072** 'define-minor-mode' automatically documents the meaning of ARG. 2087** 'define-minor-mode' automatically documents the meaning of ARG.
2073 2088
2074+++ 2089+++