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

@ -173,7 +173,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
((problems)
(let loop ((mb MB))
(when (not (null? mb))
(when (not (member-valid? (car mb)))
(when (member-has-issues? (car mb))
(newline)
(print-member-table (car mb))
(print-member-source (car mb)))

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))))
(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)))))