[plt-scheme] Bug in PLT Scheme 204's SRFI 19 implementation?

From: Dirk Gerrits (dirk at gerrits.homeip.net)
Date: Wed Aug 6 14:49:45 EDT 2003

I think there may be a bug in the SRFI 19 implementation that comes with 
PLT Scheme 204. In this piece of code, date->string works fine, but 
string->date doesn't:

 > (require (lib "time.ss" "srfi" "19"))
 > (define date-format "~a ~b ~d ~H:~M:~S ~Y")
 > (define now (date->string (current-date) date-format))
 > now
"Wed Aug 06 18:01:40 2003"
 > (string->date now date-format)
. . string=?: expects type <string> as 2nd argument, given: sun; other 
arguments were: "Wed"

It seems that the lookup vectors (like tm:locale-abbr-weekday-vector) 
consist of symbols instead of strings. But if I change those symbols 
into capitalized strings, string->date works but date->string breaks. So 
the problem must lay deeper, but I don't yet understand the code well 
enough.

Can anyone help me?

Thanks in advance,

Dirk Gerrits




Posted on the users mailing list.