MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / checkDateChange

Function checkDateChange

src/bootstrap/dateChangeDetection.ts:34–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 let midnightTimeout: number | null = null;
33
34 const checkDateChange = (): boolean => {
35 const currentDate = getDateKey();
36 if (currentDate === lastKnownDate) {
37 return false;
38 }
39
40 lastKnownDate = currentDate;
41 emitDateChanged();
42 return true;
43 };
44
45 const scheduleNextMidnightCheck = (): number => {
46 const msUntilMidnight = getMillisecondsUntilNextLocalMidnight(getNow());

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected