MCPcopy
hub / github.com/CodebuffAI/codebuff / getNextQuotaReset

Function getNextQuotaReset

common/src/util/dates.ts:10–17  ·  view source on GitHub ↗
(referenceDate: Date | null)

Source from the content-addressed store, hash-verified

8 * @returns The Date object representing the next reset time.
9 */
10export 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
19export interface FormatTimeUntilOptions {
20 /**

Callers 3

getOrganizationAlertsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected