mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 22:40:22 +00:00
wip: zen
This commit is contained in:
parent
e3a7096e44
commit
918739057d
20 changed files with 1093 additions and 8 deletions
25
packages/console/app/src/routes/workspace/common.tsx
Normal file
25
packages/console/app/src/routes/workspace/common.tsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue