diff options
Diffstat (limited to 'module/vcalendar')
-rw-r--r-- | module/vcalendar/datetime.scm | 6 |
1 files changed, 6 insertions, 0 deletions
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))) |