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.

utility
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.

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 footguns

No known footguns recorded.

Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
3
claudebot
3
ahrefsbot
1
Resources