MCPcopy Create free account
hub / github.com/winfunc/opcode / formatDateForApi

Function formatDateForApi

src/components/UsageDashboard.tsx:129–134  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

127 startDate.setDate(startDate.getDate() - days);
128
129 const formatDateForApi = (date: Date) => {
130 const year = date.getFullYear();
131 const month = String(date.getMonth() + 1).padStart(2, '0');
132 const day = String(date.getDate()).padStart(2, '0');
133 return `${year}${month}${day}`;
134 }
135
136 // Fetch both in parallel for better performance
137 const [statsResult, sessionResult] = await Promise.all([

Callers 1

UsageDashboardFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected