MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / formatDate

Function formatDate

packages/react/src/pages/api-keys.tsx:53–63  ·  view source on GitHub ↗
(value: string | null)

Source from the content-addressed store, hash-verified

51type CreatedKey = ApiKeySummary & { readonly value: string };
52
53const formatDate = (value: string | null): string => {
54 if (!value) return "Never";
55 const date = new Date(value);
56 return Number.isNaN(date.getTime())
57 ? value
58 : new Intl.DateTimeFormat(undefined, {
59 month: "short",
60 day: "numeric",
61 year: "numeric",
62 }).format(date);
63};
64
65const defaultKeyName = (kind: string): string =>
66 `${kind} ${new Intl.DateTimeFormat(undefined, {

Callers 1

KeyTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected