4 .. versionadded:: 1.9.0
5 The date_modify filter has been added in Twig 1.9.0.
7 The ``date_modify`` filter modifies a date with a given modifier string:
11 {{ post.published_at|date_modify("+1 day")|date("m/d/Y") }}
13 The ``date_modify`` filter accepts strings (it must be in a format supported
14 by the `strtotime`_ function) or `DateTime`_ instances. You can easily combine
15 it with the :doc:`date<date>` filter for formatting.
20 * ``modifier``: The modifier
22 .. _`strtotime`: http://www.php.net/strtotime
23 .. _`DateTime`: http://www.php.net/DateTime