(from: Date = new Date())
| 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 => { |
| 50 | const periodEnd = new Date(from); |
| 51 | periodEnd.setUTCDate( |
| 52 | periodEnd.getUTCDate() + getDaysUntilWeeklyQuestReset(from), |
| 53 | ); |
| 54 | periodEnd.setUTCHours(0, 0, 0, 0); |
| 55 | |
| 56 | return periodEnd; |
| 57 | }; |
| 58 | |
| 59 | export const isOlderThan = (seconds: number, date: Date) => { |
| 60 | const currentDate = getTodayTz('UTC', new Date()); |
no test coverage detected