aboutsummaryrefslogtreecommitdiff
path: root/module/datetime.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-29 23:25:20 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-29 23:25:20 +0200
commit9d471cd6cdd182c01bb6d7a7c7e0318a2daa3372 (patch)
tree0bcc9ef8150e56a810704c6f27dc02aa23104609 /module/datetime.scm
parentChange some calendar names in example config. (diff)
downloadcalp-9d471cd6cdd182c01bb6d7a7c7e0318a2daa3372.tar.gz
calp-9d471cd6cdd182c01bb6d7a7c7e0318a2daa3372.tar.xz
Clarify error on bad RRULE's.
Diffstat (limited to 'module/datetime.scm')
-rw-r--r--module/datetime.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/datetime.scm b/module/datetime.scm
index f7455501..4fef907f 100644
--- a/module/datetime.scm
+++ b/module/datetime.scm
@@ -667,9 +667,9 @@
minute: (s->n str 2 4)
second: (s->n str 4 6)))
-;;; TODO when parsing recurrence rules sometimes I think this is
-;;; sent regular dates
(define*-public (parse-datetime str optional: tz)
+ (unless (string-any #\T str)
+ (throw 'parse-error "String ~a doesn't look like a valid datetime" str))
(let* (((datestr timestr) (string-split str #\T)))
(datetime date: (parse-date datestr)
time: (parse-time timestr)