From: Axel Etzold Date: 2007-05-15T04:56:29+09:00 Subject: Re: Time range help Try this: t1 = Time.mktime(2001,3,15,21,30,15) t2= Time.mktime(2001,3,19,21,30,15) (t1.day..t2.day).each_with_index{|x,i| puts "Day #{i} was ... #{x}" } # ... and ... p t1.methods gives ... for months : t1.mon etc ... Best regards, Axel > I have 2 time objects and want to iterate over them by day. I figured > out that I can do: > a = Time.mktime(2007,5,1,0,0,0) > b = Time.mktime(2007,5,7,0,0,0) > (a..b).each { |val| > code goes here > } > but when I do that it iterates over seconds. Does anyone have a > suggestion on how to iterate over a different period when using Time > objects? > > -- > Posted via http://www.ruby-forum.com/. -- Psssst! Schon vom neuen GMX MultiMessenger geh�rt? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger