$twig = new Twig_Environment($loader);
$twig->getExtension('core')->setTimezone('Europe/Paris');
-.. _`strtotime`: http://www.php.net/strtotime
-.. _`DateTime`: http://www.php.net/DateTime
-.. _`DateInterval`: http://www.php.net/DateInterval
-
-If the value passed to the ``date`` filter is null, it will return the current date by default.
-If an empty string is desired instead of the current date, use a ternary operator:
+If the value passed to the ``date`` filter is ``null``, it will return the
+current date by default. If an empty string is desired instead of the current
+date, use a ternary operator:
.. code-block:: jinja
{{ post.published_at is empty ? "" : post.published_at|date("m/d/Y") }}
+
+.. _`strtotime`: http://www.php.net/strtotime
+.. _`DateTime`: http://www.php.net/DateTime
+.. _`DateInterval`: http://www.php.net/DateInterval
{{ post.published_at|date_modify("+1 day")|date("m/d/Y") }}
-The ``date_modify`` filter accepts strings (it must be in a format supported by the
-`strtotime`_ function) or `DateTime`_ instances. You can easily combine it with the `date`_
-filter for formatting.
+The ``date_modify`` filter accepts strings (it must be in a format supported
+by the `strtotime`_ function) or `DateTime`_ instances. You can easily combine
+it with the :doc:`date </filters/date>` filter for formatting.
.. _`strtotime`: http://www.php.net/strtotime
.. _`DateTime`: http://www.php.net/DateTime