MCPcopy Create free account
hub / github.com/6dylan6/jdm / time

Method time

function/sendNotify.js:2504–2518  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

2502 }
2503 }
2504 time(t) {
2505 let s = {
2506 'M+': new Date().getMonth() + 1,
2507 'd+': new Date().getDate(),
2508 'H+': new Date().getHours(),
2509 'm+': new Date().getMinutes(),
2510 's+': new Date().getSeconds(),
2511 'q+': Math.floor((new Date().getMonth() + 3) / 3),
2512 S: new Date().getMilliseconds(),
2513 };
2514 /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + '').substr(4 - RegExp.$1.length)));
2515 for (let e in s)
2516 new RegExp('(' + e + ')').test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ('00' + s[e]).substr(('' + s[e]).length)));
2517 return t;
2518 }
2519 msg(s = t, e = '', i = '', o) {
2520 const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : 'string' == typeof t ? this.isLoon() ? t : this.isQuanX() ? {
2521 'open-url': t

Callers 2

reportMethod · 0.45
reportMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected