Compare dates and get the difference

Standard comparison operators should do the trick. Here's an example
of what I am doing:

      now = Time.now
      days_ago = now.ago(days.to_i * (60*60*24))
      if p.sold_at > days_ago then
        yada yada
      end