diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-04 00:08:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-04 00:08:01 -0700 |
commit | 93f0e3d10580b0a8126018d0a05dd46b1aa84bf6 (patch) | |
tree | f16479c293e657f411cde1346f37df224fe821f2 /txr.1 | |
parent | d2aac0db3dbabc163aad4722025db6051f56d804 (diff) | |
download | txr-93f0e3d10580b0a8126018d0a05dd46b1aa84bf6.tar.gz txr-93f0e3d10580b0a8126018d0a05dd46b1aa84bf6.tar.bz2 txr-93f0e3d10580b0a8126018d0a05dd46b1aa84bf6.zip |
New time-parse-local and time-parse-utc functions.
* eval.c (eval_init): Register intrinsic functions
time-parse-local and time-parse-utc.
* lib.c (strptime_wrap): New static function.
(time_parse): Now implemented as by call to strptime_wrap.
(time_parse_local, time_parse_utc): New functions.
These get the time_t time from struct tm without
constructing the intermediate Lisp structure.
* lib.h (time_parse_local, time_parse_utc): Declared.
* txr.1: Documented new functions.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -43587,9 +43587,11 @@ function or from the .code time-usec function. -.coNP Function @ time-parse +.coNP Functions @, time-parse @ time-parse-local and @ time-parse-utc .synb .mets (time-parse < format << string ) +.mets (time-parse-local < format << string ) +.mets (time-parse-utc < format << string ) .syne .desc The @@ -43620,8 +43622,26 @@ if interpreted in the UTC timezone as by the .meta time-utc method. -Note: the availability of -.code time-parse +The +.code time-parse-local +and +.code time-parse-utc +functions return an integer time value: the same value +that would be returned by the +.code time-local +and +.code time-utc +methods, respectively, when applied to the structure +object returned by +.codn time-parse . +Thus, these equivalences hold: + +.cblk + (time-parse-local f s) <--> (time-parse f s).(time-local) + (time-parse-utc f s) <--> (time-parse f s).(time-utc) +.cble + +Note: the availability of these three functions depends on the availability of .codn strptime . |