According to the Rdoc of Date class, operator ‘-(x)’ is described as:
If x is a Date http://www.ruby-doc.org/core/classes/Date.html, return
number of days between the two dates; or, more precisely, how many days
later the current date is than x.
However, a quick test in irb gives me a weird result:
a = Date.new 2004, 1, 1
b = Date.new 2004, 1, 3
b - a
Basic math tells me 2/1 = 2, so what’s the point of returning Rational
instead of Fixnum here?