// 日期格式化
parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null;
}
let date;
date = new Date(time);
var h = date.getHours();
if (h < 10) {
h = "0" + h;
}
var m = date.getMinutes();
if (m < 10) {
m = "0" + m;
}
return h + ":" + m;
},
标签:10,格式化,var,日期,时间,time,date,return
From: https://www.cnblogs.com/zhanghongrui/p/17520429.html