var date = new Date();
date.toString(); // "Tue Jan 02 2018 15:03:07 GMT+0800 (中国标准时间)"
date.getDate(); // 2
date.getDay(); // 2
date.getFullYear(); // 2018
date.getHours() // 15
date.getMilliseconds() // 154
date.getMinutes() // 3
date.getMonth() // 0
date.getSeconds() // 7
date.getTime() // 1514876587154
date.getTimezoneOffset() // -480
date.getUTCDate() // 2
date.getUTCDay() // 2
date.getUTCFullYear() // 2018
date.getUTCHours() // 7
date.getUTCMilliseconds() // 154
date.getUTCMinutes() // 3
date.getUTCMonth() // 0
date.getUTCSeconds() // 7
date.getYear() // 118
date.toDateString() // "Tue Jan 02 2018"
date.toGMTString() // "Tue, 02 Jan 2018 07:03:07 GMT"
date.toISOString() // "2018-01-02T07:03:07.154Z"
date.toJSON() // "2018-01-02T07:03:07.154Z"
date.toLocaleDateString() // "2018/1/2"
date.toLocaleString() // "2018/1/2 下午3:03:07"
date.toLocaleTimeString() // "下午3:03:07"
date.toTimeString() // "15:03:07 GMT+0800 (中国标准时间)"
date.toUTCString() // "Tue, 02 Jan 2018 07:03:07 GMT"