Hi,
Date: Thu, 28 Aug 2014 23:28:12 -0500
From: Ed Morton <address@hidden>
The proposed function is well defined, exists in other languages and so is well
known, provides symmetry with an existing gawk function (strftime()), does not
impact any other part of the language, I would imagine is about as easy as it
can get to implement since it already exists in libraries, fits in like a
missing puzzle piece to the existing set of gawk time functions, and the only
impact to existing scripts would be if someone had their own function named
strptime() defined.
On 8/29/2014 1:42 AM, Eli Zaretskii wrote:
Some old or non-Posix platforms will not have strptime in their
standard libraries, so we will need to import e.g. the gnulib
implementation.
On Thu, Mar 28, 2019 at 11:21:36AM -0500, Ed Morton wrote:
I know it's been a while since I opened
https://lists.gnu.org/archive/html/bug-gawk/2014-08/msg00024.html
but I just came across the "time" library
(https://www.gnu.org/software/gawk/manual/html_node/Extension-Sample-Time.html#Extension-Sample-Time).
Any chance of getting strptime() added to that if not to the main
gawk code?
To do this, one would need to patch extension/configure.ac to add strptime to
AC_CHECK_FUNCS, and then we'd need a portable implementation to use on
platforms where it's not present to go in missing_d/strptime.c. I'm pretty
certain this new function will not be added to core gawk; I believe the goal is
to stabilize core gawk and add new features in extension libraries where
possible. A strptime function could potentially go in the bundled time
library, a separate bundled library, or a new library in the gawkextlib
project; I'm not sure which makes most sense. And then, of course, somebody
needs to do the work...
Regards,
Andy