<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -253,6 +253,19 @@ module Typus
                      end
           condition = [&quot;#{key} BETWEEN ? AND ?&quot;, interval.first.to_s(:db), interval.last.to_s(:db)]
           conditions = merge_conditions(conditions, condition)
+        when :date
+          interval = case value
+                     when 'today' then         nil
+                     when 'last_few_days' then 3.days.ago.to_date..Date.tomorrow
+                     when 'last_7_days' then   6.days.ago.midnight..Date.tomorrow
+                     when 'last_30_days' then  (Date.today &lt;&lt; 1)..Date.tomorrow
+                     end
+          if interval
+            condition = [&quot;#{key} BETWEEN ? AND ?&quot;, interval.first.to_s, interval.last.to_s]
+          elsif value == 'today'
+            condition = [&quot;#{key} = ?&quot;, Date.today.to_s]
+          end
+          conditions = merge_conditions(conditions, condition)
         when :integer, :string
           condition = { key =&gt; value }
           conditions = merge_conditions(conditions, condition)</diff>
      <filename>lib/typus/active_record.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>372b5c923538b9ecc1cdfd74af6052f657ef2edc</id>
    </parent>
    <parent>
      <id>6321a562f6d050a6c3245dfc279f505a0309f84e</id>
    </parent>
  </parents>
  <author>
    <name>Francesc Esplugas</name>
    <email>francesc@intraducibles.com</email>
  </author>
  <url>http://github.com/fesplugas/typus/commit/1d8c09b3b07411898edb18e0877309dcc83ee3e7</url>
  <id>1d8c09b3b07411898edb18e0877309dcc83ee3e7</id>
  <committed-date>2009-11-02T22:40:53-08:00</committed-date>
  <authored-date>2009-11-02T22:40:53-08:00</authored-date>
  <message>Merge branch 'master' of /Users/fesplugas/Documents/work/repos/typus</message>
  <tree>0a6451c64718adf310a2fd06afd15b8d7d0ef03a</tree>
  <committer>
    <name>Francesc Esplugas</name>
    <email>francesc@intraducibles.com</email>
  </committer>
</commit>
