diff options
| author | Jay V <[email protected]> | 2025-09-16 16:16:30 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-09-16 16:16:30 -0400 |
| commit | 4b1eca73eb64c62ebdf668eb18d587510066bd9d (patch) | |
| tree | 19be45b8df61b5db1514887e4307c2bc17f6b19d /cloud/app/src/component/workspace/common.tsx | |
| parent | fffcf69cd45ce98cee37b7bf455a81a69f0fe83c (diff) | |
| download | opencode-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.tsx | 27 |
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) +} + + |
