Changeset 449 for trunk


Ignore:
Timestamp:
Jan 21, 2007, 11:08:10 AM (13 years ago)
Author:
Nick Burch
Message:

Do dates stuff properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/scripts/tile-processing/makeSmaller.pl

    r447 r449  
    3030# (If we have two copies of the same tile, we want the newest one)
    3131@files = sort {
    32         my ($adate) = ($a =~ /.*?\-(\d\d\d\d)$/);
    33         my ($bdate) = ($b =~ /.*?\-(\d\d\d\d)$/);
    34         if($adata && !$bdate) { return 1; }
    35         if($bdata && !$adate) { return -1; }
     32        my ($adate) = ($a =~ /^.*?\-(\d\d\d\d)\//);
     33        my ($bdate) = ($b =~ /^.*?\-(\d\d\d\d)\//);
     34        if(!$adate && !$bdate) { return $a cmp $b; }
     35        if($adate && !$bdate) { return 1; }
     36        if($bdate && !$adate) { return -1; }
    3637        return $adate <=> $bdate;
    3738} @files;
Note: See TracChangeset for help on using the changeset viewer.