MCPcopy
hub / github.com/callumalpass/tasknotes / parseCalendarFirstDay

Function parseCalendarFirstDay

src/settings/tabs/appearanceTab.ts:40–43  ·  view source on GitHub ↗
(value: string, fallback: CalendarFirstDay)

Source from the content-addressed store, hash-verified

38}
39
40function parseCalendarFirstDay(value: string, fallback: CalendarFirstDay): CalendarFirstDay {
41 const parsed = Number.parseInt(value, 10);
42 return CALENDAR_FIRST_DAYS.find((day) => day === parsed) ?? fallback;
43}
44
45function isCalendarSlotDuration(value: string): value is CalendarSlotDuration {
46 return CALENDAR_SLOT_DURATIONS.some((duration) => duration === value);

Callers 1

renderAppearanceTabFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected