From: Sky Yin Date: 2006-01-15T00:52:41+09:00 Subject: Duration between two days ------=_Part_37943_21369839.1137253947560 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline According to the Rdoc of Date class, operator '-(x)' is described as: If x is a Date , return the 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: >require 'date' true >a =3D Date.new 2004, 1, 1 # >b =3D Date.new 2004, 1, 3 # >b - a Rational(2, 1) Basic math tells me 2/1 =3D 2, so what's the point of returning Rational instead of Fixnum here? Thanks. ------=_Part_37943_21369839.1137253947560--