People who code: we want your input. Take the Survey

New answers tagged

0

If you feel like a preprocess function is overload and if you can afford to ignore timezones, try converting both date values to Unix timestamps to make them properly comparable. And prefer raw node values over formatted content values: {% if ('now'|date('U') > node.field_closing_date.0.value|date('U')) %} Past {% endif %}


Top 50 recent answers are included