title: ActiveRecord: issue with 'find' method when querying dates
body: <p>I'm struggling with the conditions for date querying in the 'find' method on my ActiveRecord models running over an SQLite3 database.  My model is as follows:</p>
  
  <pre><code>Day:
    failure_day:   date
    failure_count: integer 
  </code></pre>
  
  <p>When I attempt to query Days, I get the following (pseudo code only):</p>
  
  <pre><code>Query:   Days.all
  Result:  [{failure_day: 2010-04-14, failure_count: 1}]
  
  Query:   Days.find(:first, :conditions=&gt;'failure_day &gt; 2010-02-01')
  Result:  {failure_day: 2010-04-14, failure_count: 1}
  
  Query:   Days.find(:first, :conditions=&gt;'failure_day = 2010-04-14')
  Result:  nil
  
  Query:   Days.find(:first, :conditions=&gt;'failure_day &lt; 2010-05-05')
  Result:  nil
  </code></pre>
  
  <p>What I can't understand is why the last two queries return 'nil'.  The first query (Days.all) proves that I have a record in my database.  The second one correctly matches 'failure_day' against a date that is less than 'failure_day', but when trying equal or less than it doesn't work.</p>
  
  <p>Any ideas?</p>