 		       (,days-in-month (ledger-schedule-days-in-month 
 					(nth 4 ,decoded) 
 					(nth 5 ,decoded))))
-		  (if (and (eq (nth 6 ,decoded) ,day-of-week)
-			   (between  (nth 3 ,decoded) 
-				     (+ ,days-in-month ,(* count 7)) 
-				     (+ ,days-in-month ,(* (1+ count) 7))))
-		      t
-		      nil))))
+		  (and (eq (nth 6 ,decoded) ,day-of-week)
+		       (between  (nth 3 ,decoded) 
+				 (+ ,days-in-month ,(* count 7)) 
+				 (+ ,days-in-month ,(* (1+ count) 7)))))))
 	    (t
 	     (error "COUNT out of range, COUNT=%S" count)))
       (error "Invalid argument to ledger-schedule-day-in-month-macro %S %S" 

	    (between (eval day) 1 (ledger-schedule-days-in-month (eval month) (eval year))))
       (between (eval day) 1 31))  ;; no month specified, assume 31 days.
   `'(and ,(if (eval year)  
		`(if (eq (nth 5 (decode-time date)) ,(eval year)) t)
		`t)
	   ,(if (eval month)
		`(if (eq (nth 4 (decode-time date)) ,(eval month)) t)
		`t)
	   ,(if (eval day)
		`(if (eq (nth 3 (decode-time date)) ,(eval day)) t)))
   (error "ledger-schedule-constraint-numerical-date-macro: date out of range %S %S %S" (eval year) (eval month) (eval day))))



For example every second Friday, regardless of month."
  (let ((start-day (nth 6 (decode-time (eval start-date)))))
     (if (eq start-day day-of-week)  ;; good, can proceed
	`(zerop (mod (- (time-to-days date) ,(time-to-days (eval start-date))) ,(* skip 7)))
	   (error "START-DATE day of week doesn't match DAY-OF-WEEK"))))

(defmacro ledger-schedule-constrain-date-range-macro (month1 day1 month2 day2)
  "Return a form of DATE that is true if DATE falls between MONTH1 DAY1 and MONTH2 DAY2."
