2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-02-05 14:16:51 -05:00
|
|
|
module AgeWords
|
|
|
|
|
|
|
|
def self.age_words(secs)
|
2015-12-01 16:06:37 -05:00
|
|
|
if secs.blank?
|
|
|
|
"—"
|
|
|
|
else
|
|
|
|
now = Time.now
|
|
|
|
FreedomPatches::Rails4.distance_of_time_in_words(now, now + secs)
|
|
|
|
end
|
2013-02-05 14:16:51 -05:00
|
|
|
end
|
|
|
|
|
2013-03-13 03:05:21 -04:00
|
|
|
end
|