Paul Nichols wrote:
I'm calculating the duration of an event by simply doing 'end_time -
start_time'. This outputs the time in seconds.
However, i'd like this to be displayed in hours, minutes and seconds in
Is this possible?
I'm not aware of any Rails methods for this, so here is my implementation:
seconds = time % 60
minutes = (time / 60) % 60
hours = (time / 3600) % 60