(t, e = null)
| 351 | } |
| 352 | } |
| 353 | time(t, e = null) { |
| 354 | const s = e ? new Date(e) : new Date() |
| 355 | let a = { |
| 356 | 'M+': s.getMonth() + 1, |
| 357 | 'd+': s.getDate(), |
| 358 | 'H+': s.getHours(), |
| 359 | 'm+': s.getMinutes(), |
| 360 | 's+': s.getSeconds(), |
| 361 | 'q+': Math.floor((s.getMonth() + 3) / 3), |
| 362 | S: s.getMilliseconds(), |
| 363 | } |
| 364 | ;/(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + '').substr(4 - RegExp.$1.length))) |
| 365 | for (let e in a) |
| 366 | new RegExp('(' + e + ')').test(t) && |
| 367 | (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ('00' + a[e]).substr(('' + a[e]).length))) |
| 368 | return t |
| 369 | } |
| 370 | queryStr(t) { |
| 371 | let e = '' |
| 372 | for (const s in t) { |
nothing calls this directly
no outgoing calls
no test coverage detected