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

Function daysApart

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

Source from the content-addressed store, hash-verified

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

Callers 1

parseRangeFunction · 0.85

Calls 1

dayMsFunction · 0.70

Tested by

no test coverage detected