Date.prototype.format = function() { var s = ''; var mouth = (this.getMonth() + 1)>=10?(this.getMonth() + 1):('0'+(this.getMonth() + 1)); var day = this.getDate()>=10?this.getDate():('0'+this.getDate()); s += this.getFullYear() + '-'; // 获取年份. s +=…
https://blog.csdn.net/m0_37852904/article/details/85790793 // 计算续住的总日期列表 getAll(begin, end) { let arr1= begin.split("/"); let arr2= end.split("/"); let arr1_= new Date(); let arrTime = []; arr1_.setUTCFullYear(arr1[0], arr1[1] - 1, arr…
function getDate(datestr){ var temp = datestr.split("-"); var date = new Date(temp[0],temp[1],temp[2]); return date; } var start = "2016-10-10"; var end = "2016-10-18"; var startTime = getDate(start); var endTime = getDate(en…