Date Ruby

require 'date'
day_one = DateTime.new(1999, 12, 31)
day_two = DateTime.new(2000, 1, 1)
day_two - day_one                           # => Rational(1, 1)
day_one - day_two                           # => Rational(-1, 1)