mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
* Fix date-week-number bug in srfi-19.scm.
This commit is contained in:
parent
b55542ee46
commit
359b471e26
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-02-23 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* srfi-19.scm (priv:month-assoc): Correct numbers so that they
|
||||
match the expectations of priv:year-day.
|
||||
|
||||
2002-02-22 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* srfi-19.scm (priv:year-day): Index into priv:month-assoc using
|
||||
|
|
|
@ -797,9 +797,11 @@
|
|||
(define (leap-year? date)
|
||||
(priv:leap-year? (date-year date)))
|
||||
|
||||
(define priv:month-assoc '((1 . 31) (2 . 59) (3 . 90) (4 . 120)
|
||||
(5 . 151) (6 . 181) (7 . 212) (8 . 243)
|
||||
(9 . 273) (10 . 304) (11 . 334) (12 . 365)))
|
||||
;; Map 1-based month number M to number of days in the year before the
|
||||
;; start of month M (in a non-leap year).
|
||||
(define priv:month-assoc '((1 . 0) (2 . 31) (3 . 59) (4 . 90)
|
||||
(5 . 120) (6 . 151) (7 . 181) (8 . 212)
|
||||
(9 . 243) (10 . 273) (11 . 304) (12 . 334)))
|
||||
|
||||
(define (priv:year-day day month year)
|
||||
(let ((days-pr (assoc month priv:month-assoc)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue