Mathieu Bouchard wrote:
> 
> > Please tell me this is a bug, not a feature.
> >   t = Time.local(2000,11,31)  # Nov 31, 2000 (nonexistent date)
> >   # t is now Dec 1, 2000 - no errors, no nothing
> > This is v. 1.6.0 on AIX.
> 
> This seems normal. Given that the day number is not above 31, there are
> several useful things to do with an invalid date:
> 
> 1. Round down to the last day of the month
> 2. Spill over to next month (feb 31, 2001, becomes mar 3, 2001)
> 3. Treat as 1st of the next month
> 4. Return nil or throw exception
> 
> The most useful case seems to be #2 (if you pick one, consider how you'd
> implement the three others in terms of the one you pick)
> 

I definitely agree that #2 is the most useful, at least, based on
my own past experience.  Sorry Hal, I think it is a feature.


Guy N. Hurst

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA - (757)623-9688
PHP/MySQL - Ruby/Perl - HTML/Javascript