Make advanced day descriptor automatically wildcard year and month.

This commit is contained in:
Craig Earls 2015-07-22 20:34:44 -07:00
parent de651d247b
commit 254d82e5eb

View file

@ -212,7 +212,9 @@ the transaction should be logged for that day."
YEAR-DESC, MONT-DESC, and DAY-DESC are the string portions of the YEAR-DESC, MONT-DESC, and DAY-DESC are the string portions of the
date descriptor." date descriptor."
(cond ((string= year-desc "*") t) (cond
((string-match "[A-Za-z]" day-desc) t) ; there is an advanced day descriptor which overrides the year
((string= year-desc "*") t)
((/= 0 (string-to-number year-desc)) ((/= 0 (string-to-number year-desc))
`(memq (nth 5 (decode-time date)) ',(mapcar 'string-to-number (split-string year-desc ",")))) `(memq (nth 5 (decode-time date)) ',(mapcar 'string-to-number (split-string year-desc ","))))
(t (t
@ -223,7 +225,9 @@ date descriptor."
YEAR-DESC, MONT-DESC, and DAY-DESC are the string portions of the YEAR-DESC, MONT-DESC, and DAY-DESC are the string portions of the
date descriptor." date descriptor."
(cond ((string= month-desc "*") (cond
((string-match "[A-Za-z]" day-desc) t) ; there is an advanced day descriptor which overrides the month
((string= month-desc "*")
t) ;; always match t) ;; always match
((string= month-desc "E") ;; Even ((string= month-desc "E") ;; Even
`(evenp (nth 4 (decode-time date)))) `(evenp (nth 4 (decode-time date))))