(now: Date, window: PatchyHourWindow)
| 34 | // The night a late read belongs to, so the yawn plays once per night even |
| 35 | // when the window wraps past midnight. |
| 36 | export const getNightKey = (now: Date, window: PatchyHourWindow): string => { |
| 37 | const day = getWindowStartDay(now, window) ?? now; |
| 38 | return `${day.getFullYear()}-${day.getMonth() + 1}-${day.getDate()}`; |
| 39 | }; |
| 40 | |
| 41 | const FRIDAY = 5; |
| 42 |
no test coverage detected