Files
discourse/lib/age_words.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
231 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2013-02-05 14:16:51 -05:00
module AgeWords
def self.age_words(secs)
2015-12-01 21:06:37 +00: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
end