I'd like to count from a date to another one using a while loop and count the day + 1 till it comes to the final date.
So as example:
var start = new Date(2011, 08, 15);
var end = new Date(2017, 09, 28);
var expired = false;
while (!expired) {
// very first iteration would count day + 1 so it will be 2011-08-16
// and so on till 2017-09-28
// check if end date and set expired to true, finished while loop
}
alert("Finished!");
I don't know how to do this (other anwers didn't help). Any ideas?