From: Jason Bouffard Date: Tue, 17 May 2011 21:28:44 +0000 (-0700) Subject: Added an example of escaped "at" in a date filter. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c0447ec6feda1fe489ea86577ae2fcde4297de09;p=web%2Fkonrad%2Ftwig.git Added an example of escaped "at" in a date filter. Relates to https://github.com/fabpot/Twig/issues/330 --- diff --git a/doc/templates.rst b/doc/templates.rst index 72e866a..aabeb7a 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -1137,6 +1137,12 @@ word "now": {{ "now"|date("m/d/Y") }} +To escape words and characters in the date format use ``\\`` in front of each character: + +.. code-block:: jinja + + {{ post.published_at|date("F jS \\a\\t g:ia") }} + ``format`` ~~~~~~~~~~