Ask HN: Did you encounter any leap year bugs today?
524 pointsAfter a frantic scramble this morning, our billing team has finished patching a bug which erroneously was charging our monthly subscribers for an extra day.
All test suites are passing now, and SRE has scheduled a postmortem after the QA confirms the fix in 2028.
Comments (481) 159 threads
Earlier commentsDate is relatively simple.
And you are done for all Gregorian years.So it returns 29 if divisible by 400, 28 if divisible by 100, etc.
Unit tests were broken in the CI pipeline because of a leap year. The problem was validating the number of days in a year, but dismissing a leap year. The code assumed the number of days in a year was 365.
All comments shown.
Couldn't load more comments. Check your connection and try again.