MCPcopy Create free account
hub / github.com/Toulu-debug/enen / time

Method time

iOS_Cookie.js:250–256  ·  view source on GitHub ↗
(t, e = null)

Source from the content-addressed store, hash-verified

248 }
249
250 time(t, e = null) {
251 const s = e ? new Date(e) : new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000);
252 let i = {"M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds()};
253 /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length)));
254 for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length)));
255 return t
256 }
257
258 msg(e = t, s = "", i = "", r) {
259 const o = t => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected