Change a way of creating new dates in test.

Close #1242.

Previously every date in test was created by `new Date()`. 
Problem with this approach is that is not always true that `new Date() === new Date()` and `setDate` just set the day number. That's the reason that this test failed randomly. 
id rather not have this one-lined... if anything i want it spread out. its hard to read