Validate months in periods.

This commit is contained in:
Dominik Pantůček 2023-03-28 14:51:02 +02:00
parent 5e28f91341
commit bfe763c599
2 changed files with 10 additions and 7 deletions

View file

@ -63,12 +63,15 @@
'student
'suspend)))
(foldl (lambda (mr value)
(member-record-sub-prepend
mr output kind
(let* ((mspec (string-first+rest (car value)))
(month (string->month (car mspec)))
(comment (cdr mspec)))
(list marker month (cdr value) comment))))
(let* ((mspec (string-first+rest (car value)))
(month (string->month (car mspec)))
(comment (cdr mspec)))
(if month
(member-record-sub-prepend
mr output kind
(list marker month (cdr value) comment))
(member-record-add-highlight
mr (cdr value) "Invalid month specification" 3 'error))))
mr value)))
(else
(member-record-sub-set mr output key value)))))