Ruby midpoint between two dates

From EggeWiki

I needed to find the midpoint between to dates. Unfortunately, I didn't have my HP12C handy, so I executed calculated the same in ruby.

<geshi lang="ruby"> require 'date' => true (Date.new(2009,07, 01) - Date.new(2009, 04, 01)).to_i => 91 (Date.new(2009, 04, 01) + 45).to_s => "2009-05-16" </geshi>