aboutsummaryrefslogtreecommitdiff
path: root/module/datetime.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-22 23:40:49 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-22 23:40:49 +0100
commit3c211e775f57a1a5a731bb4d059bafbaa581210d (patch)
tree38958e29cd9f58fa9192b7b196f14b3d60dee9b2 /module/datetime.scm
parentDate difference once again returns dates. (diff)
downloadcalp-3c211e775f57a1a5a731bb4d059bafbaa581210d.tar.gz
calp-3c211e775f57a1a5a731bb4d059bafbaa581210d.tar.xz
Fix TZ problem with datetime<.
Diffstat (limited to 'module/datetime.scm')
-rw-r--r--module/datetime.scm16
1 files changed, 10 insertions, 6 deletions
diff --git a/module/datetime.scm b/module/datetime.scm
index 8df055de..2b330a9c 100644
--- a/module/datetime.scm
+++ b/module/datetime.scm
@@ -262,14 +262,18 @@
(time< a b)))
(define-public (datetime< a b)
- (if (date= (get-date a) (get-date b))
- (time< (get-time a) (get-time b))
- (date< (get-date a) (get-date b))))
+ (let ((a (get-datetime a))
+ (b (get-datetime b)))
+ (if (date= (get-date a) (get-date b))
+ (time< (get-time% a) (get-time% b))
+ (date< (get-date a) (get-date b)))))
(define-public (datetime<= a b)
- (if (date= (get-date a) (get-date b))
- (time<= (get-time a) (get-time b))
- (date<= (get-date a) (get-date b))))
+ (let ((a (get-datetime a))
+ (b (get-datetime b)))
+ (if (date= (get-date a) (get-date b))
+ (time<= (get-time% a) (get-time% b))
+ (date<= (get-date a) (get-date b)))))
(define-public (date/-time< a b)
(datetime< (as-datetime a) (as-datetime b)))