Changeset 12571


Ignore:
Timestamp:
2006-08-25T17:07:35+12:00 (18 years ago)
Author:
kjdon
Message:

made Datelist accept yyyy-mm-dd dates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/DateList.pm

    r11862 r12571  
    224224        foreach my $classification (@$classlistref) {
    225225        my $date = $self->{'list'}->{$classification};
    226         $date =~ s/^(\d\d\d\d)(\d\d).*$/$1 _textmonth$2_/;
     226        $date =~ s/^(\d\d\d\d)-?(\d\d).*$/$1 _textmonth$2_/;
    227227        # sanity check if month is zero
    228228        if ($date =~ /00_$/) {
     
    236236        foreach my $classification (@$classlistref) {
    237237        my $date = $self->{'list'}->{$classification};
    238         $date =~ s/^(\d\d\d\d)(\d\d).*$/$1 _textmonth$2_/;
     238        $date =~ s/^(\d\d\d\d)-?(\d\d).*$/$1 _textmonth$2_/;
    239239        my ($year, $month)=($1,$2);
    240240        # sanity check if month is zero
Note: See TracChangeset for help on using the changeset viewer.