uny2k - Removes y2k fixes


uny2k documentation  | view source Contained in the uny2k distribution.

Index


NAME

Top

uny2k - Removes y2k fixes

SYNOPSIS

Top

  use uny2k;

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

DESCRIPTION

Top

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.

AUTHOR

Top

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

LICENSE and COPYRIGHT

Top

SEE ALSO

Top

y2k.pm, D'oh::Year, a good therapist


uny2k documentation  | view source Contained in the uny2k distribution.