DaysBetween: Switching to new parse_all_strings_to_date

master
Rob Emery 2014-08-11 23:08:05 +01:00
parent 4a25a8d697
commit 1daf678973
1 changed files with 2 additions and 2 deletions

View File

@ -23,9 +23,9 @@ my $date_regex = date_regex();
handle remainder => sub {
return unless $_ =~ qr/^($date_regex) (?:(?:and|to) )?($date_regex)/i;
my $date1 = parse_string_to_date($1);
my $date2 = parse_string_to_date($2);
my ($date1, $date2) = parse_all_strings_to_date($1, $2);
return unless ($date1 && $date2);
my $difference = $date1->delta_days($date2);
my $daysBetween = abs($difference->in_units('days'));
my $inclusive = '';