Added an example of escaped "at" in a date filter.
authorJason Bouffard <jasonbouffard@gmail.com>
Tue, 17 May 2011 21:28:44 +0000 (14:28 -0700)
committerJason Bouffard <jasonbouffard@gmail.com>
Tue, 17 May 2011 21:28:44 +0000 (14:28 -0700)
Relates to https://github.com/fabpot/Twig/issues/330

doc/templates.rst

index 72e866a..aabeb7a 100644 (file)
@@ -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``
 ~~~~~~~~~~