| line |
true |
false |
branch |
|
398
|
4 |
241 |
if ($string =~ /^(?:last|past)\s?(\d+)?\s?weekdays?/)
|
|
400
|
2 |
2 |
if ($interval == 1) { }
|
|
406
|
3 |
242 |
if ($string =~ /^(\d+)?\s?weekdays? ago/)
|
|
415
|
24 |
221 |
if ($string =~ /\s(?:to|thru|through|-|\x{2013}|\x{2014})\s/) { }
|
|
|
3 |
218 |
elsif (not $string =~ /^\d+-\d+$/ and $string =~ /^[^-]+-[^-]+$/) { }
|
|
|
6 |
212 |
elsif ($string eq 'today' or $string =~ /^(?:this|current) day$/) { }
|
|
|
1 |
211 |
elsif ($string =~ /^(?:this|current) hour$/) { }
|
|
|
1 |
210 |
elsif ($string =~ /^(?:this|current) minute$/) { }
|
|
|
2 |
208 |
elsif ($string =~ /^(?:this|current) second$/) { }
|
|
|
1 |
207 |
elsif ($string =~ /^(?:this|current) week$/) { }
|
|
|
1 |
206 |
elsif ($string =~ /^(?:this|current) month$/) { }
|
|
|
1 |
205 |
elsif ($string =~ /^(?:this|current) quarter$/) { }
|
|
|
1 |
204 |
elsif ($string =~ /^(?:this|current) year$/) { }
|
|
|
3 |
201 |
elsif ($string =~ /^this ($weekday)$/) { }
|
|
|
8 |
193 |
elsif ($string =~ /^(?:last|past) (\d+)?\s?(hour|minute|second)s?$/) { }
|
|
|
0 |
193 |
elsif ($string =~ /^(?:last|past) (\d+) days?$/) { }
|
|
|
4 |
189 |
elsif ($string =~ /^(?:last|past) (\d+) weeks?$/) { }
|
|
|
2 |
187 |
elsif ($string =~ /^(?:last|past) (\d+) months?$/) { }
|
|
|
2 |
185 |
elsif ($string =~ /^(?:last|past) (\d+) years?$/) { }
|
|
|
1 |
184 |
elsif ($string =~ /^(?:last|past) (\d+) quarters?$/) { }
|
|
|
1 |
183 |
elsif ($string =~ /^(?:last|past) (\d+) ($weekday)s?$/) { }
|
|
|
1 |
182 |
elsif ($string =~ /^yesterday$/) { }
|
|
|
1 |
181 |
elsif ($string =~ /^(?:last|previous) week$/) { }
|
|
|
1 |
180 |
elsif ($string =~ /^(?:last|previous) month$/) { }
|
|
|
1 |
179 |
elsif ($string =~ /^(?:last|previous) quarter$/) { }
|
|
|
0 |
179 |
elsif ($string =~ /^(?:last|previous) year$/) { }
|
|
|
2 |
177 |
elsif ($string =~ /^(?:last|previous) ($weekday)$/) { }
|
|
|
2 |
175 |
elsif ($string =~ /^(?:this )?past ($weekday)$/) { }
|
|
|
9 |
166 |
elsif ($string =~ /^(\d+) ((?:month|day|week|year|quarter)s?) ago$/) { }
|
|
|
3 |
163 |
elsif ($string =~ /^(\d+) ((?:hour|minute|second)s?) ago$/) { }
|
|
|
3 |
160 |
elsif ($string =~ /^(\d+) ($weekday)s? ago$/) { }
|
|
|
2 |
158 |
elsif ($string =~ /^(\d+) ($weekday)s? (?:hence|from\s+now)$/) { }
|
|
|
1 |
157 |
elsif ($string =~ /^(\d+)? weeks? (?:hence|from\s+now)$/) { }
|
|
|
1 |
156 |
elsif ($string =~ /^(\d+)? days? (?:hence|from\s+now)$/) { }
|
|
|
2 |
154 |
elsif ($string =~ /^next (\d+)?\s?($weekday)s?$/) { }
|
|
|
1 |
153 |
elsif ($string =~ /^(?:this )?coming ($weekday)$/) { }
|
|
|
5 |
148 |
elsif ($string =~ /^next (\d+)?\s?(second|minute|hour)s?$/) { }
|
|
|
2 |
146 |
elsif ($string =~ /^(?:next (\d+)?\s?days?|tomorrow)$/) { }
|
|
|
3 |
143 |
elsif ($string =~ /^next (\d+)?\s?weeks?$/) { }
|
|
|
1 |
142 |
elsif ($string =~ /^next (\d+)?\s?months?$/) { }
|
|
|
2 |
140 |
elsif ($string =~ /^next (\d+)?\s?quarters?$/) { }
|
|
|
0 |
140 |
elsif ($string =~ /^(\d+)?\s?quarters? (?:hence|from\s+now)$/) { }
|
|
|
2 |
138 |
elsif ($string =~ /^next (\d+)?\s?years?$/) { }
|
|
|
0 |
138 |
elsif ($string =~ /^next (\d+)?\s?($weekday)s?$/) { }
|
|
|
4 |
134 |
elsif ($string =~ /^(\d+(?:st|nd|rd|th)?|end) of (this|last|next) month$/) { }
|
|
|
1 |
133 |
elsif ($string =~ /^(\d+) seconds? (?:hence|from\s+now)$/) { }
|
|
|
1 |
132 |
elsif ($string =~ /^(\d+) minutes? (?:hence|from\s+now)$/) { }
|
|
|
1 |
131 |
elsif ($string =~ /^(\d+) hours? (?:hence|from\s+now)$/) { }
|
|
|
1 |
130 |
elsif ($string =~ /^(\d+)? months? (?:hence|from\s+now)$/) { }
|
|
|
1 |
129 |
elsif ($string =~ /^(\d+)? years? (?:hence|from\s+now)$/) { }
|
|
|
6 |
123 |
elsif ($string =~ /^(\d+(?:st|nd|rd|th)?|end) of (\d+) months? (ago|from now|hence)$/) { }
|
|
|
7 |
116 |
elsif ($string =~ /^(this|last|next)?\s?($month_re)$/) { }
|
|
|
2 |
114 |
elsif ($string =~ /^($month_re)\s+(\d{4})$/) { }
|
|
|
2 |
112 |
elsif ($string =~ /^<=/) { }
|
|
|
9 |
103 |
elsif ($string =~ /^(?:before |<)/i) { }
|
|
|
2 |
101 |
elsif ($string =~ /^>=/) { }
|
|
|
8 |
93 |
elsif ($string =~ /^(?:after |>)/i) { }
|
|
|
3 |
90 |
elsif ($string =~ /^since /i) { }
|
|
|
90 |
0 |
elsif (($beg, my $incomplete) = $self->_parse_date_manip($string)) { }
|
|
483
|
2 |
1 |
if ($adjust < 0) { }
|
|
|
1 |
0 |
elsif ($adjust > 0) { }
|
|
508
|
3 |
5 |
if ($unit eq 'hours') { }
|
|
|
3 |
2 |
elsif ($unit eq 'minutes') { }
|
|
551
|
1 |
0 |
defined $1 ? :
|
|
554
|
1 |
0 |
if $adjust >= 0
|
|
598
|
1 |
1 |
if $adjust >= 0
|
|
610
|
2 |
7 |
if ($unit eq "quarters")
|
|
626
|
1 |
2 |
if ($unit eq 'hours') { }
|
|
|
2 |
0 |
elsif ($unit eq 'minutes') { }
|
|
|
0 |
0 |
elsif ($unit eq 'seconds') { }
|
|
641
|
3 |
0 |
if $adjust >= 0
|
|
650
|
2 |
0 |
defined $1 ? :
|
|
653
|
1 |
1 |
if $adjust <= 0
|
|
669
|
2 |
0 |
defined $1 ? :
|
|
672
|
2 |
0 |
if $adjust <= 0
|
|
682
|
1 |
0 |
if $adjust <= 0
|
|
689
|
1 |
4 |
defined $1 ? :
|
|
697
|
1 |
1 |
defined $1 ? :
|
|
703
|
2 |
1 |
defined $1 ? :
|
|
710
|
0 |
1 |
defined $1 ? :
|
|
717
|
1 |
1 |
defined $1 ? :
|
|
727
|
0 |
0 |
defined $1 ? :
|
|
736
|
2 |
0 |
defined $1 ? :
|
|
743
|
0 |
0 |
defined $1 ? :
|
|
746
|
0 |
0 |
if $adjust <= 0
|
|
756
|
1 |
3 |
if ($2 eq 'last') { }
|
|
|
0 |
3 |
elsif ($2 eq 'next') { }
|
|
762
|
1 |
3 |
if ($1 eq 'end') { }
|
|
799
|
3 |
3 |
if ($3 eq 'ago') { }
|
|
|
3 |
0 |
elsif ($3 eq 'from now' or $3 eq 'hence') { }
|
|
805
|
0 |
6 |
if ($1 eq 'end') { }
|
|
818
|
1 |
6 |
if (defined $y and $y eq 'last') { }
|
|
|
1 |
5 |
elsif (defined $y and $y eq 'next') { }
|
|
826
|
7 |
19 |
if ($m =~ /$re/)
|
|
841
|
2 |
4 |
if ($m =~ /$re/)
|
|
860
|
9 |
0 |
if (defined $end)
|
|
875
|
8 |
0 |
if (defined $beg)
|
|
902
|
72 |
18 |
unless (scalar @$incomplete)
|
|
904
|
8 |
64 |
if ($string =~ /^(\d+)? (business day)(s?) ago$/)
|
|
911
|
8 |
64 |
if ($string =~ /^(?:last|past) (\d+)? (business day)(s?)$/)
|
|
922
|
1 |
7 |
if ($edow == 0) { }
|
|
|
1 |
6 |
elsif ($edow == 6) { }
|
|
|
1 |
5 |
elsif ($bdow == 5) { }
|
|
951
|
49 |
17 |
if ($beg->hms eq "00:00:00" and $end->hms eq "00:00:00" and not $string =~ /(midnight|00:00:00|12(:00){0,2}AM)/)
|
|
963
|
0 |
39 |
if ($component eq 'day') { }
|
|
995
|
274 |
5 |
if (my $cb = $self->{'now_callback'})
|
|
1042
|
2 |
88 |
if ($Date::Manip::VERSION lt '6' or $dm_backend eq 'DM5') { }
|
|
1058
|
88 |
0 |
unless ($err)
|
|
1062
|
39 |
401 |
unless $dm->complete($section->[1])
|
|
1067
|
90 |
0 |
if ($y)
|
|
1081
|
0 |
90 |
unless $date
|
|
1095
|
239 |
6 |
unless ($dashed_date =~ /$US_FORMAT_WITH_DASHES/)
|
|
1100
|
0 |
6 |
1 == length $1 ? :
|
|
1101
|
0 |
6 |
1 == length $2 ? :
|
|
1119
|
13 |
12 |
unless ($measure =~ /s$/)
|