*** /Users/awb/Desktop/gnus-score.el.~1~ 2020-07-27 14:21:49.000000000 -0700 --- /Users/awb/Desktop/gnus-score.el 2020-09-07 12:21:36.000000000 -0700 *************** *** 1370,1378 **** (setq err (cond ! ((if (member (downcase type) '("lines" "chars")) ! (not (numberp (car s))) ! (not (stringp (car s)))) (format "Invalid match %s in %s" (car s) file)) ((and (cadr s) (not (integerp (cadr s)))) (format "Non-integer score %s in %s" (cadr s) file)) --- 1370,1381 ---- (setq err (cond ! ((cond ((member (downcase type) '("lines" "chars")) ! (not (numberp (car s)))) ! ((string= (downcase type) "date") ! (not (or (numberp (car s)) ! (stringp (car s))))) ! (t (not (stringp (car s))))) (format "Invalid match %s in %s" (car s) file)) ((and (cadr s) (not (integerp (cadr s)))) (format "Non-integer score %s in %s" (cadr s) file)) *************** *** 1690,1698 **** --- 1693,1711 ---- ((eq type 'after) (setq match-func 'string< match (gnus-date-iso8601 (nth 0 kill)))) + ((eq type '<) + (setq type 'after + match-func 'gnus-string> + match (gnus-time-iso8601 + (time-add (current-time) (* 86400 (nth 0 kill)))))) ((eq type 'before) (setq match-func 'gnus-string> match (gnus-date-iso8601 (nth 0 kill)))) + ((eq type '>) + (setq type 'before + match-func 'gnus-string> + match (gnus-time-iso8601 + (time-add (current-time) (* -86400 (nth 0 kill)))))) ((eq type 'at) (setq match-func 'string= match (gnus-date-iso8601 (nth 0 kill))))