2 # Show total DXStats per day
4 # Copyright (c) 2001 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
18 my $date = cldate($main::systime);
19 my $utime = $main::systime;
25 if ($f =~ /^\d+$/ && $f < 366) { # no of days
29 if (my $ut = Date::Parse::str2time($f)) { # is it a parseable date?
33 push @out, $self->msg('e33', $f);
36 return (1, @out) if @out;
38 $now = Julian::Day->new($utime);
39 $now = $now->sub($days);
40 $date = cldate($utime);
42 # generate the spot list
43 for ($i = 0; $i < $days; $i++) {
44 my $fh = $Spot::statp->open($now); # get the next file
47 $fh = $Spot::statp->open($now);
52 next unless $l[0] eq 'TOTALS';
63 push @out, $self->msg('statdx', $date, $days);
64 foreach my $ref (@in) {
65 push @out, sprintf "%12s: %7d", $ref->[0]->as_string, $ref->[1];
68 push @out, sprintf "%12s: %7d", "Total", $tot;