function timeCov(timet) {
var date = new Date(timet);
Y = date.getFullYear() + '-';
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
D = date.getDate() < 10 ? "0"+ date.getDate() : date.getDate();
// h = date.getHours() + ':';
// m = date.getMinutes() + ':';
// s = date.getSeconds();
return (Y + M + D);
}
时间转换封装函数
最新推荐文章于 2025-01-21 14:56:56 发布