aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/vcalendar.scm5
-rw-r--r--module/vcalendar/datetime.scm6
2 files changed, 6 insertions, 5 deletions
diff --git a/module/vcalendar.scm b/module/vcalendar.scm
index 6beb63f5..dbab308c 100644
--- a/module/vcalendar.scm
+++ b/module/vcalendar.scm
@@ -125,11 +125,6 @@
(eq? (as-symb k1)
(as-symb k2)))
-(define-public (event-length e)
- (time-difference
- (attr e 'DTEND)
- (attr e 'DTSTART)))
-
(define* (make-vcomponent #:optional path)
(if (not path)
(%vcomponent-make)
diff --git a/module/vcalendar/datetime.scm b/module/vcalendar/datetime.scm
index d9813372..2715b5db 100644
--- a/module/vcalendar/datetime.scm
+++ b/module/vcalendar/datetime.scm
@@ -43,3 +43,9 @@ Event must have the DTSTART and DTEND attribute set."
(define (ev-time<? a b)
(time<? (attr a 'DTSTART)
(attr b 'DTSTART)))
+
+;; Returns length of the event @var{e}, as a time-duration object.
+(define-public (event-length e)
+ (time-difference
+ (attr e 'DTEND)
+ (attr e 'DTSTART)))