News for hackers. Stuff that matters.
Re:Special cases broke Microsoft Zune and can ruin your code... by jaclaz on Wednesday August 23, 2023 @12:13PM (#37238280)
I am not convinced that leap years can be called "special cases", after all they are a known occurrence and happen roughly every 4 years (and they were taken into account - wrongly - in the code in the example), if something similar had happened with the divisible by 100 but not by 400 rule, that happens three times every 400 years (and that seems not have been taken into account in the code) I would have found it more convincing.
Re:Special cases broke Microsoft Zune and can ruin your code... by knsv on Wednesday August 23, 2023 @11:48AM (#37237877)
Some thoughts on special cases, a love-hate relationship, I guess :)
Re:Special cases broke Microsoft Zune and can ruin your code... by AFirestone on Wednesday August 23, 2023 @12:11PM (#37238239)
Interesting