From c0447ec6feda1fe489ea86577ae2fcde4297de09 Mon Sep 17 00:00:00 2001 From: Jason Bouffard Date: Tue, 17 May 2011 14:28:44 -0700 Subject: [PATCH] Added an example of escaped "at" in a date filter. Relates to https://github.com/fabpot/Twig/issues/330 --- doc/templates.rst | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) 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`` ~~~~~~~~~~ -- 1.7.2.5