Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit ccf5bb188334fe36b436562025e38abda155aacf 1 parent 5b28f8a
Russell Keith-Magee authored May 09, 2010

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 10  docs/ref/models/querysets.txt
10  docs/ref/models/querysets.txt
@@ -1571,15 +1571,15 @@ week_day
1571 1571
 
1572 1572
 For date/datetime fields, a 'day of the week' match.
1573 1573
 
  1574
+Takes an integer value representing the day of week from 1 (Sunday) to 7
  1575
+(Saturday).
  1576
+
1574 1577
 Example::
1575 1578
 
1576 1579
     Entry.objects.filter(pub_date__week_day=2)
1577 1580
 
1578  
-SQL equivalent::
1579  
-
1580  
-    SELECT ... WHERE EXTRACT('dow' FROM pub_date) = '2';
1581  
-
1582  
-(The exact SQL syntax varies for each database engine.)
  1581
+(No equivalent SQL code fragment is included for this lookup because
  1582
+implementation of the relevant query varies among different database engines.)
1583 1583
 
1584 1584
 Note this will match any record with a pub_date that falls on a Monday (day 2
1585 1585
 of the week), regardless of the month or year in which it occurs. Week days

0 notes on commit ccf5bb1

Please sign in to comment.
Something went wrong with that request. Please try again.