MCPcopy Create free account
hub / github.com/Semporia/Scripts / timeFormat

Function timeFormat

jd_joy_steal.js:603–611  ·  view source on GitHub ↗
(time)

Source from the content-addressed store, hash-verified

601 }
602}
603function timeFormat(time) {
604 let date;
605 if (time) {
606 date = new Date(time)
607 } else {
608 date = new Date();
609 }
610 return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate());
611}
612function jsonParse(str) {
613 if (typeof str == "string") {
614 try {

Callers 1

getCoinChangesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected