Registry / utility / time-diff

time-diff

JSON →
library0.3.0rbrubygemsunverified

TimeDiff returns a hash with the difference between two times in terms of year, month, week, day, hour, minute, and second.

gem install time_diff
INSTALL
IMPORT
SIG · TIME-DIFF
T
time-diff
utilityrubyv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TimeDiff
✓ require 'time_diff'

Calculate the difference between two times

require 'time_diff' time1 = Time.now time2 = time1 + 3600 * 24 * 365 # 1 year later diff = TimeDiff.diff(time1, time2) puts diff[:year] # Output: 1
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
time-diff — gem install time-diff · libregistry