aboutsummaryrefslogtreecommitdiff
path: root/module/datetime.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-22 23:55:38 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-23 12:59:19 +0200
commit17448e13fd5282ad0c9afd98207dc8b7e2d30c0d (patch)
treee3460448f9c9b4bd08c6eb7e59a535f56c58b7ea /module/datetime.scm
parentFix javascript mimetype in server. (diff)
downloadcalp-17448e13fd5282ad0c9afd98207dc8b7e2d30c0d.tar.gz
calp-17448e13fd5282ad0c9afd98207dc8b7e2d30c0d.tar.xz
date= and time= now work.
Diffstat (limited to 'module/datetime.scm')
-rw-r--r--module/datetime.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/datetime.scm b/module/datetime.scm
index 1553bad8..de573c2e 100644
--- a/module/datetime.scm
+++ b/module/datetime.scm
@@ -205,7 +205,8 @@
(define-public (date= . args)
(reduce (lambda (a b)
- (and (= (year a) (year b))
+ (and b ; did a previous iteration return false?
+ (= (year a) (year b))
(= (month a) (month b))
(= (day a) (day b))
;; return object
@@ -214,7 +215,8 @@
(define-public (time= . args)
(reduce (lambda (a b)
- (and (= (hour a) (hour b))
+ (and b
+ (= (hour a) (hour b))
(= (minute a) (minute b))
(= (second a) (second b))
a))