def toSecond(stime)
 atime=stime.split("-")
 return Time.local(atime[0],atime[1],atime[2]).to_i
end

@start = "2006-01-20"
@stop = "2006-01-24"

array=Array.new
toSecond(@start).step(toSecond(@stop),86400) do |t|
 array.push(Time.at(t).strftime("%Y-%m-%d"))
end

puts array

# Is this ok?