[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6029] Re: Ref.: Re: Time.local bug?

From: Dave Thomas <Dave@...>
Date: 2000-11-03 11:52:10 UTC
List: ruby-talk #6029
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

In This Thread