From b404bd5d856c9a3767fb3a256d3ec3d451a1fc06 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 20 Sep 2020 18:24:22 +0200 Subject: [PATCH] don't get it twice --- src/dashboard/components/RangeChooser.svelte | 4 ++-- src/dashboard/pages/Dashboard.svelte | 23 ++++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/dashboard/components/RangeChooser.svelte b/src/dashboard/components/RangeChooser.svelte index 8ff0d68..5bac26f 100644 --- a/src/dashboard/components/RangeChooser.svelte +++ b/src/dashboard/components/RangeChooser.svelte @@ -8,8 +8,8 @@ function set(interval, amount = 1) { return () => { - start = dj().subtract(amount, interval).toDate() - end = new Date() + start = dj().subtract(amount, interval).startOf('day').toDate() + end = dj().endOf('day').toDate() } } diff --git a/src/dashboard/pages/Dashboard.svelte b/src/dashboard/pages/Dashboard.svelte index a2f5e54..34e0ce7 100644 --- a/src/dashboard/pages/Dashboard.svelte +++ b/src/dashboard/pages/Dashboard.svelte @@ -1,8 +1,6 @@