JavaScriptで指定範囲の期間を取得する方法

サンプルコード:
Date.prototype.addDays = function(days) {
var dat = new Date(this.valueOf());
dat.setDate(dat.getDate() + days);
return dat;
};
function getDates(startDate, stopDate) {
var dateArray = [];
var currentDate = startDate;
while (currentDate <= stopDate) {
dateArray.push(self.formatDate(currentDate));
currentDate = currentDate.addDays(1);
}
return dateArray;
}

JavaScript

Posted by arkgame