Hello Rails Community!Every time that I need to calculate a period of time and need to display it in a custom format I use a converter that works like this code below.31104002.to_s(:time, format: '%y-%m-%d %H:%M:%S')> '01-00-00 00:00:02'3602.to_s(:time, format: '%d %H:%M:%S')> '01 00:00:02'3602.to_s(:time, format: '%d days, %H hours, %M minutes and %S seconds')> '01 days, 00 hours, 00 minutes and 02 seconds'Is it helpful? Interesting?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.