// 中国标准时间转换格式 为 YY-MM-DD 00:00:00
export function timeCycle(dealdate) {
const date = new Date(dealdate)
const year = date.getFullYear()
let month = date.getMonth() + 1
month = month < 10 ? "0" + month : month
let day = date.getDate()
day = day < 10 ? "0" + day : day
let hour = date.getHours()
hour = hour < 10 ? "0" + hour : hour
let minute = date.getMinutes()
minute = minute < 10 ? "0" + minute : minute
let second = date.getSeconds()
second = second < 10 ? "0" + second : second
return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
}
中国标准时间格式转换为YY-MM-DD 00:00:00
最新推荐文章于 2023-12-01 11:03:25 发布