Update of /project/lisppaste/cvsroot/lisppaste2 In directory common-lisp.net:/tmp/cvs-serv11415
Modified Files: web-server.lisp Log Message: Bug fix to time-delta-primitive
Date: Mon Nov 29 21:41:56 2004 Author: bmastenbrook
Index: lisppaste2/web-server.lisp diff -u lisppaste2/web-server.lisp:1.70 lisppaste2/web-server.lisp:1.71 --- lisppaste2/web-server.lisp:1.70 Mon Nov 29 16:47:52 2004 +++ lisppaste2/web-server.lisp Mon Nov 29 21:41:55 2004 @@ -1,4 +1,4 @@ -;;;; $Id: web-server.lisp,v 1.70 2004/11/29 15:47:52 bmastenbrook Exp $ +;;;; $Id: web-server.lisp,v 1.71 2004/11/29 20:41:55 bmastenbrook Exp $ ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
;;;; See the LICENSE file for licensing information. @@ -357,9 +357,10 @@ (minutes (* seconds 60)) (hours (* minutes 24)) (days (* hours 7)) - (weeks (* days 487/16)) + (weeks (* hours 487/16)) (months (* weeks 12)) (years (* hours (+ 365 1/4)))) + (format t "weeks is ~S, delta is ~S, floor w/weeks is ~S~%" weeks delta (floor delta weeks)) (let ((primitive (cond ((< delta seconds) (format nil "~D second~:P" delta)) @@ -368,7 +369,7 @@ ((< delta days) (format nil "~D day~:P" (floor delta hours))) ((< delta weeks) (format nil "~D week~:P" (floor delta days))) ((< delta months) (format nil "~D month~:P" (floor delta weeks))) - (t (format nil "~D years" (floor delta years)))))) + (t (format nil "~D years" (floor delta months)))))) (if (eql level 1) primitive (format nil "~A, ~A" primitive (time-delta-primitive