From dfdf64af769b97d2342cf8b3c6fa25106bfb9acf Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 5 Feb 2024 09:52:51 -0500 Subject: Formatted date --- src/util.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index f7f9018..81a1e18 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,6 +1,13 @@ // Format date to a string function formatDate(date: Date): string { - const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' }; + const options: Intl.DateTimeFormatOptions = { + year: 'numeric', + month: 'long', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone + }; return new Date(date).toLocaleDateString(undefined, options); } -- cgit v1.2.3