uny2k - Removes y2k fixes
use uny2k; $year = (localtime); printf "In the year %d, computers will everything for us!\n", $year += 1900;
Y2K has come and gone and none of the predictions of Doom and Gloom came to past. As the crisis is over, you're probably wondering why you went through all that trouble to make sure your programs are "Y2K compliant". uny2k.pm is a simple module to remove the now unnecessary y2k fixes from your code.
Y2K was a special case of date handling, and we all know that special cases make programs more complicated and slower. Also, most Y2K fixes will fail around 2070 or 2090 (depending on how careful you were when writing the fix) so in order to avert a future crisis it would be best to remove the broken "fix" now.
uny2k will remove the most common y2k fixes in Perl:
$full_year = $year + 1900; $two_digit_year = $year % 100;
It will change them back to their proper post-y2k values, 19100 and 100 respectively.
Michael G Schwern <email@example.com> with apologies to Mark "I am not ominous" Dominus for further abuse of his code.
Copyright 2001-2008 Michael G Schwern <firstname.lastname@example.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself (though why you would want to is beyond me).
y2k.pm, D'oh::Year, a good therapist