bug-cvs
[Top][All Lists]
Advanced

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

Re: CVS update: MODIFIED: src ...


From: Derek Robert Price
Subject: Re: CVS update: MODIFIED: src ...
Date: Mon, 04 Nov 2002 11:19:14 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

Is it the test that's failing or the CVS code? I didn't save the output from the failure case.

Derek

--
               *8^)

Email: derek@ximbiot.com

Get CVS support at <http://ximbiot.com>!


Larry Jones wrote:

dprice@cvshome.org writes:
 +        # I'm too tired to check the math just now, but is it possible that
 +        # the algorithm assumes the final month has 31 days and that 100
 +        # months from the 29th, 30th, and 31st would be the non-existan 29th,
 +        # 30th, and 31st of a non-leap year February or something?  Forgive
 +        # me if that is way off base but it is a wild guess without in-depth
 +        # knowledge of this test or the error being generated.

That's exactly right.  The test assumes that the date 100 months from
now will be the same day of the month as today is, which fails if 100
months from now is a month with fewer days than this month and you're
sufficiently close to the end of the month.  What we just experienced is
the worst case because October 2002 has 31 days and 100 months from that
is February 2011, which only has 28.  I'm too lazy to do the math to
figure out how often it fails, but we could certainly reduce the number
of failures by changing from 100 months to, say, 96 months (8 years) so
you always land on the same month with the same leap year/non-leap year
status, except for the century year exceptions.  (So it wouldn't fail
again until February 29, 2092.)

-Larry Jones

Well of course the zipper's going to get stuck if everyone
stands around WATCHING me! -- Calvin






reply via email to

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