Originally posted by MrMacman
yeah I was totally freaked out by that bug...
'wait, why did it set the years back... uuuhhh???'
well whatever, someone e-mail the guy, I have, too litlte engry r8 nw.
The most common way of fixing the y2k bug is to not convert the year format to 4 digits but to program a toggle year in and let the computer assign the century. For example, this program must use something like 50 for its majic number. So every year less that 50 becomes 20xx and everything over 50 becomes 19xx. That way you don't have to rewrite much code, and the odds are most numbers will work correctly. By the time it becomes a real problem, you will have scrapped the code.
However, what the programmer of this code is forgetting is that all numbers under 99 can be considered 2000 since the overtake dates will never be in the 1900's.
On all of the custom programs I modified for y2k, I solved the problem by assigning a default century. Users do not want to type in a 4 digit year every time. If they do not want to do that you have to assign a century for the 2 digit years.