From 93f0e3d10580b0a8126018d0a05dd46b1aa84bf6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 4 Apr 2017 00:08:01 -0700 Subject: 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. --- lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 4d359f60..c9456cca 100644 --- a/lib.h +++ b/lib.h @@ -1038,6 +1038,8 @@ val make_time_utc(val year, val month, val day, val isdst); #if HAVE_STRPTIME val time_parse(val format, val string); +val time_parse_local(val format, val string); +val time_parse_utc(val format, val string); #endif void init(mem_t *(*oom_realloc)(mem_t *, size_t), val *stack_bottom); -- cgit v1.2.3