Ruby: format number of seconds to formatted time -


possible duplicate:
can ruby print out time difference (duration) readily?

i have length of time stored number of seconds. there way format either hh:mm format or human readable, such '2 hours, 15 minutes'?

easiest adapt code used in rails function: http://apidock.com/rails/actionview/helpers/datehelper/distance_of_time_in_words


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -