Date sweep

Posted on May 17, 2006

On more than one occasion I've needed to iterate over all dates between two dates, and although the code and concept are trivial it does normally take up 20 minutes to find the exact classes to use, simply because it is a long time between uses. So here's the snippet, more for my own reference, but it will probably be useful to others too.