var range = getDates(new Date(), new Date().addDays(7));
I\'d like \"range\" to be an array of date objects, one for each day between the two dates
I'm using simple while loop to calculate the between dates
var start = new Date("01/05/2017");
var end = new Date("06/30/2017");
var newend = end.setDate(end.getDate()+1);
end = new Date(newend);
while(start < end){
console.log(new Date(start).getTime() / 1000); // unix timestamp format
console.log(start); // ISO Date format
var newDate = start.setDate(start.getDate() + 1);
start = new Date(newDate);
}