Commits

ivirabyan committed fd2dc90

Fixed week interval issue with sqlite

  • Participants
  • Parent commits 23dc655

Comments (0)

Files changed (1)

             '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 + "`)",
-            'weeks':  "strftime('%%Y-%%W', `" + date_field + "`)",
+            'weeks':  "strftime('%%Y-%%m-%%d', julianday(`" + date_field + "`) - strftime('%%w', `" + date_field + "`) + 1)",
             'months': "strftime('%%Y-%%m-01', `" + date_field + "`)",          
             'years': "strftime('%%Y-01-01', `" + date_field + "`)",                     
         },