MCPcopy Create free account
hub / github.com/chart-kit/react-native-chart-kit-example / getWeekKey

Function getWeekKey

src/fixtures/v2Finance.ts:18–26  ·  view source on GitHub ↗
(isoDay: string)

Source from the content-addressed store, hash-verified

16const getUtcDay = (isoDay: string) => new Date(`${isoDay}T00:00:00Z`);
17
18const getWeekKey = (isoDay: string) => {
19 const date = getUtcDay(isoDay);
20 const day = date.getUTCDay();
21 const mondayOffset = day === 0 ? -6 : 1 - day;
22
23 date.setUTCDate(date.getUTCDate() + mondayOffset);
24
25 return toIsoDay(date);
26};
27
28const stockEventShocks: Record<number, number> = {
29 34: -13,

Callers

nothing calls this directly

Calls 2

getUtcDayFunction · 0.85
toIsoDayFunction · 0.85

Tested by

no test coverage detected