Perhaps it would be a good idea to explain in what way the program behaviour is not what you expect or intend. Rewrite your example as the main() method of some class we can all run. And describe both the behaviour you observe and the behaviour you expect or intend. It might make things simpler if the dates aren't so far apart (ie it will reduce output).
---
In any case you should have a read of the
set() API documentation to make sure the arguments you are supplying are those you mean to supply.