MCPcopy Create free account
hub / github.com/Moli-X/Resources / dateFormat

Function dateFormat

Script/JD/JdPrice.js:181–186  ·  view source on GitHub ↗
(cellval)

Source from the content-addressed store, hash-verified

179}
180
181function dateFormat(cellval) {
182 const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10));
183 const month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
184 const currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
185 return date.getFullYear() + "-" + month + "-" + currentDate;
186}
187
188function getSpace(length) {
189 let blank = "";

Callers 1

lowerMsgsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected