From 5261c30f7ede1b5f239a58401ed3e2b27130acc2 Mon Sep 17 00:00:00 2001 From: Bernd Storath <999999bst@gmail.com> Date: Wed, 15 Jan 2025 09:20:33 +0100 Subject: [PATCH] remove dateTime helper --- src/app/components/ClientCard/LastSeen.vue | 2 +- src/app/utils/math.ts | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/app/components/ClientCard/LastSeen.vue b/src/app/components/ClientCard/LastSeen.vue index 99c233cd..7836047b 100644 --- a/src/app/components/ClientCard/LastSeen.vue +++ b/src/app/components/ClientCard/LastSeen.vue @@ -2,7 +2,7 @@ ยท {{ timeago(new Date(client.latestHandshakeAt)) }} diff --git a/src/app/utils/math.ts b/src/app/utils/math.ts index 9592e333..1755d699 100644 --- a/src/app/utils/math.ts +++ b/src/app/utils/math.ts @@ -20,17 +20,6 @@ export function bytes( return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`; } -export function dateTime(value: Date) { - // TODO: results in mismatch because of different locales - return new Intl.DateTimeFormat(undefined, { - year: 'numeric', - month: 'short', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - }).format(value); -} - /** * Sorts an array of objects by a specified property in ascending or descending order. *