I have question about processing time in increments in my Rails app.
I have a Schedule model with these columns:
:user_id => 1,
:day => “Sunday”,
:start_at => “08:00AM”,
:end_at => “03:30PM”,
:average_time => “30” # this average time in minutes
I need to loop from the start_at
to the end_at
in 30-minute increments, like so:
08:00 AM
08:30 AM
09:00 AM
09:30 AM
10:00 AM
…
…
03:30 PM
How can I process the difference between times incrementally like this?