From 2ac1a60fa62041345bc461edb3e7d0d74a0055cd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 22 Aug 2016 20:32:21 -0700 Subject: Adding time-parse function: wrapper for strptime. * configure: Test for strptime. * eval.c (eval_init): register time-parse intrinsic. * lib.c (time_parse): New function. * lib.h (time_parse): Declared. * txr.1: Documented. --- txr.1 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 3c824e57..44141f12 100644 --- a/txr.1 +++ b/txr.1 @@ -36516,6 +36516,34 @@ function or from the .code time-usec function. +.coNP Function @ time-parse +.synb +.mets (time-parse < format << string ) +.syne +.desc +The +.code time-parse +function scans a time description in +.meta string +according to the specification given in the +.meta format +string. If the scan is successful, a structure +of type +.code time +is returned, otherwise +.codn nil . + +The +.meta format +argument follows the same conventions as the POSIX +C library function +.codn strptime . + +Note: the availability of +.code time-parse +depends on the availability of +.codn strptime . + .coNP Methods @ time-local and @ time-utc .synb .mets << time-struct .(time-local) -- cgit v1.2.3