Commit 73cbf081 authored by Tim Graham's avatar Tim Graham
Browse files

[1.8.x] Fixed #25051 -- Clarified return type of {% now %} tag.

Backport of a871cf42 from master
parent e2acbfb6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -810,8 +810,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 %}