Re: A month of beating a dead horse.
Posted in 1993
Hi, Cathy, It sounds like we are really pretty much in agreement. Remember I said that "[date] + 1 month" was vague, not meaningless. "Feb 30" is (almost) meaning- less; so what we need to do is figure out what "1 month" means as an INTERVAL. My first cut of 31 days may have been too simple. How about: "[date] + 1 month" := "[date] + [number of days in current month], but not past [last day of next month]" Note that this uses Ruchi Patel's "number of days in a month" TWICE! My new formulation gives Feb 3 + 1 month = Mar 3 (always), instead of Mar 6 (or 5); and Jan 29/30/31 + 1 month becomes unambiguously Feb 28 (or 29 in leap years). BTW, SuperCalc 5.5 (the spreadsheet I use at home) displays the function DATE(02,30,93) as 03/02/93. Regards, Alan +------------------------------+---------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, LSC | ( Please note: My opinions do not ) | | P.O. Box 179, M/S 5422 | ( represent official Martin policy. ) | | Denver, Colorado 80201-0179 | Voice: 303-977-9998 | +------------------------------+---------------------------------------+