()
| 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()); |
no outgoing calls
no test coverage detected