+my $now;
+my @pref;
+my @out;
+my $date;
+my $all;
+
+#$DB::single = 1;
+
+while (@f) {
+ my $f = shift @f;
+
+ if ($f =~ /^\d+$/ && $f < 366) { # no of days
+ $days = $f;
+ next;
+ }
+ if (my $utime = Date::Parse::str2time($f)) { # is it a parseable date?
+ $utime += 3600;
+ $now = Julian::Day->new($utime);
+ $date = cldate($utime);
+ next;
+ }
+ $f = uc $f;
+ if (is_callsign($f)) {
+ push @dxcc, [$f, 0];
+ push @pref, $f;
+ } else {
+ if ($f eq 'ALL' ) {
+ $all++;
+ push @pref, $f;
+ next;
+ }
+ if (my @ciz = Prefix::to_ciz('nc', $f)) {
+ push @dxcc, map {[$_, 2]} @ciz;
+ push @pref, $f;
+ } else {
+ push @out, $self->msg('e27', $f);
+ }
+ }
+}
+
+# return error messages if any
+return (1, @out) if @out;
+
+# default prefixes
+unless (@pref) { # no prefix or callsign, use default prefix
+ push @dxcc, [$_, 2] for @main::my_cc;
+ push @pref, $main::mycall;
+}
+
+# default date
+unless ($now) {
+ $now = Julian::Day->new(time); #no starting date
+ $date = cldate(time);
+}