MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / formatSessionWhen

Function formatSessionWhen

demo/chat/session-api.ts:58–69  ·  view source on GitHub ↗
(iso: string)

Source from the content-addressed store, hash-verified

56}
57
58export function formatSessionWhen(iso: string): string {
59 try {
60 return new Date(iso).toLocaleString(undefined, {
61 month: "short",
62 day: "numeric",
63 hour: "2-digit",
64 minute: "2-digit",
65 });
66 } catch {
67 return iso;
68 }
69}

Callers 1

SessionSidebarFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected