Assuming the Gregorian calendar, "one month from today" is well defined for 98.15% of all dates, and there are a few logical options for the other 1.85%. It's true you can't define "one month" as a constant amount of time, but providing a method to return one month after a given date is a reasonable thing to do.
On Fri, Feb 20, 2009 at 5:58 PM, Dave Rolsky <auta...@urth.org> wrote: > On Fri, 20 Feb 2009, mark.a.big...@comcast.net wrote: > >> "one month from today" is ill-defined regardless what time system you are >> using. There are dates from which "one month from today" can be reasonably >> argued to be any of 5 different days. This is why bank contracts are always >> to be written to say 30, 60 or 90 days not 1, 2 or 3 months from now. > > It is ill-defined, but a good API can make something reasonable out of it. I > refer you to DateTime and DateTime::Duration, which provide a reasonable API > for this. > > > -dave > > /*============================================================ > http://VegGuide.org http://blog.urth.org > Your guide to all that's veg House Absolute(ly Pointless) > ============================================================*/ > -- Mark J. Reed <markjr...@gmail.com>