Compare date with a specific one and DateTime to string in Twig
As of twig 1.6+, the correct way of comparing dates according to the official docs is using the date
function:
{% if dom.dueDate > date('2012-12-31') %}
Try timestamps for comparison :
{% if dom.dueDate|date('U') > '2012-12-31'|date('U') %}
and this to add hours, minutes and seconds
{{ dom.dueDate|date('Y-m-d H:i:s') }}