(solvedDate: string)
| 19 | |
| 20 | // Create the first reminder from a solved date |
| 21 | export 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). |
| 27 | export function advanceReminder(current: Reminder): Reminder | null { |
no test coverage detected