3 ms·
That was the mindset that got us the Y2K bug 20 years ago. I remember seeing a lot of fixes for the Y2K bug that looked like this, too: if (year > 50) {
by commandlinefan 6y ago
That was the mindset that got us the Y2K bug 20 years ago.
I remember seeing a lot of fixes for the Y2K bug that looked like this, too:
if (year > 50) {
year += 1900;
} else {
year += 2000;
}
So expect another Y2K crisis in about 30 years.
- deleted 6y ago[deleted]
- GoblinSlayer 6y agos/50/70/
- rbanffy 6y agoUsing two digits for years is not a language issue. You can migrate your systems from 2 to 4 digits without having to rewrite your code in Java 1.2. This was, in fact, how most of it was done.
- ape4 6y agoHopefully code like this is marked with a standard comment for future grepping.