Skip to content

Instantly share code, notes, and snippets.

@kmiscia
Created March 14, 2018 13:54
Show Gist options
  • Save kmiscia/7610afb6600c3e9d1c3b273f4d7478fd to your computer and use it in GitHub Desktop.
Save kmiscia/7610afb6600c3e9d1c3b273f4d7478fd to your computer and use it in GitHub Desktop.
[8] pry(main)> some_day_in_future = Date.today + 5.days
=> Mon, 19 Mar 2018
[9] pry(main)> today = Date.today
=> Wed, 14 Mar 2018
[11] pry(main)> duration = some_day_in_future - today
=> (5/1)
[12] pry(main)> duration.class
=> Rational
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment