Iterating the dates in ruby on rails
问题 I am developing an application for reporting and analytic,where I need to generate data on a daily basis and put it in a CSV.To be more clear, if I take the report today like day one any how I can get the report thats already done, if I get the report tomorrow I should be able to get the data of today,yesterday. If i take after 4 days I should get the report starting from day 1 to day 4. How it can be done. Looking for heads up 回答1: How about this: today = Date.today tomorrow = today.next