line |
true |
false |
branch |
349
|
6 |
112 |
unless (defined $args{'pattern'})
|
350
|
6 |
0 |
if ($self->locale->can($DEFAULT_FORMAT)) { }
|
385
|
119 |
14 |
if (defined $pattern)
|
410
|
121 |
2 |
if (defined $time_zone)
|
411
|
114 |
7 |
if (ref $time_zone and $time_zone->isa('DateTime::TimeZone')) { }
|
415
|
0 |
5 |
unless $self->{'time_zone'} = 'DateTime::TimeZone'->new('name', $time_zone)
|
440
|
120 |
14 |
if (defined $locale)
|
441
|
14 |
106 |
if (ref $locale and $locale->isa('DateTime::Locale::Base') || $locale->isa('DateTime::Locale::FromData')) { }
|
443
|
0 |
105 |
unless $self->{'locale'} = 'DateTime::Locale'->load($locale)
|
482
|
119 |
1 |
if (defined $on_error)
|
483
|
1 |
117 |
unless ref $on_error eq 'CODE' or $on_error eq 'croak' or $on_error eq 'undef'
|
524
|
119 |
1 |
if (defined $incomplete)
|
525
|
1 |
117 |
unless ref $incomplete eq 'CODE' or $incomplete eq '1' or $incomplete eq 'incomplete'
|
577
|
77532 |
86215 |
if (ref $part eq 'ARRAY') { }
|
|
2 |
86213 |
elsif (not $string =~ s/^ \s* $part//xi) { }
|
583
|
4 |
77528 |
unless $string =~ s/^ \s* $regexp//xi
|
590
|
14044 |
63484 |
if (ref $PARSER{$command . $index} eq '')
|
595
|
14045 |
84396 |
if (lc $element eq lc $capture)
|
596
|
1 |
14044 |
if (defined $tmpcapture)
|
608
|
15 |
77512 |
if ($command eq 'G') { }
|
|
750 |
76762 |
elsif ($command eq 'y' and $index == 2) { }
|
|
9210 |
67552 |
elsif ($command eq 'y') { }
|
|
30 |
67522 |
elsif ($command eq 'Q' or $command eq 'q') { }
|
|
9982 |
57540 |
elsif ($command eq 'M' or $command eq 'L') { }
|
|
5 |
57535 |
elsif ($command eq 'w') { }
|
|
5 |
57530 |
elsif ($command eq 'W') { }
|
|
9944 |
47586 |
elsif ($command eq 'd') { }
|
|
5 |
47581 |
elsif ($command eq 'D') { }
|
|
5 |
47576 |
elsif ($command eq 'e' and $index == 1) { }
|
|
2223 |
45353 |
elsif ($command eq 'E' or $command eq 'c' or $command eq 'e') { }
|
|
5 |
45348 |
elsif ($command eq 'F') { }
|
|
5868 |
39480 |
elsif ($command eq 'a') { }
|
|
5864 |
33616 |
elsif ($command eq 'h') { }
|
|
4 |
33612 |
elsif ($command eq 'K') { }
|
|
6800 |
26812 |
elsif ($command eq 'H') { }
|
|
8 |
26804 |
elsif ($command eq 'k') { }
|
|
12310 |
14494 |
elsif ($command eq 'm') { }
|
|
9489 |
5005 |
elsif ($command eq 's') { }
|
|
12 |
4993 |
elsif ($command eq 'S') { }
|
|
360 |
4633 |
elsif ($command eq 'Z') { }
|
|
2317 |
2316 |
elsif ($command eq 'z' || $command eq 'v' || $command eq 'V' and $index == 1) { }
|
|
2316 |
0 |
elsif ($command eq 'z' or $command eq 'v' or $command eq 'V') { }
|
612
|
372 |
378 |
if ($datetime{'year'} >= 70) { }
|
634
|
1 |
4 |
if $capture < 1
|
643
|
2930 |
2934 |
if $capture == 12
|
658
|
120 |
240 |
if ($index == 4)
|
663
|
48 |
2269 |
if ($capture =~ /^[+-]\d\d(\d\d)?/) { }
|
|
1 |
2268 |
elsif (not defined $ZONEMAP{$capture} or $ZONEMAP{$capture} eq 'Ambiguous') { }
|
664
|
24 |
24 |
unless defined $1
|
686
|
1 |
12876 |
if $string ne ''
|
690
|
5868 |
7008 |
if (defined $datetime_info{'hour12'} and defined $datetime_info{'ampm'})
|
694
|
5862 |
6 |
if $datetime_info{'ampm'} == 2 and $datetime{'hour'} < 12
|
696
|
8 |
12868 |
if (defined $datetime_info{'hour24'})
|
698
|
3 |
5 |
if ($datetime{'hour'} == 24)
|
704
|
3 |
12873 |
if ($datetime{'hour'} == 24)
|
705
|
2 |
1 |
if ($datetime{'minute'} == 0 and $datetime{'second'} == 0 and $datetime{'nanosecond'} == 0) { }
|
716
|
0 |
15 |
if (defined $datetime_info{'era'} and $datetime_info{'era'} == 0 and defined $datetime{'year'})
|
723
|
18 |
9940 |
unless (defined $datetime{'year'} and defined $datetime{'month'} and defined $datetime{'day'})
|
728
|
1 |
2934 |
if (ref $self->{'incomplete'} eq 'CODE') { }
|
|
2933 |
1 |
elsif ($self->{'incomplete'} eq '1') { }
|
|
1 |
0 |
elsif ($self->{'incomplete'} eq 'incomplete') { }
|
739
|
0 |
1 |
if $@ or ref $dt ne 'DateTime::Incomplete'
|
751
|
3 |
12871 |
if $@ or ref $dt ne 'DateTime'
|
755
|
2 |
12869 |
if ($datetime_info{'dayadd'})
|
761
|
2 |
2276 |
unless ($dt->$check == $datetime_check{$check})
|
781
|
0 |
12805 |
unless defined $dt and ref $dt and $dt->isa('DateTime')
|
859
|
12766 |
117 |
if defined $self->{'_built_pattern'}
|
880
|
10 |
891 |
if ($string) { }
|
|
499 |
392 |
elsif ($pattern) { }
|
|
392 |
0 |
elsif ($rest) { }
|
892
|
1 |
498 |
if ($command eq 'j')
|
893
|
0 |
1 |
$self->{'locale'}->prefers_24_hour_time ? :
|
898
|
499 |
269 |
if (defined $PARSER{$command . $count})
|
905
|
0 |
499 |
unless $rule
|
909
|
428 |
71 |
if (ref $rule eq 'Regexp') { }
|
|
22 |
49 |
elsif (ref $rule eq 'ARRAY') { }
|
957
|
9 |
7830 |
if ref $quote eq 'Regexp'
|
973
|
1 |
12 |
if ref $self->{'on_error'} eq 'CODE'
|
976
|
8 |
4 |
if $self->{'on_error'} eq 'croak'
|
979
|
4 |
0 |
if $self->{'on_error'} eq 'undef'
|
992
|
0 |
2 |
if ref $self->{'on_error'} eq 'CODE'
|
995
|
2 |
0 |
if $self->{'on_error'} eq 'croak'
|
998
|
0 |
2 |
if $self->{'on_error'} eq 'undef'
|