1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #25240 -- Added ExtractWeek and exposed it through the __week lookup.

Thanks to Mariusz Felisiak and Tim Graham for review.
This commit is contained in:
Mads Jensen
2016-11-11 14:01:40 +01:00
committed by Tim Graham
parent 2dc07da497
commit 1446902be4
9 changed files with 126 additions and 5 deletions

View File

@@ -306,6 +306,11 @@ Models
* Added support for time truncation to
:class:`~django.db.models.functions.datetime.Trunc` functions.
* Added the :class:`~django.db.models.functions.datetime.ExtractWeek` function
to extract the week from :class:`~django.db.models.DateField` and
:class:`~django.db.models.DateTimeField` and exposed it through the
:lookup:`week` lookup.
* Added the :class:`~django.db.models.functions.datetime.TruncTime` function
to truncate :class:`~django.db.models.DateTimeField` to its time component
and exposed it through the :lookup:`time` lookup.