MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / formatDate

Function formatDate

src/components/NewsPanel.tsx:41–49  ·  view source on GitHub ↗
(dateStr: string)

Source from the content-addressed store, hash-verified

39}
40
41function formatDate(dateStr: string): string {
42 const d = new Date(dateStr);
43 return d.toLocaleString(undefined, {
44 month: "short",
45 day: "numeric",
46 hour: "2-digit",
47 minute: "2-digit",
48 });
49}
50
51type ExtendedNewsItem = NewsItem & { relevance_score?: number };
52

Callers 1

NewsPopoverFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected