Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/mumuki/domain/extensions/time.rb

Instance Method Summary collapse

Instance Method Details

#round_years_since(another_time) ⇒ Object



2
3
4
# File 'lib/mumuki/domain/extensions/time.rb', line 2

def round_years_since(another_time)
  (self.to_s(:number).to_i - another_time.to_s(:number).to_i) / 10e9.to_i
end