From ccf5bb188334fe36b436562025e38abda155aacf Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sun, 9 May 2010 04:50:00 +0000 Subject: [PATCH] Fixed #13282 -- Clarified documentation around week_day filtering in querysets. Thanks to wangchun, Ramiro Morales and timo. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13155 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/models/querysets.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 44c4145e9c0..b9f6656cf6a 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1571,15 +1571,15 @@ week_day For date/datetime fields, a 'day of the week' match. +Takes an integer value representing the day of week from 1 (Sunday) to 7 +(Saturday). + Example:: Entry.objects.filter(pub_date__week_day=2) -SQL equivalent:: - - SELECT ... WHERE EXTRACT('dow' FROM pub_date) = '2'; - -(The exact SQL syntax varies for each database engine.) +(No equivalent SQL code fragment is included for this lookup because +implementation of the relevant query varies among different database engines.) Note this will match any record with a pub_date that falls on a Monday (day 2 of the week), regardless of the month or year in which it occurs. Week days