currentPeriod
function currentPeriod( reset, now, anchor?): UsagePeriod;Defined in: src/periods.ts:71
The usage window for reset at now.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reset |
ResetInterval |
now |
number |
anchor? |
PeriodAnchor |
Returns
Section titled “Returns”Example
Section titled “Example”currentPeriod("month", Date.parse("2026-11-20T10:00:00Z"));// { key: "m:2026-11", start: "2026-11-01T00:00:00.000Z", end: "2026-12-01T00:00:00.000Z" }