summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-03-27 18:53:03 +0200
committerTim Graham <timograham@gmail.com>2017-03-27 12:53:17 -0400
commit28cf32b2cb4e6385102be3192aea414be402e1a1 (patch)
tree6eeb037a11f7d799db2849500518cbc4301b1623 /docs/ref
parent4b00657f2437a9e3adb8d0d1fb74711a8ad50ead (diff)
[1.11.x] Fixed #27981 -- Doc'd date/time filter l10n changes in refs #25758.
Backport of 6585ebebaaa58aeef45210a3119dbaa322f8baca from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/templates/builtins.txt25
1 files changed, 19 insertions, 6 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 0a2e62a79b..d7d43d19f6 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -1470,12 +1470,18 @@ for example, ``"es"``, then for::
the output would be the string ``"09/01/2008"`` (the ``"SHORT_DATE_FORMAT"``
format specifier for the ``es`` locale as shipped with Django is ``"d/m/Y"``).
-When used without a format string::
+When used without a format string, the ``DATE_FORMAT`` format specifier is
+used. Assuming the same settings as the previous example::
{{ value|date }}
-...the formatting string defined in the :setting:`DATE_FORMAT` setting will be
-used, without applying any localization.
+outputs ``9 de Enero de 2008`` (the ``DATE_FORMAT`` format specifier for the
+``es`` locale is ``r'j \d\e F \d\e Y'``.
+
+.. versionchanged:: 1.10
+
+ In older versions, the :setting:`DATE_FORMAT` setting (without
+ localization) is always used when a format string isn't given.
You can combine ``date`` with the :tfilter:`time` filter to render a full
representation of a ``datetime`` value. E.g.::
@@ -2196,12 +2202,19 @@ attached timezone information (a :ref:`time-zone-aware
accept the timezone-related :ref:`format specifiers
<date-and-time-formatting-specifiers>` ``'e'``, ``'O'`` , ``'T'`` and ``'Z'``.
-When used without a format string::
+When used without a format string, the ``TIME_FORMAT`` format specifier is
+used::
{{ value|time }}
-...the formatting string defined in the :setting:`TIME_FORMAT` setting will be
-used, without applying any localization.
+is the same as::
+
+ {{ value|time:"TIME_FORMAT" }}
+
+.. versionchanged:: 1.10
+
+ In older versions, the :setting:`TIME_FORMAT` setting (without
+ localization) is always used when a format string isn't given.
.. templatefilter:: timesince