Skip to content

Instantly share code, notes, and snippets.

@valachi
Last active December 17, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valachi/5641910 to your computer and use it in GitHub Desktop.
Save valachi/5641910 to your computer and use it in GitHub Desktop.
[46] pry(main)> date = _
=> Thu, 02 Jun 2011
[47] pry(main)> date + 1.year
=> Sat, 02 Jun 2012
[48] pry(main)> 1.year
=> 31557600.0
[49] pry(main)> days_in_year = 1.year / 60.0 / 60.0 / 24.0
=> 365.25
[50] pry(main)> date + days_in_year
=> Fri, 01 Jun 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment