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

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -