mc #7004(2008/08/06 10:40 GMT) [ Common Lisp ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12
(use-package :series) (defun friday13-p (ut) (and (= 13 (nth-value 3 (decode-universal-time ut))) (= 4 (nth-value 6 (decode-universal-time ut))))) (let* ((from (get-universal-time)) (to (encode-universal-time 59 59 23 31 12 2013)) (uts (choose-if #'friday13-p (scan-range :from from :upto to :by (* 60 60 24))))) (iterate ((ut uts)) (format t "~A~%" (metatilities:date-string ut))) (collect-length uts))
Rating0/0=0.00-0+
[ reply ]
mc
#7004()
[
Common Lisp
]
Rating0/0=0.00
;>>> Friday, February 13, 2009
;>>> Friday, March 13, 2009
;>>> Friday, November 13, 2009
;>>> Friday, August 13, 2010
;>>> Friday, May 13, 2011
;>>> Friday, January 13, 2012
;>>> Friday, April 13, 2012
;>>> Friday, July 13, 2012
;>>> Friday, September 13, 2013
;>>> Friday, December 13, 2013
;==> 10
(use-package :series) (defun friday13-p (ut) (and (= 13 (nth-value 3 (decode-universal-time ut))) (= 4 (nth-value 6 (decode-universal-time ut))))) (let* ((from (get-universal-time)) (to (encode-universal-time 59 59 23 31 12 2013)) (uts (choose-if #'friday13-p (scan-range :from from :upto to :by (* 60 60 24))))) (iterate ((ut uts)) (format t "~A~%" (metatilities:date-string ut))) (collect-length uts))Rating0/0=0.00-0+
[ reply ]