aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-07-29 14:15:03 +0200
committerLars Ingebrigtsen2019-07-29 14:22:38 +0200
commit6cfda69d72cb9debefc48d0d95e341d389e7303a (patch)
tree031f4d820ab5a0113f25a4d9096c0c5fde98499d /src
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 'src')
-rw-r--r--src/timefns.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timefns.c b/src/timefns.c
index 3b7ed460222..cce9dd51ba9 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -1326,6 +1326,12 @@ the TZ environment variable. It can also be a list (as from
1326`current-time-zone') or an integer (the UTC offset in seconds) applied 1326`current-time-zone') or an integer (the UTC offset in seconds) applied
1327without consideration for daylight saving time. 1327without consideration for daylight saving time.
1328 1328
1329To access (or alter) the elements in the time value, the
1330`decoded-time-second', `decoded-time-minute', `decoded-time-hour',
1331`decoded-time-day', `decoded-time-month', `decoded-time-year',
1332`decoded-time-weekday', `decoded-time-dst' and `decoded-time-zone'
1333accessors can be used.
1334
1329The list has the following nine members: SEC is an integer between 0 1335The list has the following nine members: SEC is an integer between 0
1330and 60; SEC is 60 for a leap second, which only some operating systems 1336and 60; SEC is 60 for a leap second, which only some operating systems
1331support. MINUTE is an integer between 0 and 59. HOUR is an integer 1337support. MINUTE is an integer between 0 and 59. HOUR is an integer