♻️ set default start time to 7 days ago

This commit is contained in:
Fred KISSIE
2025-12-08 23:56:28 +01:00
parent e0a79b7d4d
commit adf76bfb53
6 changed files with 50 additions and 56 deletions

View File

@@ -0,0 +1,7 @@
export function getSevenDaysAgo() {
const today = new Date();
today.setHours(0, 0, 0, 0); // Set to midnight
const sevenDaysAgo = new Date(today);
sevenDaysAgo.setDate(today.getDate() - 7);
return sevenDaysAgo;
}