summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src/component/workspace/common.tsx
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-09-16 16:16:30 -0400
committerJay V <[email protected]>2025-09-16 16:16:30 -0400
commit4b1eca73eb64c62ebdf668eb18d587510066bd9d (patch)
tree19be45b8df61b5db1514887e4307c2bc17f6b19d /cloud/app/src/component/workspace/common.tsx
parentfffcf69cd45ce98cee37b7bf455a81a69f0fe83c (diff)
downloadopencode-4b1eca73eb64c62ebdf668eb18d587510066bd9d.tar.gz
opencode-4b1eca73eb64c62ebdf668eb18d587510066bd9d.zip
ignore: zen
Diffstat (limited to 'cloud/app/src/component/workspace/common.tsx')
-rw-r--r--cloud/app/src/component/workspace/common.tsx27
1 files changed, 27 insertions, 0 deletions
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)
+}
+
+