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 16:27:55 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

Larry Jones wrote:

Yes, the checkout command is failing, but that's because the test is
deficient, not CVS.  I suppose it's a matter of perspective:  If you
naively add 100 months to October 31, 2002, you get February 31, 2011,
which is an invalid date.  That's what currently happens, so you get an
error that the specified date is invalid ("Can't parse date/time").  A
more sophisticated addition could be used to come up with a valid date,
but which one?  One could make a good argument for either March 1 or
March 3, but either one is apt to be surprising to some people.  Since
there's no single, obviously correct answer, I think producing an error
is the right thing to do.

-Larry Jones

Hmm... That might not be politic. -- Calvin

You could argue for February 28th (or 29th in a leap year), for that matter. End of October + 100 months = end of February. That's probably the one I'd pick.

What about setting errno in getdate.y and setting a string to the unparsable date or more likely setting a global error string to a complete error message including the invalid date. I think "Date/time resolves to non-existant date: Feb. 30, 2004" is much more user-friendly than "Can't parse date/time: 100 months", which is almost the same error message I'd get if I asked CVS to parse "asdfkhjgfadlhglfj" as a date.

Derek

--
               *8^)

Email: derek@ximbiot.com

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








reply via email to

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