This post is not yet over at tumblr! But it will be soon.
Sliced Software
August 29
Ruby date range to SQL
While working on a scheduling application tonight, I found a neat Ruby code snippet that lets you easily convert a Ruby date range to SQL.
(6.months.ago.to_date..1.year.ago.to_date).to_s(:db)
=> "BETWEEN '2005-07-27' AND '2005-01-22'"
Source

