I need to check if the given date is less than today’s date in html template file.
Refering to Pelican Jinja Date extension and conditional for comparing current datetime to object date. · GitHub , The code i used is
{% if course.start_date|convertdate < CURRDATE %}
Is there any way i can add ‘convertdate’ filter in jinja2 or is there any function available in jinja for date comparison???
@ninjas005, you can use the method before_print
to convert this comparization in a boolean variable, and use it in jinja