1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-04 11:10:27 +02:00
guile/module
Mark H Weaver db78033cc1 SRFI-19: Fix handling of negative years and negative julian days.
Fixes <https://bugs.gnu.org/21906>.
Mitigates <https://bugs.gnu.org/21903> and <https://bugs.gnu.org/21904>.
Reported by: Zefram <zefram@fysh.org>.

* module/srfi/srfi-19.scm (encode-julian-day-number)
(decode-julian-day-number, date-week-number): Use 'floor-quotient'
instead of 'quotient', and 'floor' instead of 'truncate', where
appropriate.
(time-utc->date): Ensure that the 'nanoseconds' field of the returned
date is non-negative.
(leap-year): Handle negative years properly, and reformulate the
computation.
(week-day): Handle negative years properly.  Use 'floor-quotient'
instead of 'quotient' where appropriate.
(directives): In the handler for '~Y' format escapes, improve the
handling of years outside of the range 0-9999.
(read-directives): Add a FIXME comment to fix the '~Y' reader to handle
years outside of the range 0-9999.
* test-suite/tests/srfi-19.test: Import (srfi srfi-1).  Use Guile's
modern keyword notation in the 'define-module' form.  Add more tests.
2019-05-23 17:13:05 +02:00
..
ice-9 time: Use #: for 'define-module' clauses. 2019-05-23 15:41:32 +02:00
language Fix eta-reduction of prompts 2019-05-08 22:26:35 +02:00
oop goops: Fix 'instance?' to work on objects that aren't structs. 2018-08-07 12:05:31 +02:00
rnrs Fix R6RS call-with-{input,output}-file to open textual ports. 2018-08-07 12:34:43 +02:00
scripts compile: Update copyright year. 2018-08-07 12:34:22 +02:00
srfi SRFI-19: Fix handling of negative years and negative julian days. 2019-05-23 17:13:05 +02:00
sxml Remove duplicate definitions of call/ec' and let/ec'. 2013-04-06 15:40:19 +02:00
system Fix linker bug that could fail to find the shstrtab 2018-10-08 10:08:33 +02:00
texinfo Remove all deprecated code 2017-05-22 13:36:42 +02:00
web web: Export http-request. 2018-08-07 12:13:19 +02:00
Makefile.am Merge branch 'master' into lightning 2018-08-07 12:43:25 +02:00
rnrs.scm Add R6RS bytevector->string, string->bytevector 2016-06-21 11:29:14 +02:00
statprof.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00
texinfo.scm texinfo: fix @url{@@} parsing 2014-11-09 15:56:33 +00:00