2 ms·
The date selector has an odd bug in leap years. My birthday is in February in a leap year. If I click Feb 9, it highlights Feb 9. But if I click Feb 10, it h
by zestyping 5y ago
The date selector has an odd bug in leap years. My birthday is in February in a leap year. If I click Feb 9, it highlights Feb 9. But if I click Feb 10, it highlights Feb 9; if I click Feb 11, it highlights Feb 10, and so on. For all dates between Feb 10 and Feb 29, it highlights the preceding day instead of the day I clicked.
I would guess this is due to a disagreement between some part of the code that thinks there are 28 days in every February and another part that is aware that there are 29 days in a leap year. But it's odd that the bug shows up one-third of the way through February, instead of halfway through February, as I would expect if it were rounding to the nearest day. Quite a strange bug; it suggests that date calculations must have been done ad-hoc instead of using a well-tested date library.