Compare
Compare values for use in conditional expressions.
Compare
andReports whether the piped value and its argument are both truthy, reading
truthiness the way a template if does.{{ enabled | and:has_rows }}eqReports numeric equality across the int and float kinds, so 5 equals
5.0.{{ total | eq:5.0 }}gtReports whether the value falls after the given date, the gt clause
reached when both sides are real dates, so {{ expires_at | gt:now }} asks
whether a date is still ahead.{{ expires_at | gt:today }}gteReports whether the value falls on or after the given date, the same
stance GtTime takes on what counts as a date.{{ score | gte:70 }}ltReports whether the value falls before the given date, so
{{ starts_at | lt:now }} asks whether a date has passed.{{ starts_at | lt:today }}lteReports whether the value falls on or before the given date, the
same stance LtTime takes on what counts as a date.{{ days_left | lte:14 }}neqReports numeric inequality across the int and float kinds, so 5 and
5.0 are equal and this returns false for them.{{ count | neq:5.0 }}notInverts the truthiness of the value, following the same rules as a
template if.{{ name | not }}orReports whether either the piped value or its argument is truthy, reading
truthiness the way a template if does.{{ draft | not | or:published }}