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

Function formatDateForApi

src/components/UsageDashboard.original.tsx:57–62  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

55 startDate.setDate(startDate.getDate() - days);
56
57 const formatDateForApi = (date: Date) => {
58 const year = date.getFullYear();
59 const month = String(date.getMonth() + 1).padStart(2, '0');
60 const day = String(date.getDate()).padStart(2, '0');
61 return `${year}${month}${day}`;
62 }
63
64 statsData = await api.getUsageByDateRange(
65 startDate.toISOString(),

Callers 1

loadUsageStatsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected