Fix false since parameter being set in request

This commit is contained in:
Oracle 2026-06-15 10:54:31 +02:00
parent c04e80dbd9
commit 2354fc8361
Signed by: Oracle
SSH key fingerprint: SHA256:x4/RtnjUyuHkdvmwNDsWSfcfF1V5PNr3OpriZqOvCX8

View file

@ -136,16 +136,7 @@ const TOKEN = import.meta.env.PUBLIC_ACCESS_TOKEN || '';
return new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
}
function getWeekStart() {
var now = new Date();
var day = now.getDay();
var diff = now.getDate() - day + (day === 0 ? -6 : 1);
var monday = new Date(now.setDate(diff));
monday.setHours(0, 0, 0, 0);
return monday.getTime();
}
function getLast30Days() {
function getLast30Days() {
var now = new Date();
var monthAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000);
return { now: now.getTime(), monthAgo: monthAgo.getTime() };
@ -158,13 +149,20 @@ const TOKEN = import.meta.env.PUBLIC_ACCESS_TOKEN || '';
return monthStart.toISOString();
}
function getSinceDate() {
function getWeekStart() {
var now = new Date();
var day = now.getDay();
var diff = now.getDate() - day + (day === 0 ? -6 : 1);
var monday = new Date(now.setDate(diff));
monday.setHours(0, 0, 0, 0);
return monday.toISOString();
return monday.getTime();
}
function getSinceDate() {
var now = new Date();
var since = new Date(now.getFullYear(), now.getMonth(), 1);
since.setHours(0, 0, 0, 0);
return since.toISOString();
}
function getDayKey(dateStr) {