Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 647 Bytes

File metadata and controls

63 lines (43 loc) · 647 Bytes

TimeWarp

Usage

Installation

https://rubygems.org/gems/timewarp

Initialization

# pass your previous Time object
>  TimeWarp.set_delta_time Time.new(2006, 01, 02, 13, 43, 51)
=> 2006-01-02 13:43:51 -0700

Accessing Time Deltas

Years Ago

TimeWarp.years_ago
# => 7

Months Ago

TimeWarp.months_ago
# => 5

Weeks Ago

Planned for future release.

Days Ago

TimeWarp.days_ago
# => 22

Hours Ago

TimeWarp.days_ago
# => 22

Minutes Ago

TimeWarp.minutes_ago
# => 20

Seconds Ago

TimeWarp.seconds_ago
# => 45