From 114f3fa2f633c2ab72362daf9da319dbc82fdac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 1 Mar 2022 02:47:11 +0100 Subject: Add unit test for days-in-interval. --- module/datetime.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'module/datetime.scm') diff --git a/module/datetime.scm b/module/datetime.scm index 3b03bf53..9657a803 100644 --- a/module/datetime.scm +++ b/module/datetime.scm @@ -535,6 +535,7 @@ (iota (modulo (- (* 7 5) month-len month-start) 7) 1))))) +;; The amount of days in the given interval, both end pointts inclusive (define-public (days-in-interval start-date end-date) (let ((diff (date-difference (date+ end-date (date day: 1)) start-date))) (with-streams -- cgit v1.2.3