title: How to workout if a datetime is older than x months in Python
body: <p>I want to find out if a entry has been updated in the last 6 months.</p>
  
  <p>This is what I have tried:</p>
  
  <pre><code> def is_old(self):
          """
          Is older than 6 months (since last update)
          """
          time_threshold = datetime.date.today() - datetime.timedelta(6*365/12)
          if self.last_update &lt; time_threshold:
              return False
          return True
  </code></pre>
  
  <p>but i get the error: </p>
  
  <pre><code>    if self.last_update &lt; time_threshold:
  TypeError: can't compare datetime.datetime to datetime.date
  </code></pre>