3 ms·
To those that claim "dealing with dates is not easy", a really simple unit test would have caught that bug - like feeding the function integers from 1 to 1000
by StrawberryFrog 18y ago
To those that claim "dealing with dates is not easy", a really simple unit test would have caught that bug - like feeding the function integers from 1 to 1000 and testing that it did not crash for any of them. Bonus points for testing that it returned something sensible each time.
Sadly, this code probably wasn't unit tested at all.