David Suarez de Lis <excalibor / demasiado.com> writes: > > /* value validation */ > > if ( tm->tm_year < 69 > > || tm->tm_mon < 0 || tm->tm_mon > 11 > > || tm->tm_mday < 1 || tm->tm_mday > 31 > > || tm->tm_hour < 0 || tm->tm_hour > 23 > > || tm->tm_min < 0 || tm->tm_min > 59 > > || tm->tm_sec < 0 || tm->tm_sec > 60) > > rb_raise(rb_eArgError, "argument out of range"); > > So, months start to count in 0, but days in 1... I have always > wondered why this aberrant asimmetry... Why is it? And more > importantly, can we throw it away? What would we be breaking? That's an internal thing. In Ruby code, months are as you'd expect: Time.local(2000, 1, 1, 0, 0) # => Sat Jan 01 00:00:00 CST 2000 Time.local(2000, 12, 1, 0, 0) # => Fri Dec 01 00:00:00 CST 2000 > Also, ISO 8601, allows hour '24' as a equivalent to '00' and I have > read somewhere that the may be a second '61' some times, but I > haven't found that in any official document, so there's nothing > solid in that... Well, seconds run from 0 to 60, so Ruby does allow you to have 61 second minutes. These are leap minutes. Time.local 59, 49, 5, 3, 11, 2000, 5, 308, false, "CST"# => Fri Nov 03 05:49:59 CST 2000 Time.local 60, 49, 5, 3, 11, 2000, 5, 308, false, "CST"# => Fri Nov 03 05:50:00 CST 2000 Regards Dave