A better way to test it would be to deterministically generate the days that you want to test with.  That might be one date for each day of the week, or one date for each day of the year, or some set of dates that include some normal dates and edge cases like leap days.<p>The problem with having non-deterministic tests is that when they break you don&#x27;t know if it&#x27;s because the test broke or the code broke and even if it was the code you don&#x27;t know when it broke.<p>What if someone checked in a change that broke how things were handled on Sundays but the tests were only run on Sundays once&#x2F;year?  You&#x27;d have to run each build through the test suite, one by one, and you&#x27;d have to do it on that day, just to figure out which check in broke.