mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-14 00:54:32 +08:00
Fix 'Last Week' filter in global activities [SCI-6481] (#3817)
This commit is contained in:
parent
85ad4a692a
commit
f3c36a957b
1 changed files with 2 additions and 2 deletions
|
@ -368,8 +368,8 @@ var globalActivities = (function() {
|
|||
var weekDay = today.getDay();
|
||||
var monday = new Date(new Date()
|
||||
.setDate(today.getDate() - weekDay - (weekDay === 0 ? 6 : -1)));
|
||||
var lastWeekEnd = new Date(new Date().setDate(monday.getDate() - 1));
|
||||
var lastWeekStart = new Date(new Date().setDate(monday.getDate() - 7));
|
||||
var lastWeekStart = new Date(monday.getTime() - (7 * 24 * 60 * 60 * 1000));
|
||||
var lastWeekEnd = new Date(lastWeekStart.getTime() + (6 * 24 * 60 * 60 * 1000));
|
||||
var firstDay = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
var lastMonthEnd = new Date(new Date().setDate(firstDay.getDate() - 1));
|
||||
var lastMonthStart = new Date(lastMonthEnd.getFullYear(), lastMonthEnd.getMonth(), 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue