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

Function formatDate

src/fixtures/v2Contribution.ts:9–15  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

7const dayInMs = 24 * 60 * 60 * 1000;
8
9const formatDate = (date: Date) => {
10 const year = date.getFullYear();
11 const month = `${date.getMonth() + 1}`.padStart(2, "0");
12 const day = `${date.getDate()}`.padStart(2, "0");
13
14 return `${year}-${month}-${day}`;
15};
16
17export const productUsageEndDate = formatDate(end);
18export const productUsageNumDays = 154;

Callers 1

v2Contribution.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected