Standard time, parameter [null, standardDate, formatDate, timeStamp, rfcDate]

// This.standardDate = new Date() // Wed Aug 04 2021 13:47:39 GMT+0800 (Chinese standard time) === new Date().tostring ()
// this. StandardDate = new Date('2021-08-11 12:12:45') // Wed Aug 11 2021 12:12:45 GMT+0800
// this.standardDate = new Date(1628056275015)
// this. StandardDate = new Date(' 2019-05-28T09:00:20.000z ') // Tue May 28 2019 17:00:20 GMT+0800
Copy the code

Moment, parameter [null, standardDate, formatDate, timeStamp, rfcDate]

// this.standardDate = moment().format('YYYY-MM-DD HH:mm:ss') // 2021-08-04 14:08:61
// this.standardDate = moment().format('YYYY/MM/DD HH:mm') // 2021/08/04 14:41
// this.standardDate = moment(new Date())
// this.standardDate = moment(+new Date())
// this.standardDate = moment('2008-08-08 08:08:08')
/ / this. StandardDate = my moment (' 2019-05-28 T09:00:20. 000 z ')
Copy the code

Method to get the timestamp

// this.timeStamp = +new Date() // 1628056275015
// this.timeStamp = new Date().getTime() // 1628056275015
// this.timeStamp = new Date().valueOf() // 1628056275015
Copy the code

RFC3339

// this.rfcDate = new Date().toisostring () // 2021-08-04T06:28:40.768z 8 hours before the correct time
// this.rfcDate = new Date(+new Date() + 8 * 3600 * 1000).toISOString()
// this.rfcDate = new Date().tojson () // 2021-08-04T06:28:40.768z 8 hours before the correct time
Copy the code

New Date method enumerates

// this. TempTime = new Date().tolocaleString () // 2021/8/4 PM 2:57:01
// this.tempTime = new Date().toLocaleDateString() // 2021/8/4
// this. TempTime = new Date().tolocaletimeString () // 2:49:09 PM
// this.tempTime = new Date().toUTCString() // Wed, 04 Aug 2021 06:53:43 GMT
Copy the code