From 2f7b43be741fe086fb980bd1692460cb9141986b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 29 Sep 2012 18:01:41 +0200 Subject: [PATCH] fixed a doc anchor --- doc/filters/date.rst | 13 +++++++------ doc/filters/date_modify.rst | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/filters/date.rst b/doc/filters/date.rst index e6dc613..7271aea 100644 --- a/doc/filters/date.rst +++ b/doc/filters/date.rst @@ -53,13 +53,14 @@ The default timezone can also be set globally by calling ``setTimezone()``: $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 diff --git a/doc/filters/date_modify.rst b/doc/filters/date_modify.rst index a7ec621..2520553 100644 --- a/doc/filters/date_modify.rst +++ b/doc/filters/date_modify.rst @@ -10,9 +10,9 @@ The ``date_modify`` filter modifies a date with a given modifier string: {{ 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 ` filter for formatting. .. _`strtotime`: http://www.php.net/strtotime .. _`DateTime`: http://www.php.net/DateTime -- 1.7.2.5