bug-guile
[Top][All Lists]
Advanced

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

Re: possible bug in srfi-19 implementation (fix included)


From: Joost Helberg
Subject: Re: possible bug in srfi-19 implementation (fix included)
Date: Mon, 14 Oct 2002 10:12:11 +0200

Marius,

>>>>> "Marius" == Marius Vollmer <address@hidden> writes:
    > To: address@hidden
    > Cc: address@hidden
    > Subject: Re: possible bug in srfi-19 implementation (fix included)
    > From: Marius Vollmer <address@hidden>
    > Date: 13 Oct 2002 18:22:50 +0200

    > address@hidden writes:

    >> I'm using guile-1.6.0 and srfi-19 for date stuff .
    >> It seems that the week-numbers are not calculated correctly, as it
    >> returns week 0 for all dates between 2002-1-1 and 2002-1-12. All other
    >> weeknumbers after the 12th are 2 off.

    > I find this date mangling stuff quite confusing so I have to pass the
    > ball back to you: does our SRFI-10 implementation conform to the docs
    > at http://srfi.schemers.org/srfi-19/srfi-19.html?

The implementation in guile-1.6.0 conforms to the standard as defined
in srfi-19. But, as weeknumbers are not continuously increasing, I
can't see any practical use for the srfi-19 week-number standard.

    > If not, can you fix it? :-)
Not necessary.

    > I think it would have been sensible for SRFI-19 to specify the first
    > week of a year the way ISO 8601 does, but it doesn't seem to do so,
    > right?

Yep. I started writing tests (as the tests for srfi-19 don't include
week-functions) for testing week-related functions. E.g. make sure
that if dates are 7 days apart, the week-number is 1 apart. This is
not the case in srfi-19, as several years have 2 weeks 0.

Is there a way to extend srfi-19, or to make up a new one?

Joost

-- 
Joost Helberg
Technisch Directeur Snow BV http://snow.nl Tel 0418-653333 Fax 0418-653666
Voorzitter VOSN         http://www.vosn.nl Tel 0418-653336 Fax 0418-653666
GPG PblKey fprnt= 738C 20AC A545 02AE 6F5D  5A9F D724 EB4B 2B10 150B




reply via email to

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