Iterating Over Dates : Date Range « Range « Ruby






Iterating Over Dates


require 'date'

(Date.new(1776, 7, 2)..Date.new(1776, 7, 4)).each { |x| puts x }

 








Related examples in the same category

1.Range based on DateTime
2.Range based on Time
3.DateTime Range