DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Turn A Date Range Into SQL Conditions
From <a href="http://project.ioni.st/post/592#post-592">here</a> on Project.ioni.st.
(6.months.ago.to_date..1.year.ago.to_date).to_s(:db) => "BETWEEN '2005-07-27' AND '2005-01-22'"




