From: sabbyxtabby@... (Sabby and Tabby) Date: 2003-11-28T01:42:21+09:00 Subject: Re: Time#succ ? "Ara.T.Howard" wrote: > anyone familiar with the 'jot' unix program? i think ranges should work like > that - eg. one should be able to define the increment > > day = 60 * 60 * 24 > > a = Time.now > b = Time.now + (7 * day) > > week = (a...b) > > week.each(step = day) do |weekday| > ... > end Maybe Range#step: day = 60*60*24 a = Time.now b = a + 7 * day (a..b).step(day) {|t| puts t} Unfortunately: ./gem:20:in `step': cannot iterate from Time (TypeError) A work-around: a = Time.now.to_i b = a + 7 * day (a..b).step(day) {|t| puts Time.at(t)}