Class: Time
- Inherits:
-
Object
- Object
- Time
- 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
32 33 34 |
# File 'lib/time_ago.rb', line 32 def self.localized_format(time, locale: TimeAgo::DEFAULT_LOCALE) TimeAgo.format(time, locale: locale) end |
Instance Method Details
#ago(locale: TimeAgo::DEFAULT_LOCALE) ⇒ Object
36 37 38 |
# File 'lib/time_ago.rb', line 36 def ago(locale: TimeAgo::DEFAULT_LOCALE) TimeAgo.format(self, locale: locale) end |