Class: DashingContrib::Time
- Inherits:
-
Object
- Object
- DashingContrib::Time
- Defined in:
- lib/dashing-contrib/bottles/time.rb
Class Method Summary collapse
Class Method Details
.readable_diff(old_time, new_time = ::Time.now) ⇒ Object
6 7 8 9 |
# File 'lib/dashing-contrib/bottles/time.rb', line 6 def readable_diff(old_time, new_time = ::Time.now) t = ::Time.diff(new_time, old_time) "#{t[:day]}d #{t[:hour]}h #{t[:minute]}m" end |