date-value parameters

Started by rrq, August 05, 2015, 06:34:31 AM

Previous topic - Next topic

rrq

Somewhere something changed for date-value, which now doesn't evaluate its parameters, but requires explicit ints. E.g.
(date-value 2015 1 1) ; is fine, but
(date-value (int "2015") 1 1) ; is not, and
(date-value '2015 1 1) ; is also not accepted


This changed for 10.6.3 sometime after May this year, but I didn't realize this until I quite recently upgraded a machine to the "final" 10.6.3 ...



Hopefully it is just a bug, or otherwise it certainly is something to make a clear note about in the documentation.

rickyboy

#1
I just confirmed this for pre-10.6.3.


$ newlisp -C
newLISP v.10.6.2 32-bit on Win32 IPv4/6 libffi, options: newlisp -h

> (date-value 2015 1 1)
1420070400
> (date-value (int "2015") 1 1)
1420070400
> (date-value '2015 1 1)
1420070400

Good catch, Ralph!
(λx. x x) (λx. x x)

Lutz

#2
This was broken when introducing list-mode for parameters in development 10.6.3. Now fixed in: http://www.newlisp.org/downloads/development/inprogress/">http://www.newlisp.org/downloads/develo ... nprogress/">http://www.newlisp.org/downloads/development/inprogress/

rrq

#3
Great. I'll get things upgraded eventually. Meanwhile I'll use the workaround of
(apply date-value (list (int "2015") 1 1))