MCPcopy
hub / github.com/simstudioai/sim / formatDateLabel

Function formatDateLabel

packages/emcn/src/components/calendar/calendar.tsx:71–75  ·  view source on GitHub ↗
(value: string | Date | undefined)

Source from the content-addressed store, hash-verified

69 * string when there is no parseable date — callers fall back to a placeholder.
70 */
71export function formatDateLabel(value: string | Date | undefined): string {
72 const date = parseDateValue(value)
73 if (!date) return ''
74 return date.toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })
75}
76
77/**
78 * Compact label for a date range (e.g. `May 8 - May 12, 2026`). Mirrors

Callers 2

formatDateRangeLabelFunction · 0.85

Calls 1

parseDateValueFunction · 0.70

Tested by

no test coverage detected