dateRangeGenerator
Creates a generator, that generates all dates in the given range using the given step.
- Use a
while
loop to iterate fromstart
toend
, usingyield
to return each date in the range, using theDate
constructor. - Use
Date.prototype.getDate()
andDate.prototype.setDate()
to increment bystep
days after returning each subsequent value. - Omit the third argument,
step
, to use a default value of1
.