From 4b1eca73eb64c62ebdf668eb18d587510066bd9d Mon Sep 17 00:00:00 2001 From: Jay V Date: Tue, 16 Sep 2025 16:16:30 -0400 Subject: ignore: zen --- cloud/app/src/component/workspace/common.tsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 cloud/app/src/component/workspace/common.tsx (limited to 'cloud/app/src/component/workspace/common.tsx') diff --git a/cloud/app/src/component/workspace/common.tsx b/cloud/app/src/component/workspace/common.tsx new file mode 100644 index 000000000..fd1b8b1b6 --- /dev/null +++ b/cloud/app/src/component/workspace/common.tsx @@ -0,0 +1,27 @@ +export function formatDateForTable(date: Date) { + const options: Intl.DateTimeFormatOptions = { + day: "numeric", + month: "short", + hour: "numeric", + minute: "2-digit", + hour12: true, + } + return date.toLocaleDateString("en-GB", options).replace(",", ",") +} + +export function formatDateUTC(date: Date) { + const options: Intl.DateTimeFormatOptions = { + weekday: "short", + year: "numeric", + month: "short", + day: "numeric", + hour: "numeric", + minute: "2-digit", + second: "2-digit", + timeZoneName: "short", + timeZone: "UTC", + } + return date.toLocaleDateString("en-US", options) +} + + -- cgit v1.2.3