Ignore:
Timestamp:
2001-07-09T19:11:26+12:00 (23 years ago)
Author:
jrm21
Message:

Don't assume funny dates are 20th C - eg 101 -> 19101 - add to 1900 instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/sorttools.pm

    r1920 r2631  
    108108    if ($year !~ /^\d\d\d\d$/) {
    109109    if ($year !~ /^\d\d$/) {
    110         print STDERR "sorttools::format_date WARNING year $year assumed to be 19$year\n";
    111         $year = "19" . $year;
     110        my $newyear = 1900 + $year;
     111        print STDERR "sorttools::format_date WARNING year $year assumed to be $newyear\n";
     112        $year=$newyear;
    112113    } else {
    113114        print STDERR "sorttools::format_date WARNING year $year out of range - reset to 1900\n";
Note: See TracChangeset for help on using the changeset viewer.