Skip to main content

Function: resolveCalendarWindow()

resolveCalendarWindow(now, period): object

Defined in: javascript/src/allowance.ts:157

Resolve the calendar-aligned [start, end) window for a per-feature invocation-count limit cadence (FeatureLimit.period).

Unlike resolveAllowanceWindow, this resolver takes no anchor: every user resets at the same UTC instant. start/end are UTC-midnight Dates at DATE granularity; end is EXCLUSIVE (the window is [start, end)).

MUST exactly match bursar.allowance.resolve_calendar_window in Python (same Monday-start ISO week, same year boundary).

Parameters

now

Date

period

FeatureLimitPeriod

Returns

object

end

end: Date

start

start: Date