From f4b7bbc91cc98c544e4d2271b86d9a13162b0734 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 14 Dec 2021 18:25:48 +0900 Subject: [PATCH] Tweak the graph x-axis label date formatting for better i18n --- frontend/src/app/shared/graphs.utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/shared/graphs.utils.ts b/frontend/src/app/shared/graphs.utils.ts index 51f3b3f3f..e0ffe841e 100644 --- a/frontend/src/app/shared/graphs.utils.ts +++ b/frontend/src/app/shared/graphs.utils.ts @@ -15,12 +15,11 @@ export const formatterXAxis = ( case '24h': return date.toLocaleTimeString(locale, { weekday: 'short', hour: 'numeric', minute: 'numeric' }); case '1w': - return date.toLocaleTimeString(locale, { month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }); case '1m': case '3m': case '6m': case '1y': - return date.toLocaleTimeString(locale, { month: 'short', day: 'numeric', hour: 'numeric' }); + return date.toLocaleTimeString(locale, { month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }); case '2y': case '3y': return date.toLocaleDateString(locale, { year: 'numeric', month: 'short', day: 'numeric' }); @@ -47,4 +46,4 @@ export const formatterXAxisLabel = ( case '3y': return null; } -}; \ No newline at end of file +};