Skip to content

Instantly share code, notes, and snippets.

@fatosmorina
Created April 28, 2019 08:25
Show Gist options
  • Save fatosmorina/3ecec32d23c44bb006f04aead5bf4dc1 to your computer and use it in GitHub Desktop.
Save fatosmorina/3ecec32d23c44bb006f04aead5bf4dc1 to your computer and use it in GitHub Desktop.
start_time = Time.new(2013,1)
end_time = Time.new(2014,1)
TimeDifference.between(start_time, end_time).humanize
=> "12 Months and 5 Days"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment