blib/lib/Date/Reformat.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 75 | 128 | 58.5 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
930 | 9 | 2 | 0 | defined $date{'hour_12'} and $date{'hour_12'} > 12 || $date{'hour_12'} == 0 |
1120 | 46 | 0 | 21 | $date_parts[0] =~ /^$TOKENS->{'year'}{'regex'}$/ and scalar keys %$date == 0 |
30 | 16 | 0 | $hint eq 'dmy' and $date_parts[0] =~ /^$TOKENS->{'month_abbr'}{'regex'}$/ || $date_parts[0] =~ /^$TOKENS->{'month_name'}{'regex'}$/ | |
27 | 17 | 0 | $hint eq 'mdy' and $date_parts[1] =~ /^$TOKENS->{'month_abbr'}{'regex'}$/ || $date_parts[1] =~ /^$TOKENS->{'month_name'}{'regex'}$/ | |
1174 | 12 | 5 | 42 | $date_parts[$index] =~ /^$TOKENS->{'month'}{'regex'}$/ and $date_parts[$index] <= 12 |
1220 | 119 | 0 | 3 | length $part == 3 and defined $date->{'year'} |
1412 | 95 | 0 | 1 | defined $date->{'am_or_pm'} and lc $date->{'am_or_pm'} eq 'pm' |
1413 | 0 | 0 | 1 | defined $date->{'hour'} and $date->{'hour'} < 12 |
1796 | 0 | 0 | 6 | defined $date->{$source_token} and defined $transformations->{$target_token}{$source_token} |
line | l | !l | condition |
---|---|---|---|
713 | 1 | 0 | $transformations // [] |
862 | 145 | 16 | $self->{'debug'} //= 0 |
1318 | 0 | 15 | $order_string ||= 'ymd' |
1465 | 7 | 0 | $definition->{'structure'} // 'arrayref' |
1488 | 0 | 0 | (($date->{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $self->{'defaults'}{$_}) // '' |
1517 | 3 | 0 | $definition->{'structure'} // 'hashref' |
1615 | 2 | 0 | (($date->{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $self->{'defaults'}{$_}) // '' |
1667 | 52 | 0 | $TOKENS->{$internal}{'sprintf'} // die("Unable to find sprintf definition for token '${internal}'") |
1826 | 148 | 0 | $args->{'already_claimed'} // {} |
1828 | 117 | 31 | $args->{'heuristic'} // '' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
930 | 0 | 0 | 2 | $date{'hour_12'} > 12 || $date{'hour_12'} == 0 |
1120 | 2 | 0 | 14 | $date_parts[0] =~ /^$TOKENS->{'month_abbr'}{'regex'}$/ || $date_parts[0] =~ /^$TOKENS->{'month_name'}{'regex'}$/ |
3 | 0 | 14 | $date_parts[1] =~ /^$TOKENS->{'month_abbr'}{'regex'}$/ || $date_parts[1] =~ /^$TOKENS->{'month_name'}{'regex'}$/ | |
1196 | 7 | 7 | 46 | not $date_parts[$index] =~ /^$TOKENS->{'day'}{'regex'}$/ or $date_parts[$index] > 31 |
1276 | 0 | 2 | 27 | defined $date->{'year'} or defined $date->{'year_abbr'} |
1298 | 0 | 27 | 0 | $order_string // $hint |
1309 | 12 | 0 | 15 | defined $date->{'day'} or defined $date->{'month'} |
0 | 0 | 15 | defined $date->{'day'} or defined $date->{'month'} or defined $date->{'month_abbr'} | |
0 | 0 | 15 | defined $date->{'day'} or defined $date->{'month'} or defined $date->{'month_abbr'} or defined $date->{'month_name'} | |
1324 | 18 | 72 | 0 | $order_string // $hint |
18 | 49 | 0 | $order_string // $hint | |
18 | 25 | 0 | $order_string // $hint | |
1325 | 0 | 23 | 0 | $order_string // $hint |
1333 | 0 | 19 | 0 | $order_string // $hint |
1338 | 0 | 24 | 0 | $order_string // $hint |
1346 | 0 | 20 | 0 | $order_string // $hint |
1351 | 18 | 25 | 0 | $order_string // $hint |
1359 | 18 | 21 | 0 | $order_string // $hint |
1378 | 5 | 19 | 5 | $token eq 'month_name' or $token eq 'month_abbr' |
1381 | 3 | 3 | 0 | $order_string // $hint |
1488 | 46 | 0 | 0 | $date->{$_} // $self->transform_token_value('target_token', $_, 'date', $date) |
46 | 0 | 0 | ($date->{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $self->{'defaults'}{$_} | |
1615 | 77 | 6 | 2 | $date->{$_} // $self->transform_token_value('target_token', $_, 'date', $date) |
83 | 0 | 2 | ($date->{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $self->{'defaults'}{$_} | |
1676 | 2 | 50 | 0 | $alias // $internal |
1830 | 148 | 0 | 0 | $args->{'date_string'} // $date_part |
1857 | 80 | 53 | 126 | $token eq 'year' or $token eq 'year_abbr' |