MCPcopy
hub / github.com/bombshell-dev/clack / segmentsFor

Function segmentsFor

packages/core/src/prompts/date.ts:24–26  ·  view source on GitHub ↗
(fmt: DateFormat)

Source from the content-addressed store, hash-verified

22} as const;
23
24function segmentsFor(fmt: DateFormat): SegmentConfig[] {
25 return [...fmt].map((c) => SEGMENTS[c as keyof typeof SEGMENTS]);
26}
27
28function detectLocaleFormat(locale?: string): { segments: SegmentConfig[]; separator: string } {
29 const fmt = new Intl.DateTimeFormat(locale, {

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected