Changeset 6065
- Timestamp:
- 2003-12-01T15:38:32+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/DateList.pm
r5645 r6065 78 78 'args' => $arguments }; 79 79 80 # sub print_usage {81 # print STDERR "82 # usage: classify DateList [options]83 # options:84 # -bymonth [or bymonth=1] Classify by year and month85 86 # Classifier plugin for sorting by date.87 # Always sorts by 'Date' metadata.88 # Date is assumed to be in the form yyyymmdd (all digits).89 # By default dates are split by year - this should change.90 91 # Any errors are Dana's problem.92 # ";93 # }94 80 95 81 sub new { … … 104 90 105 91 my ($datemeta, $sortmeta); 92 $self->{'nogroupyears'}=0; 106 93 if (!parsargv::parse(\@_, 107 94 q^bymonth^, \$self->{'bymonth'}, … … 188 175 # top level 189 176 my $childtype = "HList"; 190 if (scalar (@$classlistref) <= 39 && !defined $self->{'nogroupyears'}) {$childtype = "DateList";} 177 178 if (scalar (@$classlistref) <= 39 && 179 !$self->{'nogroupyears'}) {$childtype = "DateList";} 191 180 my $classifyinfo = $self->get_entry ("Date", $childtype, "Invisible"); 192 181 193 # don't need to do any splitting if there are less than 39 (max + min -1) classifications, unless nogroupyears is specified 194 if ((scalar @$classlistref) <= 39 && !defined $self->{'nogroupyears'}) { 182 # don't need to do any splitting if there are less than 39 (max + min -1) 183 # classifications, unless nogroupyears is specified 184 if ((scalar @$classlistref) <= 39 && !$self->{'nogroupyears'}) { 195 185 foreach $subOID (@$classlistref) { 196 186 push (@{$classifyinfo->{'contains'}}, {'OID'=>$subOID}); … … 223 213 224 214 # only compact the list if nogroupyears not specified 225 if ( !defined$self->{'nogroupyears'}) {215 if (!$self->{'nogroupyears'}) { 226 216 $classhash = $self->compactlist ($classhash); 227 217 }
Note:
See TracChangeset
for help on using the changeset viewer.