{"id":80188,"library":"time-diff","title":"TimeDiff","description":"TimeDiff returns a hash with the difference between two times in terms of year, month, week, day, hour, minute, and second.","status":"active","version":"0.3.0","language":"ruby","source_language":null,"source_url":"https://github.com/abhidsm/time_diff","tags":["time","date","difference","utility"],"install":[{"cmd":"gem install time_diff","lang":"bash","label":"gem install"},{"cmd":"# Gemfile\ngem 'time_diff', '~> 0.3.0'","lang":"ruby","label":"Gemfile"}],"dependencies":[],"imports":[{"symbol":"TimeDiff","correct":"require 'time_diff'"}],"quickstart":{"code":"require 'time_diff'\n\ntime1 = Time.now\ntime2 = time1 + 3600 * 24 * 365 # 1 year later\ndiff = TimeDiff.diff(time1, time2)\nputs diff[:year]  # Output: 1","lang":"ruby","description":"Calculate the difference between two times"},"warnings":[],"env_vars":null,"search_vec":"'date':24 'day':18 'differ':8,25 'hash':5 'hour':19 'minut':20 'month':16 'return':3 'second':22 'term':13 'time':11,23 'timediff':1,2 'two':10 'util':26 'week':17 'year':15","created_at":"2026-06-18T05:16:10.962527+00:00","updated_at":"2026-06-18T05:16:10.962527+00:00","problems":[],"ecosystem":"rubygems","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"http://github.com/abhidsm/time_diff","github":"https://github.com/abhidsm/time_diff","docs":"http://www.rubydoc.info/gems/time_diff/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-12-15","install_tag":null}}