aboutsummaryrefslogtreecommitdiff
path: root/module/output
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-19 17:06:44 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-19 17:06:44 +0200
commita337995a9dbcf1000679f9a2d086def0daa90b66 (patch)
tree5af345c472c5925e29e7aa0a56035141e11fe758 /module/output
parentFix JS ESC to close popup. (diff)
downloadcalp-a337995a9dbcf1000679f9a2d086def0daa90b66.tar.gz
calp-a337995a9dbcf1000679f9a2d086def0daa90b66.tar.xz
Recurrence rules now always parsed.
Diffstat (limited to '')
-rw-r--r--module/output/html.scm9
-rw-r--r--module/output/ical.scm9
2 files changed, 5 insertions, 13 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index da5c0659..b011da15 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -356,9 +356,8 @@
(define (format-recurrence-rule ev)
`(span (@ (class "rrule"))
"Upprepas "
- ,((compose (@ (vcomponent recurrence display) format-recurrence-rule)
- (@ (vcomponent recurrence parse) parse-recurrence-rule))
- (attr ev 'RRULE))
+ ,((@ (vcomponent recurrence display) format-recurrence-rule)
+ (attr ev 'RRULE))
,@(awhen (attr* ev 'EXDATE)
(list
", undantaget "
@@ -370,9 +369,7 @@
;; NOTE only show time when it's different than the start time?
;; or possibly only when FREQ is hourly or lower.
(if (memv ((@ (vcomponent recurrence internal) freq)
- ((@ (vcomponent recurrence parse)
- parse-recurrence-rule)
- (attr ev 'RRULE)))
+ (attr ev 'RRULE))
'(HOURLY MINUTELY SECONDLY))
(datetime->string d "~e ~b ~k:~M")
(datetime->string d "~e ~b"))))
diff --git a/module/output/ical.scm b/module/output/ical.scm
index e1da95ec..87a85f82 100644
--- a/module/output/ical.scm
+++ b/module/output/ical.scm
@@ -54,13 +54,8 @@
(modulo s 60))
))
[(RRULE)
- ;; NOTE
- ;; generated events are created with recur-rule objects.
- ;; parsed objects keep their string representation.
- ;; TODO normalize this.
- (if ((@ (vcomponent recurrence internal) recur-rule?) value)
- ((@ (vcomponent recurrence internal) recur-rule->rrule-string) value)
- value)]
+ ((@ (vcomponent recurrence internal)
+ recur-rule->rrule-string) value)]
(else
(escape-chars value)