From 1397cace53f3c0b471505fd7a8454c37f8bcf321 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Tue, 24 Dec 2024 15:13:30 +0100 Subject: [PATCH] ui: fix weekday mapper for x axis on >7d range --- frontend/app/types/dashboard/helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/types/dashboard/helper.ts b/frontend/app/types/dashboard/helper.ts index f1bd7be1f..b3c9932d7 100644 --- a/frontend/app/types/dashboard/helper.ts +++ b/frontend/app/types/dashboard/helper.ts @@ -16,7 +16,7 @@ export const getTimeString = (ts, period, density,) => { return weekdays[ date.getDay() ]; } else { const isPM = date.getHours() >= 12; - return `${ isPM ? date.getHours() - 12 : date.getHours() }:${ startWithZero(date.getMinutes()) } ${isPM? 'pm' : 'am'}`; + return `${weekdays[ date.getDay() ]} ${ isPM ? date.getHours() - 12 : date.getHours() }:${ startWithZero(date.getMinutes()) } ${isPM? 'pm' : 'am'}`; } } return `${ date.getDate() }/${ startWithZero(date.getMonth() + 1) } `;