Skip to content

Commit

Permalink
Fixed #25051 -- Clarified return type of {% now %} tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Jul 4, 2015
1 parent f5d5867 commit a871cf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/ref/templates/builtins.txt
Expand Up @@ -814,8 +814,8 @@ This would display as "It is the 4th of September".


You can also use the syntax ``{% now "Y" as current_year %}`` to store the
output inside a variable. This is useful if you want to use ``{% now %}``
inside a template tag like :ttag:`blocktrans` for example::
output (as a string) inside a variable. This is useful if you want to use
``{% now %}`` inside a template tag like :ttag:`blocktrans` for example::

{% now "Y" as current_year %}
{% blocktrans %}Copyright {{ current_year }}{% endblocktrans %}
Expand Down

0 comments on commit a871cf4

Please sign in to comment.