use Date::Manip; sub _time_limit { my ($self, $date, $limit) = @_; my $now = localtime(time()); my $current_date = ParseDate($now); my $pub_date = ParseDate($date); my $limit_date = DateCalc($current_date, "-$limit month"); $pub_date =~ s/\:.*$//; $limit_date =~ s/\:.*$//; if ($pub_date > $limit_date) { return 1; }else{ return 0; }