discourse/lib/age_words.rb
2016-03-31 17:40:54 -04:00

13 lines
200 B
Ruby

module AgeWords
def self.age_words(secs)
if secs.blank?
"—"
else
now = Time.now
FreedomPatches::Rails4.distance_of_time_in_words(now, now + secs)
end
end
end