Skip to content

Commit

Permalink
Updated date parsing code to handle case insensitive Lisps
Browse files Browse the repository at this point in the history
darcs-hash:20080803124306-3cc5d-b0e19b45db501ada6df558ad6ca702cf21133859.gz
  • Loading branch information
Gary King committed Aug 3, 2008
1 parent 2182b6a commit 9461539
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dev/utilities/dates-and-times.lisp
Expand Up @@ -123,7 +123,9 @@ this allows the user to make 'nicknames' for items in a list."
(cond
((null list) nil)
((consp (car list)) (or (index-of item (car list)) (index-of item (cdr list))))
(t (let ((k (position item list)))
(t (let ((k (position item list :test (typecase item
((or symbol string) 'string-equal)
(t 'eql)))))
(if k (1+ k) nil)))))

;;; ---------------------------------------------------------------------------
Expand Down Expand Up @@ -221,7 +223,7 @@ this allows the user to make 'nicknames' for items in a list."
(declare (ignore ho mi se))
(let ((n (gensym "N-")))
`(progn
(format t "HT:> ~S [~S/~S]~%" ,token ,context ,cont-q)
;(format t "HT:> ~S [~S/~S]~%" ,token ,context ,cont-q)
(cond
;; a month by name
((and (index-of ,token +month-list+)
Expand Down

0 comments on commit 9461539

Please sign in to comment.