[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
srfi-19 date-week-number gremlin
From: |
Kevin Ryde |
Subject: |
srfi-19 date-week-number gremlin |
Date: |
Wed, 13 Aug 2003 10:08:32 +1000 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) |
I noticed srfi-19 date-week-number seems to be off by 1 in its week
start calculation. For instance looking at Jan 1984, Sat 7th should
be in the first week and Sun 8th begin the next, but alas,
(date-week-number (make-date 0 0 0 0 7 1 1984 0) 0)
(date-week-number (make-date 0 0 0 0 8 1 1984 0) 0)
both give 1.
The code looks about right, just doesn't take into account
date-year-day starting from 1 rather than 0.
* srfi-19.scm (date-week-number): Correction, day of week starting
week was off by one.
* tests/srfi-19.test (date-week-number): Add tests.
I think this could go in the 1.6 branch too.
srfi-19.scm.dwn.diff
Description: Text document
srfi-19.test.dwn.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- srfi-19 date-week-number gremlin,
Kevin Ryde <=