From 0342610128cbf7b01ce4812ecac0d700890a87a7 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 8 Jul 2022 10:43:36 +0200 Subject: [PATCH] fix: remove 12 hour format --- src/lib/helpers/date.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/helpers/date.ts b/src/lib/helpers/date.ts index 2fb0c93ba..93a71d264 100644 --- a/src/lib/helpers/date.ts +++ b/src/lib/helpers/date.ts @@ -1,6 +1,11 @@ export const toLocaleDate = (timestamp: number) => { const date = new Date(timestamp * 1000); - const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' }; + const options: Intl.DateTimeFormatOptions = { + year: 'numeric', + month: 'long', + day: 'numeric', + hour12: false + }; return date.toLocaleDateString('en', options); }; @@ -12,7 +17,8 @@ export const toLocaleDateTime = (timestamp: number) => { month: 'long', day: 'numeric', hour: 'numeric', - minute: 'numeric' + minute: 'numeric', + hour12: false }; return date.toLocaleDateString('en', options);