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

Function parse

packages/core/src/prompts/date.ts:52–58  ·  view source on GitHub ↗
(parts: DateParts)

Source from the content-addressed store, hash-verified

50}
51
52function parse(parts: DateParts): { year: number; month: number; day: number } {
53 return {
54 year: parseSegmentToNum(parts.year),
55 month: parseSegmentToNum(parts.month),
56 day: parseSegmentToNum(parts.day),
57 };
58}
59
60function daysInMonth(year: number, month: number): number {
61 return new Date(year || 2001, month || 1, 0).getDate();

Callers 4

validPartsFunction · 0.85
#adjustMethod · 0.85
#validateSegmentMethod · 0.85
#onFinalizeMethod · 0.85

Calls 1

parseSegmentToNumFunction · 0.85

Tested by

no test coverage detected