d.step(limit[, step=1]) â enumerator
d.step(limit[, step=1]){|date| ...} â self
d.step(limit[, step=1]){|date| ...} â self
Instance Public methods
Iterates evaluation of the given block, which takes a date object. The limit should be a date object.
Date.new(2001).step(Date.new(2001,-1,-1)).select{|d| d.sunday?}.size #=> 52
Please login to continue.