diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2020-01-24 20:21:41 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2020-01-24 20:23:04 +0100 |
commit | e822f7b81245c919eda8bd8ad4b482df075e0508 (patch) | |
tree | 3024a9a1a80e5c9ffd6d187a028c783dc4b7abbd /module/srfi/srfi-19/util.scm | |
parent | Extend define-many to allow a custom define procedure. (diff) | |
download | calp-e822f7b81245c919eda8bd8ad4b482df075e0508.tar.gz calp-e822f7b81245c919eda8bd8ad4b482df075e0508.tar.xz |
Start of new date structures.
Diffstat (limited to 'module/srfi/srfi-19/util.scm')
-rw-r--r-- | module/srfi/srfi-19/util.scm | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/module/srfi/srfi-19/util.scm b/module/srfi/srfi-19/util.scm index 77e824ca..f5bd1964 100644 --- a/module/srfi/srfi-19/util.scm +++ b/module/srfi/srfi-19/util.scm @@ -73,34 +73,6 @@ attribute set to 0. Can also be seen as \"Start of day\"" (define (remove-day time) (add-duration time (make-duration (- (* 60 60 24))))) -;; @verbatim -;; A B C D E ¬F -;; |s1| : |s2| : |s1| : |s2| : : |s1| -;; | | : | | : | ||s2| : |s1|| | : |s1||s2| : | | -;; | ||s2| : |s1|| | : | || | : | || | : | || | : -;; | | : | | : | || | : | || | : | || | : |s2| -;; | | : | | : | | : | | : : | | -;; @end verbatim -;; -;; E is covered by both case A and B. -(define-public (timespan-overlaps? s1-begin s1-end s2-begin s2-end) - "Return whetever or not two timespans overlap." - (or - ;; A - (and (time<? s2-begin s1-end) - (time<? s1-begin s2-end)) - - ;; B - (and (time<? s1-begin s2-end) - (time<? s2-begin s1-end)) - - ;; C - (and (time<? s1-begin s2-begin) - (time<? s2-end s1-end)) - - ;; D - (and (time<? s2-begin s1-begin) - (time<? s1-end s2-end)))) (define-public (normalize-date date) (time-utc->date (date->time-utc date) |