MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / daysApart

Function daysApart

telemetry-dashboard/src/api.ts:78–78  ·  view source on GitHub ↗
(from: string, to: string)

Source from the content-addressed store, hash-verified

76const dayMs = (day: string): number => Date.parse(`${day}T00:00:00Z`);
77const addDays = (day: string, delta: number): string => utcDay(dayMs(day) + delta * DAY_MS);
78const daysApart = (from: string, to: string): number => Math.round((dayMs(to) - dayMs(from)) / DAY_MS);
79
80export interface Range {
81 from: string;

Callers 1

parseRangeFunction · 0.85

Calls 1

dayMsFunction · 0.70

Tested by

no test coverage detected