NAME

uny2k - Removes y2k fixes

SYNOPSIS

use uny2k;

$year = (localtime)[5];
printf "In the year %d, computers will everything for us!\n", 
    $year += 1900;

DESCRIPTION

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:

$year = $year + 1900;

and

$two_digit_year = $year % 100;

It will change them back to their proper post-y2k values, 19100 and 100 respectively.

AUTHOR

Michael G Schwern <schwern@pobox.com> with apologies to Mark "I am not ominous" Dominous for further abuse of his code.

SEE ALSO

y2k.pm, D'oh::Year