Dates can work as a range, so it's pretty easy to iterate over a range. The only real trick is how to output them as a formatted string, which can be found in the Date#strftime method, which is documented here .
from_date = Date.new(2011, 1, 1) to_date = Date.new(2011, 1, 10) (from_date..to_date).each { |d| puts d.strftime("%-d %B %Y and %-m/%-d/%Y") } # => 1 January 2011 and 1/1/2011 # => 2 January 2011 and 1/2/2011 # => ... # => 9 January 2011 and 1/9/2011 # => 10 January 2011 and 1/10/2011
(Note: I recall that I was not lucky with images with unread percentage formats such as %-d on Windows, but if the above does not work and you want them to be blank in this environment, you can remove the dash and use your own workarounds.)
source share