| line |
true |
false |
branch |
|
87
|
0 |
40 |
unless tie %tiehash, $class . '::Tie', $time, %opts |
|
161
|
0 |
1 |
unless (defined $level) |
|
169
|
0 |
1 |
if ($level eq 'none') { } |
|
|
0 |
1 |
elsif ($level eq 'stderr') { } |
|
|
1 |
0 |
elsif ($level eq 'croak') { } |
|
|
0 |
0 |
elsif ($level eq 'default') { } |
|
327
|
16 |
24 |
if (UNIVERSAL::isa($time, 'Date::EzDate2')) { } |
|
341
|
23 |
0 |
if (defined $time and not ref $time and $time =~ /\S/s) |
|
364
|
16 |
0 |
if (UNIVERSAL::isa($old, 'Date::EzDate2')) |
|
400
|
0 |
98 |
unless (defined $val) |
|
409
|
0 |
98 |
if $val =~ /$left_brace_rx/ |
|
431
|
17 |
81 |
if ($key eq 'dayofmonth') { } |
|
|
17 |
64 |
elsif ($key eq 'year') { } |
|
|
21 |
43 |
elsif ($key eq 'month' or $key eq 'monthnum' or $key eq 'monthlong' or $key eq 'monthshort') { } |
|
|
6 |
37 |
elsif ($key eq 'weekday' or $key eq 'weekdaynum' or $key eq 'weekdayshort' or $key eq 'weekdaylong') { } |
|
|
3 |
34 |
elsif ($key eq 'yearday' or $key eq 'yearday3d') { } |
|
|
3 |
31 |
elsif ($key eq 'hour' or $key eq 'hour2d') { } |
|
|
3 |
28 |
elsif ($key eq 'min' or $key eq 'min2d') { } |
|
|
3 |
25 |
elsif ($key eq 'sec' or $key eq 'sec2d') { } |
|
|
20 |
5 |
elsif ($key eq 'ampm' or $key eq 'ampmlc' or $key eq 'ampmuc') { } |
|
|
2 |
3 |
elsif ($key eq 'ampmhour') { } |
|
|
2 |
1 |
elsif ($key eq 'miltime') { } |
|
|
1 |
0 |
elsif ($key eq 'dmy') { } |
|
443
|
18 |
3 |
unless ($val =~ /^\d+$/is) |
|
451
|
18 |
0 |
if (my $num = $MonthNums{$val}) { } |
|
468
|
5 |
1 |
unless ($val =~ /^\d+$/s) |
|
475
|
0 |
5 |
unless ($val = $WeekDayNums{$val}) |
|
483
|
5 |
1 |
unless ($val == $dt->day_of_week) |
|
493
|
0 |
3 |
unless $eztied->integer_check($key, $val) |
|
500
|
3 |
0 |
unless ($current == $val) |
|
514
|
0 |
3 |
unless $eztied->integer_check($key, $val) |
|
524
|
0 |
3 |
unless $eztied->integer_check($key, $val) |
|
534
|
0 |
3 |
unless $eztied->integer_check($key, $val) |
|
546
|
1 |
19 |
if (length $val == 1) |
|
553
|
0 |
20 |
unless ($val eq 'am' or $val eq 'pm') |
|
560
|
16 |
4 |
if ($current < 12) { } |
|
561
|
1 |
15 |
if ($val eq 'am') |
|
565
|
0 |
4 |
if ($val eq 'pm') |
|
570
|
4 |
15 |
if ($val eq 'am') { } |
|
579
|
0 |
2 |
unless $eztied->integer_check($key, $val) |
|
583
|
2 |
0 |
if ($dt->hour >= 12) |
|
593
|
0 |
2 |
unless ($val =~ /^\d{4}$/s) |
|
615
|
0 |
1 |
unless $eztied->integer_check("$key - day", $day) |
|
624
|
1 |
0 |
if (my $num = $MonthNums{$month}) { } |
|
634
|
0 |
1 |
unless $eztied->integer_check("$key - year", $year) |
|
873
|
0 |
16 |
unless (defined $val and $val =~ /^\d+$/s and $val > 0) |
|
875
|
0 |
0 |
defined $val ? : |
|
924
|
0 |
23 |
unless (defined $val) |
|
938
|
0 |
23 |
if ($val =~ /^\d+$/i) { } |
|
|
0 |
23 |
elsif ($relative{lc $val}) { } |
|
956
|
0 |
0 |
if ($val eq 'today' or $val eq 'now') |
|
961
|
0 |
0 |
if ($val eq 'tomorrow') |
|
969
|
0 |
0 |
if ($val eq 'yesterday') |
|
996
|
0 |
23 |
if ($val =~ s[[a-z_]+\s*/\s*[a-z_]+$][]is) |
|
1029
|
23 |
0 |
unless ($opts{'dateonly'}) |
|
1034
|
23 |
0 |
unless ($opts{'timeonly'}) |
|
1035
|
23 |
0 |
if (length $val) |
|
1041
|
23 |
0 |
unless ($opts{'dateonly'}) |
|
1042
|
22 |
1 |
if (length $val and not defined $set{'hour'}) |
|
1049
|
22 |
0 |
if defined $hour_new |
|
1050
|
22 |
0 |
if defined $min_new |
|
1051
|
22 |
0 |
if defined $sec_new |
|
1056
|
0 |
23 |
unless (defined $val) |
|
1063
|
23 |
0 |
if (%set) |
|
1100
|
191 |
3 |
if (defined $set->{$key}) |
|
1107
|
91 |
143 |
if (defined $offset{$key}) |
|
1134
|
232 |
470 |
defined $new ? : |
|
1163
|
0 |
23 |
if ($val =~ s/^([a-z]+) (\d+) (\S+) (\d+)$/$3/) { } |
|
|
1 |
22 |
elsif ($val =~ /^\d+ [a-z]+ \d{4}$/) { } |
|
|
22 |
0 |
elsif ($val =~ s/^([a-z]+) (\d+) (\d+)//) { } |
|
|
0 |
0 |
elsif ($val =~ s/^([a-z]+) (\d+)//) { } |
|
|
0 |
0 |
elsif ($val =~ s/^(\d{4}) (\d+) (\d+)//) { } |
|
|
0 |
0 |
elsif ($val =~ s/^(\d+) (\d+) (\d+)//) { } |
|
1239
|
0 |
45 |
unless (defined $str) |
|
1252
|
19 |
26 |
if ($str =~ s/^(\d+):(\d+):(\d+) (a|p)(m|\b)\s*//) { } |
|
|
3 |
23 |
elsif ($str =~ s/^(\d+):(\d+):(\d+)\s*//) { } |
|
|
0 |
23 |
elsif ($str =~ s/^(\d+):(\d+) (a|p)m?\s*//) { } |
|
|
0 |
23 |
elsif ($str =~ s/^(\d+):(\d+)\s*//) { } |
|
|
0 |
23 |
elsif ($str =~ s/^(\d+) (a|p)m?\b\s*//) { } |
|
|
0 |
23 |
elsif (not $opts{'skipjustdigits'} and $str =~ /^\d+$/) { } |
|
|
0 |
23 |
elsif ($opts{'croakonfail'}) { } |
|
1311
|
3 |
16 |
if ($hour == 12) { } |
|
|
5 |
11 |
elsif ($ampm =~ /^p/) { } |
|
1313
|
0 |
3 |
if ($ampm =~ /^a/) |
|
1349
|
558 |
859 |
if ($el =~ /^\{.*\}$/s) |
|
1392
|
1565 |
16 |
unless $_[0] =~ /^\%\w$/ |
|
1432
|
0 |
456 |
unless (defined $val) |
|
1483
|
62 |
1199 |
if (not ref $key and $key =~ /[\{\%]/ and not $key =~ /$pcode/o) |
|
1486
|
69 |
1199 |
if (ref $key) |
|
1492
|
274 |
206 |
if ($el =~ s/\{([^\}]+)\}/$1/ or $el =~ /$pcode/o) |
|
1503
|
0 |
480 |
unless (defined $val) |
|
1516
|
925 |
274 |
unless $opts{'normalized'} |
|
1522
|
0 |
1199 |
if ($key eq 'dt' or $key eq 'datetime') |
|
1537
|
15 |
1184 |
if $key eq 'newline' |
|
1538
|
15 |
1169 |
if $key eq 'tab' |
|
1539
|
0 |
1169 |
if $key eq 'leftbrace' |
|
1540
|
0 |
1169 |
if $key eq 'lb' |
|
1541
|
0 |
1169 |
if $key eq 'rightbrace' |
|
1542
|
0 |
1169 |
if $key eq 'rb' |
|
1543
|
15 |
1154 |
if $key eq 'percent' |
|
1546
|
75 |
1079 |
if ($key =~ s/no(zero|0)//) |
|
1550
|
66 |
1013 |
if ($key eq 'dayofmonth') |
|
1554
|
30 |
983 |
if ($key eq 'dayofmonth2d') |
|
1558
|
0 |
983 |
if ($key =~ /^dayofmonthord(word)?$/) |
|
1560
|
0 |
983 |
if ($key eq 'dayofmonthordnum') |
|
1564
|
30 |
953 |
if ($key eq 'weekdaynum') |
|
1568
|
0 |
953 |
if ($key eq 'weekdaynum2d') |
|
1572
|
45 |
908 |
if ($key =~ /^(weekdayshort|dayofweekshort|dayofweek)$/) |
|
1574
|
31 |
877 |
if ($key =~ /^(weekdaylong|dayofweeklong)$/) |
|
1578
|
47 |
830 |
if ($key eq 'monthshort') |
|
1580
|
16 |
814 |
if ($key eq 'month' or $key eq 'monthlong') |
|
1584
|
31 |
783 |
if ($key eq 'monthnum') |
|
1586
|
45 |
738 |
if ($key eq 'monthnum2d') |
|
1590
|
16 |
722 |
if ($key eq 'yearday') |
|
1592
|
30 |
692 |
if ($key eq 'yearday3d') |
|
1596
|
48 |
644 |
if ($key eq 'year') |
|
1598
|
45 |
599 |
if ($key eq 'year2d') |
|
1602
|
0 |
599 |
if ($key eq 'epoch' or $key eq 'epochsec') |
|
1606
|
30 |
569 |
if ($key =~ /^(is)?leapyear/) |
|
1610
|
30 |
539 |
if ($key eq 'daysinmonth') |
|
1619
|
1 |
538 |
if ($key eq 'dmy') |
|
1627
|
11 |
527 |
if ($key eq 'full') |
|
1642
|
30 |
497 |
if ($key =~ /^mil(itary)?time$/) |
|
1646
|
0 |
497 |
if ($key eq 'iso8601') |
|
1658
|
15 |
482 |
if ($key eq 'hour') |
|
1662
|
60 |
422 |
if ($key eq 'hour2d') |
|
1666
|
45 |
377 |
if ($key eq 'min') |
|
1670
|
75 |
302 |
if ($key eq 'min2d') |
|
1674
|
60 |
242 |
if ($key eq 'sec') |
|
1678
|
75 |
167 |
if ($key eq 'sec2d') |
|
1685
|
2 |
165 |
$dt->hour >= 12 ? : |
|
1688
|
45 |
122 |
if ($key eq 'ampm' or $key eq 'ampmlc') |
|
1692
|
45 |
77 |
if ($key eq 'ampmuc') |
|
1699
|
2 |
75 |
if ($dt->hour == 0 or $dt->hour == 12) { } |
|
|
0 |
75 |
elsif ($dt->hour > 12) { } |
|
1707
|
60 |
17 |
if ($key eq 'ampmhour') |
|
1711
|
17 |
0 |
if ($key eq 'clocktime' or $key eq 'clocktimestrict') |
|
1723
|
0 |
0 |
if ($key eq 'tz') |
|
1728
|
0 |
0 |
if ($key eq 'olson') |
|
1745
|
0 |
0 |
defined $eztied->{'warnings'} ? : |
|
1751
|
0 |
0 |
unless $level |
|
1753
|
0 |
0 |
if ($level == 1) |
|
1774
|
1352 |
618 |
unless ($key =~ /[\{\%]/) |
|
1779
|
100 |
1252 |
if $opts{'strip_no_zero'} |
|
1783
|
604 |
1366 |
if (exists $PCodes{$key}) |
|
1787
|
7 |
1359 |
if (exists $eztied->{'formats'}{$key}) |