aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/validate.scm
blob: 8881c95f6fc524149a8d9c370ffd02b427d4f618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(define-module (vcomponent validate)
  :use-module (vcomponent)
  :use-module (datetime)
  :use-module ((hnh util exceptions)
               :select (warning))
  :use-module (calp translation)
  :export (validate-event))

(define (validate-event component)
  (unless (date/-time<=
           (prop component 'DTSTART)
           (prop component 'DTEND))
    (warning (G_ "end (~a) must be equal to or greater than start (~a)")
             (prop component 'DTEND)
             (prop component 'DTSTART)))
  )