Add imm-date-p to identify IMM dates
This commit is contained in:
parent
d8db14500c
commit
5a486ed74a
1 changed files with 7 additions and 0 deletions
|
|
@ -79,6 +79,13 @@ weekday in the month."
|
||||||
(return dt)
|
(return dt)
|
||||||
(setf dt next-dt)))))))))
|
(setf dt next-dt)))))))))
|
||||||
|
|
||||||
|
(defun imm-date-p (date)
|
||||||
|
"Returns true if date is the 3rd Wednesday of the month"
|
||||||
|
(and (eq (day-of-week date) :wednesday)
|
||||||
|
(multiple-value-bind (yy mm dd) (date->ymd date)
|
||||||
|
(declare (ignore yy mm))
|
||||||
|
(date<= 15 dd 21))))
|
||||||
|
|
||||||
(defun date+ (date days)
|
(defun date+ (date days)
|
||||||
"Advance date by given number of days"
|
"Advance date by given number of days"
|
||||||
(+ date days))
|
(+ date days))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue