Skip to content

Commit

Permalink
UI-1702: fixed the 'this week' filter on call logs so that it works o…
Browse files Browse the repository at this point in the history
…n sundays too
  • Loading branch information
mroux committed Jul 20, 2015
1 parent 03da3ca commit b315a30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion submodules/callLogs/callLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ define(function(require){
case 'thisWeek':
// First we need to know how many days separate today and monday.
// Since Sunday is 0 and Monday is 1, we do this little substraction to get the result.
var countDaysFromMonday = (from.getDay() - 1) % 7;
var day = from.getDay(),
countDaysFromMonday = (day||7) - 1;
from.setDate(from.getDate() - countDaysFromMonday);

break;
Expand Down

0 comments on commit b315a30

Please sign in to comment.