Module: StTools::Module::Time

Defined in:
lib/modules/time.rb

Instance Method Summary collapse

Instance Method Details

#human_ago(ago = true) ⇒ Object



17
18
19
# File 'lib/modules/time.rb', line 17

def human_ago(ago = true)
  ::StTools::Human.ago_in_words(self, ago)
end

#human_date(type = :full) ⇒ Object



5
6
7
# File 'lib/modules/time.rb', line 5

def human_date(type = :full)
  ::StTools::Human.format_time(self, :date, type)
end

#human_datetime(type = :full) ⇒ Object



13
14
15
# File 'lib/modules/time.rb', line 13

def human_datetime(type = :full)
  ::StTools::Human.format_time(self, :full, type)
end

#human_time(type = :full) ⇒ Object



9
10
11
# File 'lib/modules/time.rb', line 9

def human_time(type = :full)
  ::StTools::Human.format_time(self, :time, type)
end