From 9d471cd6cdd182c01bb6d7a7c7e0318a2daa3372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 29 Mar 2020 23:25:20 +0200 Subject: Clarify error on bad RRULE's. --- module/datetime.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/datetime.scm') 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) -- cgit v1.2.3