On Apr 13, 11:23 pm, Daniel Waite <rabbitb... / gmail.com> wrote:
> Ack, some amendments...
>
> Is there _another_ way to get at the result of that operation (an
> integer) besides the one I posted above?
>
> And, I suppose a better title would have been "Faster date math."
>
> --
> Posted viahttp://www.ruby-forum.com/.

irb(main):001:0> ((Date.today + 90) - Date.today).to_i
=> 90

Subtracting Dates from each other returns a Rational.

irb(main):002:0> (Date.today + 90) - Date.today
=> Rational(90, 1)

You can just coerce that into an integer.  No intermediate Array
required.

HTH,
Chris