"handelTime": {
"prefix": "handelTime",
"body": [
"let mydate = new Date()",
"let str = '' + mydate.getFullYear() + '-'",
"if (mydate.getMonth() < 10) {",
"str += '0' + (mydate.getMonth() + 1) + '-'",
"} else {",
"str += mydate.getMonth() + 1 + '-'",
"}",
"if (mydate.getDate() < 10) {",
"str += '0' + mydate.getDate() + '-'",
"} else {",
"str += mydate.getDate() + ':'",
"}",
"if (mydate.getHours() < 10) {",
"str += '0' + mydate.getHours() + ':'",
"} else {",
"str += mydate.getHours() + ':'",
"}",
"if (mydate.getMinutes() < 10) {",
"str += '0' + mydate.getMinutes() + ':'",
"} else {",
"str += mydate.getMinutes() + ':'",
"}",
" if (mydate.getSeconds() < 10) {",
" str += '0' + mydate.getSeconds() + ':'",
" } else {",
" str += mydate.getSeconds() + ''",
" }",
"return str",
],
"description": "把时间转换成2019-01-01 01:01,把小于1的补成0"
},