summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@thenicols.net>2018-03-22 00:00:39 +0000
committerTim Graham <timograham@gmail.com>2018-03-21 20:01:00 -0400
commit7f7bb1d1f4a4bad18ab4478099b9a7aa3dcfb62e (patch)
tree25e25ec787492bd701c6e2d01f647404c6e01dea /docs
parent83362cb94a730c1c88752313e2b1b10ed5f436c0 (diff)
[2.0.x] Clarified docs about ISO 8601 week numbering.
Backport of 0c100f8b57213dc41e23a280ca14f155eea576db from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/database-functions.txt7
-rw-r--r--docs/ref/models/querysets.txt2
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt
index 2b7b652a4b..4023de9182 100644
--- a/docs/ref/models/database-functions.txt
+++ b/docs/ref/models/database-functions.txt
@@ -221,9 +221,10 @@ returned when this timezone is active will be the same as above except for:
The ``week`` ``lookup_type`` is calculated based on `ISO-8601
<https://en.wikipedia.org/wiki/ISO-8601>`_, i.e.,
- a week starts on a Monday. The first week is the one with the majority
- of the days, i.e., a week that starts on or before Thursday. The value
- returned is in the range 1 to 52 or 53.
+ a week starts on a Monday. The first week of a year is the one that
+ contains the year's first Thursday, i.e. the first week has the majority
+ (four or more) of its days in the year. The value returned is in the range
+ 1 to 52 or 53.
Each ``lookup_name`` above has a corresponding ``Extract`` subclass (listed
below) that should typically be used instead of the more verbose equivalent,
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 13cc70be9f..b79f59d6a1 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -2884,7 +2884,7 @@ in the database <database-time-zone-definitions>`.
For date and datetime fields, return the week number (1-52 or 53) according
to `ISO-8601 <https://en.wikipedia.org/wiki/ISO-8601>`_, i.e., weeks start
-on a Monday and the first week starts on or before Thursday.
+on a Monday and the first week contains the year's first Thursday.
Example::