mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 19:06:40 +00:00
Added an example of escaped "at" in a date filter.
Relates to https://github.com/fabpot/Twig/issues/330
This commit is contained in:
@@ -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``
|
||||
~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user