Wed Jan 09 2019 00:00:00 GMT+0800 (中国标准时间)
Thu Sep 26 2019 00:00:00 GMT+0800 (中国标准时间)
转换成格式为 : 20190109 00:00
转换成格式为 : 20190926 00:00
var start = new Date($scope.date[i].start); //Wed Jan 09 2019 00:00:00 GMT+0800 (中国标准时间)
var startDate = start.getFullYear() + '' + ((start.getMonth() + 1)<10 ? '0' + (start.getMonth() + 1):(start.getMonth() + 1)) + '' + (start.getDate()<10 ? '0' +start.getDate():start.getDate()) + ' ' + (start.getHours()<10 ? '0' +start.getHours():start.getHours()) + ':' + (start.getMinutes()<10 ? '0' +start.getHours():start.getHours());
var end = new Date($scope.date[i].end); //Thu Sep 26 2019 00:00:00 GMT+0800 (中国标准时间)
var endDate = end.getFullYear() + '' + ((end.getMonth() + 1)<10 ? '0' + (end.getMonth() + 1):(end.getMonth() + 1)) + '' + (end.getDate()<10 ? '0' + end.getDate():end.getDate()) + ' ' + (end.getHours()<10 ? '0' +end.getHours():end.getHours()) + ':' + (end.getMinutes()<10 ? '0' +end.getMinutes():end.getMinutes());
console.log(startDate); //20190109 00:00
console.log(endDate); //20190926 00:00