title: How to compare two dates in Jinja2?
body: <p>Is there a specific way of comparing two dates in Jinja?</p>
  
  <p>I have googled and searched but have found close to nothing related to this specific question.</p>
  
  <p>The closest thing I have found is this, from the official Jinja2 documentation:</p>
  
  <pre><code>It is also possible to sort by an attribute (for example to sort by the date of an object) by specifying the attribute parameter:
  
  {% for item in iterable|sort(attribute='date') %}
      ...
  {% endfor %}
  </code></pre>