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
Post a Comment