mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 20:26:35 +08:00
13 lines
229 B
Ruby
13 lines
229 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|