MCPcopy Create free account
hub / github.com/anomalyco/opencode / shift

Function shift

packages/console/core/src/util/date.ts:23–26  ·  view source on GitHub ↗
(year: number, month: number, delta: number)

Source from the content-addressed store, hash-verified

21 }
22
23 function shift(year: number, month: number, delta: number) {
24 const total = year * 12 + month + delta
25 return [Math.floor(total / 12), ((total % 12) + 12) % 12] as const
26 }
27
28 let y = now.getUTCFullYear()
29 let m = now.getUTCMonth()

Callers 1

getMonthlyBoundsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected