this.beginTime="2031-03-20 00:00:00" this.endTime="2031-03-20 00:00:00" this.beginTime=new Date(this.beginTime) this.endTime=new Date(this.endTime) // CST和GMT+0800时间转换 this.beginTime=this.beginTime.getFullYear()+"-"+Number(this.beginTime.getMonth() + 1)+"-"+this.beginTime.getDate()+" "+ Number(this.beginTime.getHours()>13?this.beginTime.getHours()-14:this.beginTime.getHours()+10) +":"+this.beginTime.getMinutes() this.endTime=this.endTime.getFullYear()+"-"+Number(this.endTime.getMonth() + 1)+"-"+this.endTime.getDate()+" "+ Number(this.endTime.getHours()>13?this.endTime.getHours()-14:this.endTime.getHours()+10)+":"+this.endTime.getMinutes()
重点:
Number(.getHours()>13?.getHours()-14:.getHours()+10)标签:00,vue,getHours,0800,Number,js,beginTime,CST,endTime From: https://www.cnblogs.com/naitang/p/17008259.html