Deal with destroyed using period handling.

This commit is contained in:
Dominik Pantůček 2023-03-29 18:43:24 +02:00
parent 2117749d61
commit 7a895930e1
2 changed files with 5 additions and 7 deletions

View file

@ -226,13 +226,11 @@
(or (member-has-errors? mr)
(not (is-4digit-prime? (member-id mr)))))
;; Returns true if the member record represents destroyed member. The
;; *current-month* is a global parameter from period module.
;; Returns true if the member record represents non-existing
;; member. The *current-month* is a global parameter from period
;; module.
(define (member-destroyed? mr)
(let ((destroyed (member-record-info mr 'destroyed #f)))
(and destroyed
(month<? (string->month destroyed)
(*current-month*)))))
(not (member-existing? mr)))
;; Generic period-based predicate
(define ((member-period-predicate? key) mr)

View file

@ -376,7 +376,7 @@
(let ((pmrs (filter-members-by-predicate mb member-has-problems?)))
(when (not (null? pmrs))
(newline)
(print "Member files with errors: "
(print "Member files with errors (" (length pmrs) "): "
(string-intersperse
(map member-file-path pmrs)
", "))))