1``date_modify`` 2=============== 3 4.. versionadded:: 1.9.0 5 The date_modify filter has been added in Twig 1.9.0. 6 7The ``date_modify`` filter modifies a date with a given modifier string: 8 9.. code-block:: jinja 10 11 {{ post.published_at|date_modify("+1 day")|date("m/d/Y") }} 12 13The ``date_modify`` filter accepts strings (it must be in a format supported 14by the `strtotime`_ function) or `DateTime`_ instances. You can easily combine 15it with the :doc:`date<date>` filter for formatting. 16 17Arguments 18--------- 19 20* ``modifier``: The modifier 21 22.. _`strtotime`: https://secure.php.net/strtotime 23.. _`DateTime`: https://secure.php.net/DateTime 24