addmonth problem

Jay R. Ashworth jra at baylink.com
Tue Apr 29 13:34:42 PDT 2008


On Tue, Apr 29, 2008 at 04:21:42PM -0400, Kenneth Brody wrote:
> Quoting GCC Consulting (Tue, 29 Apr 2008 15:58:52 -0400):
> > If one is adding one month to the last date in February, depending on if it
> > is a leap year, one will get either mar 28th or mar 29th.
> 
> No, if one adds a month to Feb 28, you get Mar 28, and if you add a month
> to Feb 29, you get Mar 29.  There is no "this date just happens to be the
> last day of the month, so one month later should really be the last day of
> that month" exception.  Nor, do I believe, should there be such an exception.

What is addmonth("Jan 30")?  Why?  :-)

Cheers,
-- jra
-- 
Jay R. Ashworth                   Baylink                      jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com                     '87 e24
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274

	     Those who cast the vote decide nothing.
	     Those who count the vote decide everything.
	       -- (Joseph Stalin)


More information about the Filepro-list mailing list