I have a number of seconds. Let\'s say 270921. How can I display that number saying it is xx days, yy hours, zz minutes, ww seconds?
Rails has an helper which converts distance of time in words. You can look its implementation: distance_of_time_in_words