line |
true |
false |
branch |
58
|
0 |
81 |
if ($init and UNIVERSAL::isa($init, 'Date::EzDate')) |
62
|
0 |
81 |
if (defined $init and not $init =~ /\S/s) |
70
|
0 |
81 |
if $class->can('preprocess_time_string') and defined $init |
74
|
0 |
81 |
unless tie %tiehash, $class . '::Tie', $init, %opts |
77
|
0 |
81 |
if $rv->can('after_create') |
108
|
21 |
0 |
if %{$$ob{'formats'};} |
158
|
0 |
1 |
unless ref $right |
192
|
0 |
9 |
if (UNIVERSAL::isa($_[0], 'Date::EzDate')) { } |
203
|
4 |
10 |
if (UNIVERSAL::isa($arg, 'ARRAY')) { } |
210
|
0 |
9 |
if (int @args / 2 != @args / 2) { } |
222
|
0 |
9 |
unless (defined $start and defined $end) |
226
|
6 |
3 |
unless ref $start |
227
|
6 |
3 |
unless ref $end |
230
|
0 |
9 |
if ($$start{'epoch day'} > $$end{'epoch day'}) |
235
|
8 |
1 |
if ($$start{'year'} == $$end{'year'}) { } |
237
|
7 |
1 |
if ($$start{'monthnum'} == $$end{'monthnum'}) { } |
239
|
2 |
5 |
if ($$start{'day of month'} == $$end{'day of month'}) { } |
292
|
0 |
2 |
if (ref $_[0]) { } |
300
|
0 |
2 |
if (int @_ / 2 != @_ / 2) { } |
311
|
0 |
2 |
unless (defined $start and defined $end) |
315
|
2 |
0 |
unless ref $start |
316
|
2 |
0 |
unless ref $end |
319
|
0 |
2 |
if ($$start{'epochsec'} > $$end{'epochsec'}) |
326
|
1 |
1 |
if ($$start{'ampm'} ne $$end{'ampm'}) |
350
|
8 |
0 |
unless ref $date |
352
|
7 |
1 |
if ($current) { } |
353
|
5 |
2 |
if ($$date{'epochday'} == $$current[1]{'epochday'} + 1) { } |
369
|
1 |
0 |
if $current |
496
|
0 |
81 |
defined $opts{'zero_hour_ampm'} ? : |
508
|
21 |
60 |
if (ref $time) { } |
509
|
0 |
21 |
unless (UNIVERSAL::isa($time, 'ARRAY')) |
520
|
59 |
1 |
if (defined $time) |
523
|
0 |
59 |
unless defined $time |
542
|
0 |
1794 |
unless $$self{'settings'}{'dst_kludge'} |
545
|
1628 |
166 |
if ($dst_adjust) |
552
|
0 |
1794 |
unless (@timevals) |
557
|
0 |
1628 |
if ($dst_adjust and defined $dst_before and $dst_before != $$self{'dst'}) |
563
|
0 |
0 |
if ($dst_before) { } |
595
|
956 |
1597 |
if ($el =~ /^\{.*\}$/s) |
611
|
0 |
0 |
defined $$self{'warnings'} ? : |
613
|
0 |
0 |
unless $level |
615
|
0 |
0 |
if ($level == 1) |
632
|
11760 |
20 |
unless $_[0] =~ /^\%\w$/ |
672
|
0 |
1715 |
unless (defined $val) |
676
|
0 |
1715 |
if $val =~ /[\{\%]/ |
686
|
36 |
1679 |
if ($key =~ /^(dayofmonth|weekdaynum|dayofweeknum|yearday)$/s) { } |
|
3 |
1676 |
elsif ($key eq 'sec') { } |
|
3 |
1673 |
elsif ($key eq 'min') { } |
|
1 |
1672 |
elsif ($key eq 'minofday') { } |
|
6 |
1666 |
elsif ($key eq 'hour') { } |
|
3 |
1663 |
elsif ($key eq 'clocktime' or $key =~ /^mil(itary)?time$/) { } |
|
3 |
1660 |
elsif ($key eq 'ampmhour') { } |
|
25 |
1635 |
elsif ($key eq 'ampm' or $key eq 'ampmlc' or $key eq 'ampmuc') { } |
|
0 |
1635 |
elsif ($key eq 'dst') { } |
|
0 |
1635 |
elsif ($key eq 'epochsec') { } |
|
0 |
1635 |
elsif ($key eq 'epochmin') { } |
|
0 |
1635 |
elsif ($key eq 'epochhour') { } |
|
1543 |
92 |
elsif ($key eq 'epochday') { } |
|
0 |
92 |
elsif ($key =~ /dayofmonthord(word|num)?/) { } |
|
24 |
68 |
elsif ($key eq 'year') { } |
|
2 |
66 |
elsif ($key =~ /^year(two|2)digit/) { } |
|
3 |
63 |
elsif ($key =~ /^monthnumbase(one|1)/) { } |
|
31 |
32 |
elsif ($key eq 'monthnum') { } |
|
23 |
9 |
elsif ($key eq 'monthshort' or $key eq 'monthlong') { } |
|
5 |
4 |
elsif ($key eq 'weekdayshort' or $key eq 'weekdaylong' or $key eq 'dayofweekshort' or $key eq 'dayofweeklong') { } |
|
3 |
1 |
elsif ($key =~ /^yeardaybase(one|1)$/) { } |
|
1 |
0 |
elsif ($key eq 'default' or $key eq 'full' or $key eq 'dayandtime' or $key eq 'dmy') { } |
688
|
0 |
36 |
if ($key eq 'dayofmonth' and $val > daysinmonth($$self{'monthnum'}, $$self{'year'})) |
739
|
0 |
3 |
unless (defined $hour) |
741
|
0 |
3 |
unless (defined $min) |
743
|
2 |
1 |
unless (defined $sec) |
762
|
2 |
1 |
if ($$self{'hour'} >= 12) |
774
|
1 |
24 |
if (length $val == 1) |
779
|
0 |
25 |
unless ($val eq 'am' or $val eq 'pm') |
783
|
21 |
4 |
if ($$self{'hour'} < 12) { } |
784
|
1 |
20 |
if ($val eq 'am') |
787
|
0 |
4 |
if ($val eq 'pm') |
790
|
4 |
20 |
if ($val eq 'am') { } |
822
|
0 |
0 |
if ($val =~ s/^(\d+)\s*\w*$/$1/s) { } |
832
|
0 |
0 |
unless ($nval = $Date::EzDate::Tie::OrdWordsNums{$nval}) |
843
|
0 |
24 |
if ($$self{'year'} == $val) |
849
|
0 |
24 |
if ($$self{'dayofmonth'} > $maxday) { } |
884
|
0 |
31 |
unless $jumps |
890
|
23 |
8 |
if ($jumps > 0) { } |
893
|
2 |
33 |
if ($month == 11) { } |
906
|
2 |
67 |
if ($month == 0) { } |
917
|
9 |
22 |
if ($dayofmonth > 28) |
920
|
2 |
7 |
if ($dim < $dayofmonth) |
955
|
1 |
0 |
if ($key eq 'dmy') |
983
|
100 |
9536 |
if (not ref $key and $key =~ /[\{\%]/ and not $key =~ /$Date::EzDate::Tie::pcode/o) |
986
|
115 |
9536 |
if (ref $key) |
992
|
434 |
435 |
if ($el =~ s/\{([^\}]+)\}/$1/ or $el =~ /$Date::EzDate::Tie::pcode/o) |
1009
|
9109 |
427 |
unless $opts{'normalized'} |
1013
|
5333 |
4203 |
if (exists $$self{$key}) |
1014
|
3650 |
1683 |
if ($key =~ /^(dayofmonth|monthnum|hour|min|sec)$/) |
1021
|
190 |
4013 |
if ($key =~ s/no(zero|0)//) |
1025
|
0 |
4013 |
if ($key =~ /^dayofmonthord(word)?$/) |
1027
|
0 |
4013 |
if ($key eq 'dayofmonthordnum') |
1031
|
60 |
3953 |
if ($key =~ /^(weekdayshort|dayofweekshort|dayofweek)$/) |
1033
|
41 |
3912 |
if ($key =~ /^(weekdaylong|dayofweeklong)$/) |
1035
|
0 |
3912 |
if ($key eq 'dayofweeknum') |
1039
|
82 |
3830 |
if ($key eq 'monthshort') |
1040
|
0 |
82 |
unless defined $$self{'monthnum'} |
1044
|
21 |
3809 |
if ($key eq 'monthlong') |
1046
|
80 |
3729 |
if ($key =~ /^monthnumbase(one|1)/) |
1049
|
61 |
3668 |
if ($key =~ /^yeardaybase(one|1)/) |
1053
|
60 |
3608 |
if ($key =~ /^yeartwodigit/) |
1057
|
0 |
3608 |
if ($key eq 'epochmin') |
1059
|
0 |
3608 |
if ($key eq 'epochhour') |
1061
|
1589 |
2019 |
if ($key eq 'epochday') |
1065
|
40 |
1979 |
if ($key =~ /^(is)?leapyear/) |
1069
|
40 |
1939 |
if ($key eq 'daysinmonth') |
1073
|
1 |
1938 |
if ($key eq 'dmy') |
1077
|
1524 |
414 |
if ($key eq 'full') |
1090
|
0 |
414 |
if ($key eq 'dayparam') |
1098
|
43 |
371 |
if ($key =~ /^mil(itary)?time$/) |
1102
|
0 |
371 |
if ($key eq 'iso8601') |
1114
|
42 |
329 |
if ($key eq 'minofday') |
1121
|
7 |
322 |
$$self{'hour'} >= 12 ? : |
1124
|
74 |
255 |
if ($key eq 'ampm' or $key eq 'ampmlc') |
1128
|
60 |
195 |
if ($key eq 'ampmuc') |
1135
|
4 |
191 |
if ($$self{'hour'} == 0 or $$self{'hour'} == 12) { } |
|
1 |
190 |
elsif ($$self{'hour'} > 12) { } |
1143
|
113 |
82 |
if ($key eq 'ampmhour') |
1147
|
22 |
60 |
if ($key eq 'clocktime' or $key eq 'clocktimestrict') |
1153
|
22 |
0 |
if ($key eq 'clocktime') |
1154
|
0 |
22 |
if ($minofday == 0) |
1156
|
0 |
22 |
if ($minofday == 720) |
1167
|
20 |
40 |
if $key eq 'newline' |
1168
|
20 |
20 |
if $key eq 'tab' |
1169
|
0 |
20 |
if $key eq 'leftbrace' |
1170
|
0 |
20 |
if $key eq 'rightbrace' |
1171
|
20 |
0 |
if $key eq 'percent' |
1206
|
61 |
0 |
if $year % 4 == 0 and $year % 100 || $year % 400 == 0 |
1221
|
11349 |
960 |
unless ($key =~ /[\{\%]/) |
1226
|
1737 |
9612 |
if $opts{'strip_no_zero'} |
1230
|
943 |
11366 |
if (exists $Date::EzDate::Tie::PCodes{$key}) |
1234
|
15 |
11351 |
if (exists $$self{'formats'}{$key}) |
1253
|
3132 |
0 |
unless defined $epochsec |
1256
|
1 |
3131 |
unless (defined $Date::EzDate::Tie::epoch_offset) |
1294
|
59 |
42 |
if ($monthnum != 1) |
1296
|
41 |
1 |
if (isleapyear($year)) |
1314
|
0 |
60 |
unless (defined $val) |
1318
|
0 |
60 |
if ($val =~ /^\d+$/) |
1324
|
60 |
0 |
if $$self{'zero_hour_ampm'} |
1361
|
0 |
60 |
if ($val eq 'today' or $val eq 'now') |
1363
|
0 |
60 |
if ($val eq 'tomorrow') |
1365
|
0 |
60 |
if ($val eq 'yesterday') |
1377
|
59 |
1 |
unless ($opts{'dateonly'}) |
1382
|
60 |
0 |
unless ($opts{'timeonly'}) |
1383
|
56 |
4 |
if (length $val) |
1391
|
59 |
1 |
unless ($opts{'dateonly'}) |
1392
|
34 |
25 |
if (length $val and not defined $hour) |
1398
|
0 |
60 |
if (defined $val and length $val) |
1402
|
0 |
0 |
unless (defined $hour or defined $day or defined $month or defined $year) |
1412
|
22 |
38 |
unless (defined $hour) |
1414
|
22 |
38 |
unless (defined $min) |
1416
|
27 |
33 |
unless (defined $sec) |
1419
|
4 |
56 |
unless (defined $month) |
1421
|
4 |
56 |
unless (defined $year) |
1423
|
4 |
56 |
unless (defined $day) |
1427
|
0 |
60 |
if (length $year == 2) |
1437
|
0 |
60 |
unless (defined $rv) |
1458
|
0 |
56 |
if ($val =~ s/^([a-z]+) (\d+) (\S+) (\d+)$/$3/) { } |
|
2 |
54 |
elsif ($val =~ s/^(\d+) ([a-z]+) (\d+)//) { } |
|
54 |
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+)//) { } |
1512
|
3 |
32 |
if ($hour == 12) { } |
|
12 |
20 |
elsif ($ampm =~ /^p/) { } |
1514
|
0 |
3 |
if ($ampm =~ /^a/) |
1553
|
30 |
66 |
if ($str =~ s/^(\d+):(\d+):(\d+) (a|p)(m|\b)\s*//) { } |
|
4 |
62 |
elsif ($str =~ s/^(\d+):(\d+):(\d+)\s*//) { } |
|
5 |
57 |
elsif ($str =~ s/^(\d+):(\d+) (a|p)m?\s*//) { } |
|
0 |
57 |
elsif ($str =~ s/^(\d+):(\d+)\s*//) { } |
|
0 |
57 |
elsif ($str =~ s/^(\d+) (a|p)m?\b\s*//) { } |
|
2 |
55 |
elsif (not $opts{'skipjustdigits'} and $str =~ /^\d+$/) { } |
|
0 |
55 |
elsif ($opts{'croakonfail'}) { } |
1613
|
0 |
4 |
if $day > $maxday |