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

Function dayMs

telemetry-dashboard/public/app.js:55–55  ·  view source on GitHub ↗
(day)

Source from the content-addressed store, hash-verified

53
54const utcDay = (atMs) => new Date(atMs).toISOString().slice(0, 10);
55const dayMs = (day) => Date.parse(`${day}T00:00:00Z`);
56const addDays = (day, delta) => utcDay(dayMs(day) + delta * DAY_MS);
57const isDay = (value) => /^\d{4}-\d{2}-\d{2}$/.test(value) && Number.isFinite(dayMs(value));
58

Callers 2

addDaysFunction · 0.70
isDayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected