On Nov 3, 2010, at 8:09 AM, Hugo Arregui wrote:
Sorry, I found another thing in srfi-19:
(date->string (seconds->date 12) "~B")
"Diciembre"
but, now:
(string->date (date->string (seconds->date 12) "~B") "~B")
Error: (scan-date) bad date template - date read incomplete
"~B"
#,(date 0 0 0 0 #f 12 #f -10800 ART #f #f #f #f)
I'm missing something?
The original implementation of SRFI 19 does not allow an incomplete
date as the result of `string->date' & the my re-write just follows
along. The minimum information for a complete input date, according to
`string->date', has day, month and year components; the time and
timezone components default to 0 and the locale, respectively.
Now, this "restriction" can be lifted but it is a backdoor to the
creation of invalid date objects. I will add a note in the
documentation about the situation. (It appears to be missing from the
SRFI document as well.)
Thanks.
Hugo.
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users
Sorry for the problem,
Kon
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users