Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
verbify
on Feb 29, 2024
|
parent
|
context
|
favorite
| on:
Ask HN: Did you encounter any leap year bugs today...
A simple fix would be to change it to a multiple of 4 (e.g. 124 years). Then it would fail every 100 years.
samatman
on Feb 29, 2024
|
next
[–]
128! It was right there!
gield
on March 1, 2024
|
prev
|
next
[–]
2000 was a leap year so it would not fail in 2100. But it would indeed fail in 2200/2300/2400 as 2100/2200/2300 are not leap years.
addandsubtract
on March 1, 2024
|
parent
|
next
[–]
But then it's someone else's problem.
topaz0
on March 1, 2024
|
root
|
parent
|
next
[–]
Most likely nobody's problem, really.
offices
on March 1, 2024
|
prev
[–]
And it's still enough to include Jeanne Calment's supposed age.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: