[racket] dbd-spgsql.plt date problem

From: YC (yinso.chen at gmail.com)
Date: Sun Nov 28 23:35:24 EST 2010

Thanks for the bug report, and the code has been patched with a newer
version on planet.

Do  (require (planet bzlib/dbd-spgsql:1:3)) to retrieve the latest version.

Cheers,
yc

On Sun, Nov 28, 2010 at 3:32 PM, prad <prad at towardsfreedom.com> wrote:

> some of this is speculation since i'm just a couple of days into the
> racket system.
>
> in the dbd-spgsql.plt package by bzlib we have:
>
> (define (sql-date->date date)
>  (match date
>         ((struct dbd:sql-date (year month day))
>          (make-date 0 0 0 0 day month day 0))))
>
> http://planet.plt-scheme.org/package-source/bzlib/dbd-spgsql.plt/1/2/spgsql.ss
>
> which i believe is supposed to get a sql date and return it as a normal
> date which you can then get stuff out of with srfi/19 using date-year
> etc.
>
> however, i'm getting the day returned instead of the year, i assume
> because the last line in the code reads "day month day" instead of
> "year month day".
>
> if i am correct, how do i request a fix?
>
> meanwhile, can i make the change myself on my machine. i can't edit the
> actual dbd-spgsql.plt file in my .racket directory because it seems to
> be byte-coded(?) though i can read it in emacs. i tried downloading the
> code from the web, saved as dbd-spgsql.rkt along with array.rkt which
> it wants as a module and then did (require "dbd-spgsql.rkt") and now i
> can get the year printing out the way i think it should be:
> (tm:date 0 0 0 0 2010 9 18 0)
> instead of what i was getting"
> (tm:date 0 0 0 0 18 9 18 0)
>
> so i can probably get it to work right eventually, but is there a way i
> can modify the actual file i'm getting from planet?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101128/0eddd42f/attachment.html>

Posted on the users mailing list.