On Sun, 25 Jan 2004 03:29:56 +0900, Gavin Kistner wrote:
> Yukihiro Matsumoto wrote:
>>> Parse Date returns illegal values in a date. Ex:
>> ParseDate is easily fooled by incomplete input.
> I think the point is that it's understandable that it may be fooled.
> However, once it has attempted to create the answer, it should at least
> ensure that the month is valid (jan-dec, not month "20") and that the
> number of days is allowed within that month in that year.

> I myself am a fan of the way Javascript handles invalid dates. For
> example:

> someDate = new Date("9/31/2003");
> someDate.toString();
> => "Wed Oct 01 2003 00:00:00 GMT-0600 (MDT)"

> Basically, seconds, minutes, hours, days, and months which are larger
> than a legal value are modded to the valid range, and then increment the
> next larger unit.

Yuck. IMO, standard date classes should expect valid dates to be passed. 
This is something that I'd expect from something like "FuzzyDate", which has 
its value. But if someone gives me an invalid date, I want an error thrown!

-austin
--
austin ziegler    * austin / halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2004.01.24
                                         * 14.18.40