From: teranisi Date: Tue, 29 Feb 2000 01:32:38 +0000 (+0000) Subject: * poe-18.el (current-time-string): Fixed leap year's day counting bug. X-Git-Tag: apel-10_2~1 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fapel.git;a=commitdiff_plain;h=a98941f55305de67df1a2e20ef689e1b44afe5e6 * poe-18.el (current-time-string): Fixed leap year's day counting bug. --- diff --git a/ChangeLog b/ChangeLog index a8883bb..2531dea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-02-29 Yuuichi Teranishi + + * poe-18.el (current-time-string): Fixed leap year's day counting bug. + 2000-02-28 Katsumi Yamaoka * emu.el (enriched-encode): Do nothing for it if FSF Emacs 19.28 diff --git a/poe-18.el b/poe-18.el index 93bc836..0edb4d8 100644 --- a/poe-18.el +++ b/poe-18.el @@ -355,10 +355,8 @@ and from `file-attributes'." (setq lyear (and (zerop (% yyyy 4)) (or (not (zerop (% yyyy 100))) (zerop (% yyyy 400))))) - (while (> (- dd (nth mm mdays)) 0) - (if (and (= mm 1) lyear) - (setq dd (- dd 29)) - (setq dd (- dd (nth mm mdays)))) + (while (> (- dd (if (and lyear (= mm 1)) 29 (nth mm mdays))) 0) + (setq dd (- dd (if (and lyear (= mm 1)) 29 (nth mm mdays)))) (setq mm (1+ mm))) (setq HH (/ low 3600) low (% low 3600)