aboutsummaryrefslogtreecommitdiff
path: root/module/vcalendar.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-04-23 17:08:05 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-04-23 17:08:05 +0200
commit073b4584616c24be515f5b092ba1d095d6b168ec (patch)
tree70526baef63d6f65a78e3d358c0fd378bf23d052 /module/vcalendar.scm
parentAdd tree datatype. (diff)
downloadcalp-073b4584616c24be515f5b092ba1d095d6b168ec.tar.gz
calp-073b4584616c24be515f5b092ba1d095d6b168ec.tar.xz
Add some utilitiy functions.
Diffstat (limited to 'module/vcalendar.scm')
-rw-r--r--module/vcalendar.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/vcalendar.scm b/module/vcalendar.scm
index dbab308c..6beb63f5 100644
--- a/module/vcalendar.scm
+++ b/module/vcalendar.scm
@@ -125,6 +125,11 @@
(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)