line |
true |
false |
branch |
348
|
6 |
92 |
unless (defined $args{'pattern'}) |
349
|
6 |
0 |
if ($self->locale->can($DEFAULT_FORMAT)) { } |
384
|
99 |
14 |
if (defined $pattern) |
409
|
101 |
2 |
if (defined $time_zone) |
410
|
94 |
7 |
if (ref $time_zone and $time_zone->isa('DateTime::TimeZone')) { } |
414
|
0 |
5 |
unless $self->{'time_zone'} = 'DateTime::TimeZone'->new('name', $time_zone) |
439
|
100 |
14 |
if (defined $locale) |
440
|
86 |
14 |
if (not ref $locale && ($locale->isa('DateTime::Locale::Base') || $locale->isa('DateTime::Locale::FromData'))) { } |
442
|
0 |
85 |
unless $self->{'locale'} = 'DateTime::Locale'->load($locale) |
481
|
99 |
1 |
if (defined $on_error) |
482
|
1 |
97 |
unless ref $on_error eq 'CODE' or $on_error eq 'croak' or $on_error eq 'undef' |
523
|
99 |
1 |
if (defined $incomplete) |
524
|
1 |
97 |
unless ref $incomplete eq 'CODE' or $incomplete eq '1' or $incomplete eq 'incomplete' |
576
|
108273 |
109771 |
if (ref $part eq 'ARRAY') { } |
|
2 |
109769 |
elsif (not $string =~ s/^ \s* $part//xi) { } |
582
|
4 |
108269 |
unless $string =~ s/^ \s* $regexp//xi |
589
|
19900 |
88369 |
if (ref $PARSER{$command . $index} eq '') |
594
|
19901 |
114042 |
if (lc $element eq lc $capture) |
595
|
1 |
19900 |
if (defined $tmpcapture) |
607
|
15 |
108253 |
if ($command eq 'G') { } |
|
2212 |
106041 |
elsif ($command eq 'y' and $index == 2) { } |
|
12005 |
94036 |
elsif ($command eq 'y') { } |
|
30 |
94006 |
elsif ($command eq 'Q' or $command eq 'q') { } |
|
14254 |
79752 |
elsif ($command eq 'M' or $command eq 'L') { } |
|
5 |
79747 |
elsif ($command eq 'w') { } |
|
5 |
79742 |
elsif ($command eq 'W') { } |
|
14216 |
65526 |
elsif ($command eq 'd') { } |
|
5 |
65521 |
elsif ($command eq 'D') { } |
|
5 |
65516 |
elsif ($command eq 'e' and $index == 1) { } |
|
3321 |
62195 |
elsif ($command eq 'E' or $command eq 'c' or $command eq 'e') { } |
|
5 |
62190 |
elsif ($command eq 'F') { } |
|
8796 |
53394 |
elsif ($command eq 'a') { } |
|
8792 |
44602 |
elsif ($command eq 'h') { } |
|
4 |
44598 |
elsif ($command eq 'K') { } |
|
8144 |
36454 |
elsif ($command eq 'H') { } |
|
8 |
36446 |
elsif ($command eq 'k') { } |
|
16582 |
19864 |
elsif ($command eq 'm') { } |
|
12783 |
7081 |
elsif ($command eq 's') { } |
|
12 |
7069 |
elsif ($command eq 'S') { } |
|
240 |
6829 |
elsif ($command eq 'Z') { } |
|
3415 |
3414 |
elsif ($command eq 'z' || $command eq 'v' || $command eq 'V' and $index == 1) { } |
|
3414 |
0 |
elsif ($command eq 'z' or $command eq 'v' or $command eq 'V') { } |
611
|
737 |
1475 |
if ($datetime{'year'} >= 70) { } |
633
|
1 |
4 |
if $capture < 1 |
642
|
2930 |
5862 |
if $capture == 12 |
657
|
120 |
120 |
if ($index >= 4) |
662
|
1 |
3414 |
if (not defined $ZONEMAP{$capture} or $ZONEMAP{$capture} eq 'Ambiguous') |
681
|
1 |
17133 |
if $string ne '' |
685
|
8796 |
8337 |
if (defined $datetime_info{'hour12'} and defined $datetime_info{'ampm'}) |
689
|
5862 |
2934 |
if $datetime_info{'ampm'} == 2 and $datetime{'hour'} < 12 |
691
|
8 |
17125 |
if (defined $datetime_info{'hour24'}) |
693
|
3 |
5 |
if ($datetime{'hour'} == 24) |
699
|
3 |
17130 |
if ($datetime{'hour'} == 24) |
700
|
2 |
1 |
if ($datetime{'minute'} == 0 and $datetime{'second'} == 0 and $datetime{'nanosecond'} == 0) { } |
711
|
0 |
15 |
if (defined $datetime_info{'era'} and $datetime_info{'era'} == 0 and defined $datetime{'year'}) |
718
|
3 |
14212 |
unless (defined $datetime{'year'} and defined $datetime{'month'} and defined $datetime{'day'}) |
723
|
1 |
2919 |
if (ref $self->{'incomplete'} eq 'CODE') { } |
|
2918 |
1 |
elsif ($self->{'incomplete'} eq '1') { } |
|
1 |
0 |
elsif ($self->{'incomplete'} eq 'incomplete') { } |
734
|
0 |
1 |
if $@ or ref $dt ne 'DateTime::Incomplete' |
746
|
3 |
17128 |
if $@ or ref $dt ne 'DateTime' |
750
|
2 |
17126 |
if ($datetime_info{'dayadd'}) |
756
|
2 |
3374 |
unless ($dt->$check == $datetime_check{$check}) |
776
|
0 |
17077 |
unless defined $dt and ref $dt and $dt->isa('DateTime') |
854
|
17043 |
97 |
if defined $self->{'_built_pattern'} |
875
|
7 |
811 |
if ($string) { } |
|
454 |
357 |
elsif ($pattern) { } |
|
357 |
0 |
elsif ($rest) { } |
887
|
1 |
453 |
if ($command eq 'j') |
888
|
0 |
1 |
$self->{'locale'}->prefers_24_hour_time ? : |
893
|
454 |
251 |
if (defined $PARSER{$command . $count}) |
900
|
0 |
454 |
unless $rule |
904
|
384 |
70 |
if (ref $rule eq 'Regexp') { } |
|
22 |
48 |
elsif (ref $rule eq 'ARRAY') { } |
963
|
1 |
12 |
if ref $self->{'on_error'} eq 'CODE' |
966
|
8 |
4 |
if $self->{'on_error'} eq 'croak' |
969
|
4 |
0 |
if $self->{'on_error'} eq 'undef' |
982
|
0 |
2 |
if ref $self->{'on_error'} eq 'CODE' |
985
|
2 |
0 |
if $self->{'on_error'} eq 'croak' |
988
|
0 |
2 |
if $self->{'on_error'} eq 'undef' |