MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / timeAgo

Function timeAgo

test/fixtures.ts:79–87  ·  view source on GitHub ↗
(now: Date, days: number, minutesOffset = 0)

Source from the content-addressed store, hash-verified

77}
78
79function timeAgo(now: Date, days: number, minutesOffset = 0) {
80 return (
81 new Date(now.getTime() - days * 86_400_000 - minutesOffset * 60_000)
82 .toISOString()
83 .replace('T', ' ')
84 // biome-ignore lint/performance/useTopLevelRegex: test setup
85 .replace(/\.\d+Z$/, '')
86 );
87}
88
89function buildEvent(
90 now: Date,

Callers 3

buildEventFunction · 0.70
buildSessionFunction · 0.70
insertFixturesFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected