Ticket #12489: django12489.docs.diff

File django12489.docs.diff, 1.3 KB (added by v1v3kn, 14 years ago)

Documentation for the patch

  • querysets.txt

     
    16561656of the week), regardless of the month or year in which it occurs. Week days
    16571657are indexed with day 1 being Sunday and day 7 being Saturday.
    16581658
     1659.. fieldlookup:: day_of_year
     1660
     1661day_of_year
     1662~~~~~~~~~~~
     1663
     1664For date/datetime fields, a 'day of the year' match.
     1665
     1666Takes an integer value representing the day of the year from 1 to 366
     1667
     1668Example::
     1669
     1670    Entry.objects.filter(pub_date__day_of_year=209)
     1671
     1672(No equivalent SQL code fragment is included for this lookup because
     1673implementation of the relevant query varies among different database engines.)
     1674
     1675.. fieldlookup:: week_of_year
     1676
     1677week_of_year
     1678~~~~~~~~~~~~
     1679
     1680For date/datetime fields, a 'isoweek of the year' match.
     1681
     1682Returns the ISO week of the year, a decimal number between 1 and 53 . According to ISO
     1683standards, week number 1 is considered the first one which has a Thursday in the current year.
     1684
     1685Example::
     1686
     1687    Entry.objects.filter(pub_date__week_of_year=30)
     1688
     1689(No equivalent SQL code fragment is included for this lookup because
     1690implementation of the relevant query varies among different database engines.)
     1691
    16591692.. fieldlookup:: isnull
    16601693
    16611694isnull
    16621695
Back to Top