title: Datetime arithmetic with a string in Ruby
body: <p>In Ruby, I'm trying to do the following.</p>
  
  <pre><code>def self.stats(since)
    return Events.find(:all, :select =&gt; 'count(*) as this_count', :conditions =&gt; ['Date(event_date) &gt;= ?', (Time.now - since)]).first.this_count
  end
  </code></pre>
  
  <p>where "since" is a string representing an amount of time ('1 hour', '1 day', '3 days') and so on. Any suggestions?</p>