Lines 52-57
my $frequencyid = $input->param('frequency');
Link Here
|
52 |
my $firstacquidate = $input->param('firstacquidate'); |
52 |
my $firstacquidate = $input->param('firstacquidate'); |
53 |
my $nextacquidate = $input->param('nextacquidate'); |
53 |
my $nextacquidate = $input->param('nextacquidate'); |
54 |
my $enddate = $input->param('enddate'); |
54 |
my $enddate = $input->param('enddate'); |
|
|
55 |
my $startdate = $input->param('from'); |
55 |
my $subtype = $input->param('subtype'); |
56 |
my $subtype = $input->param('subtype'); |
56 |
my $sublength = $input->param('sublength'); |
57 |
my $sublength = $input->param('sublength'); |
57 |
my $custompattern = $input->param('custompattern'); |
58 |
my $custompattern = $input->param('custompattern'); |
Lines 79-84
my %pattern = (
Link Here
|
79 |
|
80 |
|
80 |
$firstacquidate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } |
81 |
$firstacquidate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } |
81 |
or output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' } ); |
82 |
or output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' } ); |
|
|
83 |
$startdate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } |
84 |
or output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' } ); |
82 |
|
85 |
|
83 |
$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); }; |
86 |
$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); }; |
84 |
|
87 |
|
Lines 141-154
while( $i < 1000 ) {
Link Here
|
141 |
$line{'publicationdate'} = $date; |
144 |
$line{'publicationdate'} = $date; |
142 |
$line{'dow'} = Day_of_Week(split /-/, $date); |
145 |
$line{'dow'} = Day_of_Week(split /-/, $date); |
143 |
} |
146 |
} |
144 |
|
|
|
145 |
# Check if we don't have exceed end date |
147 |
# Check if we don't have exceed end date |
146 |
if($sublength){ |
148 |
if($sublength){ |
147 |
if($subtype eq "issues" && $i >= $sublength){ |
149 |
if($subtype eq "issues" && $i >= $sublength){ |
148 |
last; |
150 |
last; |
149 |
} elsif($subtype eq "weeks" && $date && Delta_Days( split(/-/, $date), Add_Delta_Days( split(/-/, $firstacquidate), 7*$sublength - 1 ) ) < 0) { |
151 |
} elsif($subtype eq "weeks" && $date && Delta_Days( split(/-/, $date), Add_Delta_Days( split(/-/, $startdate), 7*$sublength - 1 ) ) < 0) { |
150 |
last; |
152 |
last; |
151 |
} elsif($subtype eq "months" && $date && (Delta_Days( split(/-/, $date), Add_Delta_YM( split(/-/, $firstacquidate), 0, $sublength) ) - 1) < 0 ) { |
153 |
} elsif($subtype eq "months" && $date && (Delta_Days( split(/-/, $date), Add_Delta_YM( split(/-/, $startdate), 0, $sublength) ) - 1) < 0 ) { |
152 |
last; |
154 |
last; |
153 |
} |
155 |
} |
154 |
} |
156 |
} |
155 |
- |
|
|