From c0ed0e9bdbf125f3863fcd024439d806750db9e2 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Tue, 11 Jun 2024 16:30:40 +0200 Subject: [PATCH] hotfix: watchlist date state tags --- frontend/src/routes/(app)/analytics/+page.server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/(app)/analytics/+page.server.ts b/frontend/src/routes/(app)/analytics/+page.server.ts index 3cbda4c55..78f089bfe 100644 --- a/frontend/src/routes/(app)/analytics/+page.server.ts +++ b/frontend/src/routes/(app)/analytics/+page.server.ts @@ -55,9 +55,9 @@ export const load: PageServerLoad = async ({ locals, fetch }) => { function timeState(date: string) { const eta = new Date(date); - if (eta.getDate() > TODAY.getDate()) { + if (eta.toLocaleDateString() > TODAY.toLocaleDateString()) { return { name: 'incoming', hexcolor: '#93c5fd' }; - } else if (eta.getDate() < TODAY.getDate()) { + } else if (eta.toLocaleDateString() < TODAY.toLocaleDateString()) { return { name: 'outdated', hexcolor: '#f87171' }; } else { return { name: 'today', hexcolor: '#fbbf24' };