(from: Date = new Date())
| 43 | // DEFAULT_WEEK_START and the server's UTC rotation boundary. `|| 7` keeps the |
| 44 | // reset a full week out on Monday itself rather than collapsing to today. |
| 45 | export const getDaysUntilWeeklyQuestReset = (from: Date = new Date()): number => |
| 46 | (8 - from.getUTCDay()) % 7 || 7; |
| 47 | |
| 48 | // The instant the current weekly period ends (the next Monday at 00:00 UTC). |
| 49 | export const getWeeklyQuestPeriodEnd = (from: Date = new Date()): Date => { |
no outgoing calls
no test coverage detected