Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/time_ago.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.localized_format(time, locale: TimeAgo::DEFAULT_LOCALE) ⇒ Object



75
76
77
# File 'lib/time_ago.rb', line 75

def self.localized_format(time, locale: TimeAgo::DEFAULT_LOCALE)
  TimeAgo::format(time, locale: locale)
end

Instance Method Details

#ago(locale: TimeAgo::DEFAULT_LOCALE) ⇒ Object



79
80
81
# File 'lib/time_ago.rb', line 79

def ago(locale: TimeAgo::DEFAULT_LOCALE)
  TimeAgo::format(self, locale: locale)
end