summaryrefslogtreecommitdiff
path: root/docs/ref/models/database-functions.txt
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2016-11-23 16:36:11 +0100
committerTim Graham <timograham@gmail.com>2017-06-28 10:10:09 -0400
commit43a4835edf32c57eb74c0eb207c276734a34abcf (patch)
treedf46a7430323734ae947295d0b636f1470186965 /docs/ref/models/database-functions.txt
parent63e9a71ec4917ddf7f4acbf69a7ccdafb76fb2ee (diff)
Fixed #27473 -- Added DurationField support to Extract.
Diffstat (limited to 'docs/ref/models/database-functions.txt')
-rw-r--r--docs/ref/models/database-functions.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt
index 9bb36ccafd..acddc7cbe4 100644
--- a/docs/ref/models/database-functions.txt
+++ b/docs/ref/models/database-functions.txt
@@ -331,12 +331,16 @@ We'll be using the following model in examples of each function::
Extracts a component of a date as a number.
-Takes an ``expression`` representing a ``DateField`` or ``DateTimeField`` and a
-``lookup_name``, and returns the part of the date referenced by ``lookup_name``
-as an ``IntegerField``. Django usually uses the databases' extract function, so
-you may use any ``lookup_name`` that your database supports. A ``tzinfo``
-subclass, usually provided by ``pytz``, can be passed to extract a value in a
-specific timezone.
+Takes an ``expression`` representing a ``DateField``, ``DateTimeField``,
+``TimeField``, or ``DurationField`` and a ``lookup_name``, and returns the part
+of the date referenced by ``lookup_name`` as an ``IntegerField``.
+Django usually uses the databases' extract function, so you may use any
+``lookup_name`` that your database supports. A ``tzinfo`` subclass, usually
+provided by ``pytz``, can be passed to extract a value in a specific timezone.
+
+.. versionchanged:: 2.0
+
+ Support for ``DurationField`` was added.
Given the datetime ``2015-06-15 23:30:01.000321+00:00``, the built-in
``lookup_name``\s return: