Method: TimeCalc#iterate
- Defined in:
- lib/time_calc.rb
#iterate(span, unit) {|Time/Date/DateTime| ... } ⇒ Date, ...
Like #+, but allows conditional skipping of some periods. Increases value by ‘unit` at least `span` times, on each iteration checking with block provided if this point matches desired period; if it is not, it is skipped without increasing iterations counter. Useful for “business date/time” algorithms.
|
|
# File 'lib/time_calc.rb', line 193
|