Start of the billing month: the most recent occurrence of the inferred
anniversary day, else the first of the calendar month. Returns (start, inferred).
The same day-of-month one month later, 00:00 UTC, in epoch ms; the year
wraps. The day is clamped to 28 so an anniversary on the 29th–31st cannot
skip a month into the wrong one — the same clamp month_start applies, so a
period start it produced always has a matching end.
Which of this model’s windows is over its share of the monthly limit, if
any — the verdict the sidebar’s flag, the watch frame and the cap
notification all read from. Go meters per model AND per window (5-hour =
20%, weekly = 50%, monthly = 100%), so any one of them counts; the shortest
window wins, being the most actionable. None for a free/unlimited model.
The same day-of-month one month earlier, keeping the time of day — the
inverse of next_month for the instants it can produce. The account API’s
monthly resetsAt is an anniversary time (09:14:35, not midnight), so its
period start has to carry that time of day back to the previous month.