I hate dealing with date math, but I have to admit that Python makes date math much more elegant. I've written the functional equivalent of the OP function several times, and it's just so nice to be able to loop over dates just like they were any other generic sequence.
Edit: plus you can enhance it pretty to make arbitrary increments with ease:
https://stackoverflow.com/questions/4345045/javascript-loop-...
I hate dealing with date math, but I have to admit that Python makes date math much more elegant. I've written the functional equivalent of the OP function several times, and it's just so nice to be able to loop over dates just like they were any other generic sequence.
Edit: plus you can enhance it pretty to make arbitrary increments with ease: