Project

timewarp

0.0
No commit activity in last 3 years
No release in over 3 years
Calculate the difference in time relative to now. Returns readable metrics (e.g. years_ago, days_ago, etc.)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

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