From 9199375a781319d4f49e05b858d86775b02ae689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 14 Feb 2020 00:01:45 +0100 Subject: Fix date/-time<. --- module/srfi/srfi-19/alt.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/srfi/srfi-19/alt.scm b/module/srfi/srfi-19/alt.scm index 6c71f02c..09f70190 100644 --- a/module/srfi/srfi-19/alt.scm +++ b/module/srfi/srfi-19/alt.scm @@ -212,9 +212,15 @@ (date<= (get-date a) (get-date b)))) (define-public (date/-time< a b) - (if (date< (as-date a) (as-date b)) - #t - (time< (as-time a) (as-time b)))) + ;; (format (current-error-port) "~a < ~a = " a b) + (let ((res + (cond [(date= (as-date a) (as-date b)) + (time< (as-time a) (as-time b))] + [(date< (as-date a) (as-date b)) + #t] + [else #f]))) + ;; (format (current-error-port) "~a~%" res) + res)) (define-many define-public (date