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('to'); |
54 |
my $enddate = $input->param('to'); |
|
|
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 93-98
my %pattern = (
Link Here
|
93 |
|
94 |
|
94 |
$firstacquidate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } |
95 |
$firstacquidate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } |
95 |
or output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' } ); |
96 |
or output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' } ); |
|
|
97 |
$startdate = eval { output_pref( { str => $firstacquidate, dateonly => 1, dateformat => 'iso' } ); } |
98 |
or output_pref( { dt => dt_from_string, dateonly => 1, dateformat => 'iso' } ); |
96 |
|
99 |
|
97 |
$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); }; |
100 |
$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); }; |
98 |
|
101 |
|
Lines 154-167
while( $i < 1000 ) {
Link Here
|
154 |
$line{'publicationdate'} = $date; |
157 |
$line{'publicationdate'} = $date; |
155 |
$line{'dow'} = Day_of_Week(split /-/, $date); |
158 |
$line{'dow'} = Day_of_Week(split /-/, $date); |
156 |
} |
159 |
} |
157 |
|
|
|
158 |
# Check if we don't have exceed end date |
160 |
# Check if we don't have exceed end date |
159 |
if($sublength){ |
161 |
if($sublength){ |
160 |
if($subtype eq "issues" && $i >= $sublength){ |
162 |
if($subtype eq "issues" && $i >= $sublength){ |
161 |
last; |
163 |
last; |
162 |
} elsif($subtype eq "weeks" && $date && Delta_Days( split(/-/, $date), Add_Delta_Days( split(/-/, $firstacquidate), 7*$sublength - 1 ) ) < 0) { |
164 |
} elsif($subtype eq "weeks" && $date && Delta_Days( split(/-/, $date), Add_Delta_Days( split(/-/, $startdate), 7*$sublength - 1 ) ) < 0) { |
163 |
last; |
165 |
last; |
164 |
} elsif($subtype eq "months" && $date && (Delta_Days( split(/-/, $date), Add_Delta_YM( split(/-/, $firstacquidate), 0, $sublength) ) - 1) < 0 ) { |
166 |
} elsif($subtype eq "months" && $date && (Delta_Days( split(/-/, $date), Add_Delta_YM( split(/-/, $startdate), 0, $sublength) ) - 1) < 0 ) { |
165 |
last; |
167 |
last; |
166 |
} |
168 |
} |
167 |
} |
169 |
} |
168 |
- |
|
|