guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: srfi-19


From: Neil Jerram
Subject: Re: srfi-19
Date: 22 Feb 2002 23:37:51 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Neil" == Neil Jerram <address@hidden> writes:

>>>>> "Sebastien" == Sebastien deMentendeHorne <address@hidden> writes:
    Sebastien> Hi, I am using the srfi-19 under guile (1.5.4) but I
    Sebastien> have weird behaviour like:

    Sebastien> (define d (string->date "01 08 2003" "~d ~m ~Y"))
    Sebastien> (date-week-number d 0)
    Sebastien> => 4

    Sebastien> Shouldn't it be around the 28th week of the year ?

    Sebastien> Is the implementation buggy under guile ?

    Neil> Yes.  I've found and fixed one problem, with the result that we now
    Neil> get 34 rather than 4.  But it's still wrong, because of confusion
    Neil> about whether the fields in the date record should be 0-based or
    Neil> 1-based.

    Neil> Does anyone know what the design is here (0-based or 1-based)?

    Neil> (Perhaps the srfi-19 document says; I'm offline at the moment, so I
    Neil> can't check.)

OK, the SRFI doc suggests to me that the month is intended to be
1-based, so I'll probably fix it on that basis tomorrow.

However, interestingly,

- the same day/month bug is present in the SRFI's reference
  implementation

- 0-based/1-based confusion is reflected in the SRFI's description of
  "Day, an integer between 0 and 31, inclusive, the upper limit
  depending on the month and year of the point in time".

        Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]