2012-01-27 Ruby 1.8.7 前日のTimeオブジェクトを取得する Ruby 1.9.3ならDateクラスで前日オブジェクト作って#to_timeする 1.9.3-p0 require 'date' p ( Date.today - 1 ).to_time Ruby 1.8.7 にDate#to_timeがない事を知り、やり方をいくつか考えてみた 1.8.7-p357