MCPcopy
hub / github.com/seanprashad/leetcode-patterns / initReminder

Function initReminder

src/lib/reminders.ts:21–24  ·  view source on GitHub ↗
(solvedDate: string)

Source from the content-addressed store, hash-verified

19
20// Create the first reminder from a solved date
21export function initReminder(solvedDate: string): Reminder {
22 const dateOnly = solvedDate.slice(0, 10);
23 return { nextReview: addDays(dateOnly, SCHEDULE[0]), interval: SCHEDULE[0] };
24}
25
26// Advance to the next interval. Returns null if past the last interval (schedule complete).
27export function advanceReminder(current: Reminder): Reminder | null {

Callers 2

RoadmapViewFunction · 0.90
reminders.test.tsFile · 0.90

Calls 1

addDaysFunction · 0.70

Tested by

no test coverage detected