Modifier: modify_date

Alters a timestamp by incrementing or decrementing in a format accepted by PHP’s native strtotime() method.

date: {{ now }}

{{ noparse }}

{{ date | modify_date:last Sunday }}
{{ date | modify_date:+3 months }}
{{ date | modify_date:-2 weeks }}

{{ /noparse }}

{{ now | modify_date:last Sunday }}
{{ now | modify_date:+3 months }}
{{ now | modify_date:-2 weeks }}

This modifier modifies the variable directly which will carry over to subsequent modifications, as shown in the above example.

Betterify this page on Github!