2
我正在写一个迭代使用日期给定的开始和结束日期,我需要在循环内的日期的方法。这样的事情:通过在Rails中的日期迭代
start_date = 2013/03/12
end_date = 2013/11/20
# from start_date to end_date do |f|
puts date_this_iteration_is_processing
end
有人可以帮我这个吗?
我已经阅读了这些问题,但并未指出如何确定给定迭代的日期。
How to Loop through Months in Ruby on Rails Iterating the dates in ruby on rails