diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-23 17:20:40 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-23 17:22:09 +0200 |
commit | 13da2dcc564a81d1e4e965d3bc832da28daab4a8 (patch) | |
tree | 3b813f89ccc13bd40ae7457e68d44e83418f66ec /module | |
parent | Reorder CSS output for event size. (diff) | |
download | calp-13da2dcc564a81d1e4e965d3bc832da28daab4a8.tar.gz calp-13da2dcc564a81d1e4e965d3bc832da28daab4a8.tar.xz |
Move event-length.
Diffstat (limited to '')
-rw-r--r-- | module/vcalendar.scm | 5 | ||||
-rw-r--r-- | module/vcalendar/datetime.scm | 6 |
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))) |