var s = new Date('Thu Jun 01 00:00:00 GMT+0800')const startDate = s.getFullYear() + '-' + this.p((s.getMonth() + 1)) + '-' + this.p(s.getDate())p(m){return m < 9 ? '0'+ m : m},console.log(startDate)//-06-01
900字范文,内容丰富有趣,生活中的好帮手!
时间:2018-12-19 15:41:41
var s = new Date('Thu Jun 01 00:00:00 GMT+0800')const startDate = s.getFullYear() + '-' + this.p((s.getMonth() + 1)) + '-' + this.p(s.getDate())p(m){return m < 9 ? '0'+ m : m},console.log(startDate)//-06-01