const nowTimes=()=>{
const time=new Date()
const year=time.getFullYear()
const month=time.getMonth()+1
const date=time.getDate()
const hour=time.getHours()
const min=time.getMinutes()
const sec=time.getSeconds()
return year+'-'+month+'-'+date+' '+hour+':'+min+':'+'00'
}
export default nowTimes
JS格式化当前时间格式
最新推荐文章于 2024-05-21 10:56:13 发布