From 85459d6eaaceaf565c4535aa77509121350bebdf Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 4 Nov 2022 16:23:07 -0700 Subject: [PATCH 1/2] Updated week calculation. Signed commit. Fixes #85 --- src/components/contracts/FilterPanel.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/contracts/FilterPanel.vue b/src/components/contracts/FilterPanel.vue index c26fc2a..d462343 100644 --- a/src/components/contracts/FilterPanel.vue +++ b/src/components/contracts/FilterPanel.vue @@ -181,11 +181,12 @@ export default { break; case 'week': { const curr = start.getDay(), - diff = start.getDate() - curr + (curr === 0 ? -6 : 1); + diffB = start.getDate() - curr + (curr === 0 ? -6 : 1), + diffE = start.getDate() + 6 - (curr === 0 ? 7 : curr); - start.setDate(diff); + start.setDate(diffB); start.setHours(0, 0, 0, 0); - end.setDate(start.getDate() + 7); + end.setDate(diffE); end.setHours(23, 59, 59, 999); break; @@ -403,4 +404,4 @@ body.win32 { } } } - \ No newline at end of file + From 3e16a8be61a821ee5ffbbeb85d6759ab49fd760a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 4 Nov 2022 17:58:35 -0700 Subject: [PATCH 2/2] Updated week formula. Fixes #85 --- src/components/contracts/FilterPanel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/contracts/FilterPanel.vue b/src/components/contracts/FilterPanel.vue index d462343..b4ac19a 100644 --- a/src/components/contracts/FilterPanel.vue +++ b/src/components/contracts/FilterPanel.vue @@ -404,4 +404,4 @@ body.win32 { } } } - + \ No newline at end of file