dateRangeGenerator
Creates a generator, that generates all dates in the given range using the given step.
- Use a
whileloop to iterate fromstarttoend, usingyieldto return each date in the range, using theDateconstructor. - Use
Date.prototype.getDate()andDate.prototype.setDate()to increment bystepdays after returning each subsequent value. - Omit the third argument,
step, to use a default value of1.