I'm trying to step every N days between two dates. I tried the following code but is wasn't working because startDate and endDate are ActiveSupport::TimeWithZone objects and not DateTime objects like I thought.
startDate.step(endDate, step=7) { |d| puts d.to_s}
min.step(max, step=stepInt){ |d|
puts d.to_s
}
How do I covert the TimeWithZone object to a DateTime?