1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
guile/module
Mark H Weaver a58c7abd72 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.
2018-10-20 23:15:51 -04:00
..
ice-9 time: Use #: for 'define-module' clauses. 2018-09-23 16:41:13 +02:00
language Fix type inferencing for 'nil?' and 'null?' predicates. 2018-10-19 21:09:43 -04:00
oop goops: Fix 'instance?' to work on objects that aren't structs. 2018-06-11 10:12:50 -04:00
rnrs Fix R6RS call-with-{input,output}-file to open textual ports. 2018-08-02 10:14:03 -04:00
scripts compile: Update copyright year. 2018-07-19 18:00:19 +02:00
srfi SRFI-19: Fix handling of negative years and negative julian days. 2018-10-20 23:15:51 -04:00
sxml Remove duplicate definitions of call/ec' and let/ec'. 2013-04-06 15:40:19 +02:00
system Add -Wshadowed-toplevel. 2018-07-24 11:53:02 +02:00
texinfo texinfo: Remove unnecessary (oop goops) dependency. 2017-03-01 19:28:04 +01:00
web web: Export http-request. 2018-06-23 23:32:13 +02:00
Makefile.am build: Really build srfi/srfi-71.scm. 2018-07-01 23:33:46 +02:00
rnrs.scm Add R6RS bytevector->string, string->bytevector 2016-06-21 11:29:14 +02:00
statprof.scm Fixed bug: statprof flat display wasn't writing summary lines to port 2017-04-19 16:25:00 +02:00
texinfo.scm texinfo: fix @url{@@} parsing 2014-11-09 15:56:33 +00:00