MCPcopy
hub / github.com/prisma/prisma / daysSinceFirstCommand

Function daysSinceFirstCommand

packages/cli/src/utils/commandState.ts:38–42  ·  view source on GitHub ↗
(state: CommandState, now: Date = new Date())

Source from the content-addressed store, hash-verified

36 * Calculates the number of days since the first command was issued.
37 */
38export function daysSinceFirstCommand(state: CommandState, now: Date = new Date()): number {
39 const firstCommandDate = new Date(state.firstCommandTimestamp)
40 const diffTime = now.getTime() - firstCommandDate.getTime()
41 return Math.floor(diffTime / (1000 * 60 * 60 * 24))
42}

Callers 2

handleNpsSurveyImplFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected