MCPcopy Index your code
hub / github.com/apache/echarts / pad

Function pad

test/runTest/client/client.js:1091–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089function formatDate(timestamp) {
1090 const date = new Date(timestamp);
1091 const pad = num => (num < 10 ? '0' + num : num);
1092 return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
1093}

Callers 1

formatDateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected