bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`timer-relative-time' loses a day at -1.


From: Jonathan LF King
Subject: `timer-relative-time' loses a day at -1.
Date: Mon, 14 May 2001 14:20:04 -0400 (EDT)

In GNU Emacs 20.7.2 (sparc-sun-solaris2.6, Motif)
 of Fri Mar  9 2001 on fileserver
configured using `configure  --prefix=/opt/emacs_20.7 --with-x 
--with-x-toolkit=motif --x-includes=/usr/openwin/include 
--x-libraries=/usr/openwin/lib'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Hello.  Executing the following snippet

    (defconst *SECS-IN-ONE-DAY* (* 24 60 60))

    (loop
      for days-from-now from 2 downto -3 do
      (print 
       (format "days-from-now=%2d: %s"
         days-from-now
         (format-time-string
          "%02d%03b"
          (timer-relative-time (current-time)
                               (* days-from-now *SECS-IN-ONE-DAY*) ) )
         ) ) )

produces

    "days-from-now= 2: 16May"

    "days-from-now= 1: 15May"

    "days-from-now= 0: 14May"

    "days-from-now=-1: 14May"

    "days-from-now=-2: 13May"

    "days-from-now=-3: 12May"
    nil

The values 0 and -1 for days-from-now produce the same output from
`timer-relative-time'.  I feel that it is more consistent if "-1"
produces yesterday's date.

        Sincerely, -Jonathan King
-- 
Prof. Jonathan LF King    Mathematics dept, Univ. of Florida
<squash@math.ufl.edu>,    <http://www.math.ufl.edu/~squash/>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]