1. Mikhail Korobov
  2. django-qsstats-magic

Commits

Steve Jones  committed 00ceb4c

Update master

  • Participants
  • Parent commits 98d9104
  • Branches default

Comments (0)

Files changed (1)

File qsstats/utils.py

View file
             'minutes': "strftime('%%Y-%%m-%%d %%H:%%M', `" + date_field + "`)",
             'hours': "strftime('%%Y-%%m-%%d %%H:00', `" + date_field + "`)",
             'days': "strftime('%%Y-%%m-%%d', `" + date_field + "`)",
-            # TODO: 'weeks': "strftime(DATE_SUB(`"+date_field+"`, INTERVAL(WEEKDAY(`"+date_field+"`)) DAY), '%%Y-%%m-%%d')",
+            'weeks':  "strftime('%%Y-%%W', `" + date_field + "`)",
             'months': "strftime('%%Y-%%m-01', `" + date_field + "`)",          
             'years': "strftime('%%Y-01-01', `" + date_field + "`)",                     
         },