I am trying to group a date / time list in Jinja by month / year. Here is the code that I have right now:
{% for group in EventsList|groupby('date') %} <b>{{group.grouper}}</b><br /> {% for event in group.list %} <i>{{event.title}}</i> {% endfor %} {% endfor %}
But the problem is that at the moment it is grouped by a certain date. I would like to group by month / year (e.g. January 2011, February 2011, etc.).
Would it be more efficient to do this in Python?
thanks!
source share