Greetings,
I'm writing a script for parsing the output of the 'last' command, and I have found that (parse-date) gives an error. This is in 10.0.2 in Windows (both in newLISP GS and using it with cygwin)
> (sys-info)
(391 268435456 367 1 0 2048 3268 10002 6)
> (parse-date)
ERR: invalid function : (parse-date)
Is there something I'm overseeing or is it a bug in the Windows release? v10.0.2 on GNU/Linux works fine, though...
Thanks a bunch!
(parse-date)
The 'parse-date' function is not available on Windows:
http://www.newlisp.org/newlisp_manual.html#parse-date
http://www.newlisp.org/newlisp_manual.html#parse-date
Although strptime(), the C function behind 'parse-date' is a POSIX function it is not supported on Windows. The public available C implementations are pretty big and typically made only for the English locale.
I suggest parsing the date string with newLISP using regular expressions and then feeding the values to the 'date-value' function.
I suggest parsing the date string with newLISP using regular expressions and then feeding the values to the 'date-value' function.
While this may sound like a strange problem not to have been addressed and fixed long ago, the PHP language strptime function also is NOT supported in the Windows version of PHP!!!Lutz wrote:Although strptime(), the C function behind 'parse-date' is a POSIX function it is not supported on Windows.
http://us2.php.net/strptime
And PHP has many more people working on their code ;)
-- xytroxon
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
-- Let's Talk Lisp (c) 1976