(referenceDate: Date | null)
| 8 | * @returns The Date object representing the next reset time. |
| 9 | */ |
| 10 | export const getNextQuotaReset = (referenceDate: Date | null): Date => { |
| 11 | const now = new Date() |
| 12 | let nextMonth = new Date(referenceDate ?? now) |
| 13 | while (nextMonth <= now) { |
| 14 | nextMonth.setMonth(nextMonth.getMonth() + 1) |
| 15 | } |
| 16 | return nextMonth |
| 17 | } |
| 18 | |
| 19 | export interface FormatTimeUntilOptions { |
| 20 | /** |
no outgoing calls
no test coverage detected