[Nottingham] HOT Dating one-liner contest

Andrew Etches seadog at mehmoo.com
Mon Jan 14 20:55:45 GMT 2008


Quick version whipped up in common lisp using date-calc, I'll probably make
it far cleaner at some point:

(load "date-calc.lisp")
(in-package date-calc)

(let((m 1) (d 1) (y 2008))
  (loop while (< m 13) do
        (if (eql (day-of-week y m d) 3)
          (progn
            (format t "1st Wed: ~A/~A/~A~%" d m y)
            (format t "   3rd Thurs: ~A/~A/~A~%" (+ d 15) m y)
            (setf m (+ m 1))
            (setf d 1))
          (setf d (+ d 1)))))




More information about the Nottingham mailing list