aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-04-23 17:22:33 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-04-23 17:24:27 +0200
commit427cf67e211d824454fac44688311fcd04e5ce87 (patch)
tree854fb8f0c0c2c181af43aa9fd987e4070b75c1b1
parentMove event-length. (diff)
downloadcalp-427cf67e211d824454fac44688311fcd04e5ce87.tar.gz
calp-427cf67e211d824454fac44688311fcd04e5ce87.tar.xz
Add time-{min,max}.
-rw-r--r--module/srfi/srfi-19/util.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/srfi/srfi-19/util.scm b/module/srfi/srfi-19/util.scm
index e2a98c42..e4014a68 100644
--- a/module/srfi/srfi-19/util.scm
+++ b/module/srfi/srfi-19/util.scm
@@ -112,3 +112,8 @@ attribute set to 0. Can also be seen as \"Start of day\""
(date->time-utc start-date) (date->time-utc end-date)
time time))))
+(define-public (time-min a b)
+ (if (time<? a b) a b))
+
+(define-public (time-max a b)
+ (if (time<? a b) b a))