Re: A month of beating a dead horse.
Posted in 1993
In article <1qhiolINN2fg@emory.mathcs.emory.edu> alan@effluvia.den.mmc.com (Alan Popiel) writes: >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). Does it bother anybody else that we've changed some basic math rules here, e.g. (A - B + B) != A (!!) >Regards, >Alan P.S.: did anybody get my followups to Cathy's and Alan's response postings? They disappeared here, and I never saw them again. My main points were that when you mess with math rules to break associativity, there had better be a darn good consensus on what is "desirable" behavior. -- Alan Denney aland@informix.com {pyramid|uunet}!infmx!aland "My dog's not eating / he no longer barks he hit the propeller / and turned into sparks" -- Hank, Stu, Tom, & Hank, "I'm Looking over my Dead Dog Rover"