DaysBetween: Switching to new parse_all_strings_to_date
parent
4a25a8d697
commit
1daf678973
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in New Issue