Skip to main content

date_modify

The date_modify filter allows you to modify a date by adding or subtracting days, months etc.

For example, if you wanted to generate an invoice ahead of time for a customer in May 2017, but the period of service it covers is June, you could put in the item description:

Service for {{invoice.date|date_modify("+1 month")|date("F Y") }}

This will print "Service for June 2017"