Iterative question

hi all
how to do a iterative for Time object,
i.e.
i wanna iterative from 2000/05/05 to now, output to a array

regards

joe wrote:

how to do a iterative for Time object,
i.e.
i wanna iterative from 2000/05/05 to now, output to a array

(time_a…time_b).to_a

Daniel

joe wrote:

hi all
how to do a iterative for Time object,
i.e.
i wanna iterative from 2000/05/05 to now, output to a array

regards

Date supports iteration:

startDate = Date.parse(‘2000/05/05’)
days = []
startDate.upto(Date.today){|day| days << day}

cheers