Skip to content

Instantly share code, notes, and snippets.

@ravicious
Created December 22, 2008 13:02
Show Gist options
  • Save ravicious/38973 to your computer and use it in GitHub Desktop.
Save ravicious/38973 to your computer and use it in GitHub Desktop.
irb(main):002:0> require 'date'
=> true
irb(main):003:0> d = Date.new(2008, 12, 22)
=> #<Date: 4909645/2,0,2299161>
irb(main):004:0> d1 = Date.new(1993, 9, 28)
=> #<Date: 4898517/2,0,2299161>
irb(main):005:0> d - d1
=> Rational(5564, 1)
irb(main):006:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment