MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / formatDate

Function formatDate

webview-ui/src/utils/format.ts:16–27  ·  view source on GitHub ↗
(timestamp: number)

Source from the content-addressed store, hash-verified

14}
15
16export const formatDate = (timestamp: number) => {
17 const date = new Date(timestamp)
18 const locale = i18next.language || "en"
19
20 return date.toLocaleString(locale, {
21 month: "long",
22 day: "numeric",
23 hour: "numeric",
24 minute: "2-digit",
25 hour12: true,
26 })
27}
28
29export const formatTimeAgo = (timestamp: number) => {
30 const now = Date.now()

Callers 1

format.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected