MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / normalizeDate

Function normalizeDate

wxapp/tmj.js:84–89  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

82}
83
84function normalizeDate(value) {
85 const text = String(value || "").slice(0, 10);
86 const parts = text.split("-");
87 if (parts.length !== 3) return text;
88 return `${parts[0]}-${String(Number(parts[1])).padStart(2, "0")}-${String(Number(parts[2])).padStart(2, "0")}`;
89}
90
91function isTokenError(message) {
92 return /token|登录|授权|invalid|expire|过期|401|403/i.test(String(message || ""));

Callers 1

doSignMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected