require 'date' a = Date.new(2005, 1, 1) b = Date.new(2015, 12, 31) (a..b).each do |i| end