line |
true |
false |
branch |
348
|
6 |
107 |
unless (defined $args{'pattern'})
|
349
|
6 |
0 |
if ($self->locale->can($DEFAULT_FORMAT)) { }
|
384
|
114 |
14 |
if (defined $pattern)
|
409
|
116 |
2 |
if (defined $time_zone)
|
410
|
109 |
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
|
115 |
14 |
if (defined $locale)
|
440
|
101 |
14 |
if (not ref $locale && ($locale->isa('DateTime::Locale::Base') || $locale->isa('DateTime::Locale::FromData'))) { }
|
442
|
0 |
100 |
unless $self->{'locale'} = 'DateTime::Locale'->load($locale)
|
481
|
114 |
1 |
if (defined $on_error)
|
482
|
1 |
112 |
unless ref $on_error eq 'CODE' or $on_error eq 'croak' or $on_error eq 'undef'
|
523
|
114 |
1 |
if (defined $incomplete)
|
524
|
1 |
112 |
unless ref $incomplete eq 'CODE' or $incomplete eq '1' or $incomplete eq 'incomplete'
|
576
|
76812 |
85615 |
if (ref $part eq 'ARRAY') { }
|
|
2 |
85613 |
elsif (not $string =~ s/^ \s* $part//xi) { }
|
582
|
4 |
76808 |
unless $string =~ s/^ \s* $regexp//xi
|
589
|
14044 |
62764 |
if (ref $PARSER{$command . $index} eq '')
|
594
|
14045 |
84396 |
if (lc $element eq lc $capture)
|
595
|
1 |
14044 |
if (defined $tmpcapture)
|
607
|
15 |
76792 |
if ($command eq 'G') { }
|
|
750 |
76042 |
elsif ($command eq 'y' and $index == 2) { }
|
|
9090 |
66952 |
elsif ($command eq 'y') { }
|
|
30 |
66922 |
elsif ($command eq 'Q' or $command eq 'q') { }
|
|
9862 |
57060 |
elsif ($command eq 'M' or $command eq 'L') { }
|
|
5 |
57055 |
elsif ($command eq 'w') { }
|
|
5 |
57050 |
elsif ($command eq 'W') { }
|
|
9824 |
47226 |
elsif ($command eq 'd') { }
|
|
5 |
47221 |
elsif ($command eq 'D') { }
|
|
5 |
47216 |
elsif ($command eq 'e' and $index == 1) { }
|
|
2223 |
44993 |
elsif ($command eq 'E' or $command eq 'c' or $command eq 'e') { }
|
|
5 |
44988 |
elsif ($command eq 'F') { }
|
|
5868 |
39120 |
elsif ($command eq 'a') { }
|
|
5864 |
33256 |
elsif ($command eq 'h') { }
|
|
4 |
33252 |
elsif ($command eq 'K') { }
|
|
6680 |
26572 |
elsif ($command eq 'H') { }
|
|
8 |
26564 |
elsif ($command eq 'k') { }
|
|
12190 |
14374 |
elsif ($command eq 'm') { }
|
|
9489 |
4885 |
elsif ($command eq 's') { }
|
|
12 |
4873 |
elsif ($command eq 'S') { }
|
|
240 |
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') { }
|
611
|
372 |
378 |
if ($datetime{'year'} >= 70) { }
|
633
|
1 |
4 |
if $capture < 1
|
642
|
2930 |
2934 |
if $capture == 12
|
657
|
120 |
120 |
if ($index >= 4)
|
662
|
1 |
2316 |
if (not defined $ZONEMAP{$capture} or $ZONEMAP{$capture} eq 'Ambiguous')
|
681
|
1 |
12756 |
if $string ne ''
|
685
|
5868 |
6888 |
if (defined $datetime_info{'hour12'} and defined $datetime_info{'ampm'})
|
689
|
5862 |
6 |
if $datetime_info{'ampm'} == 2 and $datetime{'hour'} < 12
|
691
|
8 |
12748 |
if (defined $datetime_info{'hour24'})
|
693
|
3 |
5 |
if ($datetime{'hour'} == 24)
|
699
|
3 |
12753 |
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
|
18 |
9820 |
unless (defined $datetime{'year'} and defined $datetime{'month'} and defined $datetime{'day'})
|
723
|
1 |
2934 |
if (ref $self->{'incomplete'} eq 'CODE') { }
|
|
2933 |
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 |
12751 |
if $@ or ref $dt ne 'DateTime'
|
750
|
2 |
12749 |
if ($datetime_info{'dayadd'})
|
756
|
2 |
2276 |
unless ($dt->$check == $datetime_check{$check})
|
776
|
0 |
12685 |
unless defined $dt and ref $dt and $dt->isa('DateTime')
|
854
|
12651 |
112 |
if defined $self->{'_built_pattern'}
|
875
|
10 |
836 |
if ($string) { }
|
|
469 |
367 |
elsif ($pattern) { }
|
|
367 |
0 |
elsif ($rest) { }
|
887
|
1 |
468 |
if ($command eq 'j')
|
888
|
0 |
1 |
$self->{'locale'}->prefers_24_hour_time ? :
|
893
|
469 |
249 |
if (defined $PARSER{$command . $count})
|
900
|
0 |
469 |
unless $rule
|
904
|
398 |
71 |
if (ref $rule eq 'Regexp') { }
|
|
22 |
49 |
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'
|