Branch Coverage

blib/lib/Date/Utility.pm
Criterion Covered Total %
branch 87 98 88.7


line true false branch
265 1 2 if ($two_digit_year < 0)
397 2 1 $self->day_of_week == 0 || $self->day_of_week == 6 ? :
407 2 1 $self->is_a_weekend ? :
423 4 224633 if (not defined $params_ref) { }
1 224632 elsif (ref $params_ref eq 'Date::Utility') { }
47 224585 elsif (ref $params_ref eq 'HASH') { }
200417 24168 elsif ($params_ref =~ /$EPOCH_RE/) { }
428 1 46 if (not $params_ref->{'datetime'} || $params_ref->{'epoch'}) { }
1 45 elsif ($params_ref->{'datetime'} and $params_ref->{'epoch'}) { }
7 38 elsif ($params_ref->{'epoch'}) { }
448 200909 23711 unless ($obj)
486 0 24206 if ($datetime =~ /$sub_second/) { }
13 24193 elsif ($datetime =~ /$date_only/) { }
36 24157 elsif ($datetime =~ /$date_with_time/) { }
24074 83 elsif ($datetime =~ /$numeric_date_only/) { }
2 81 elsif ($datetime =~ /$numeric_date_only_dd_mm_yyyy/) { }
70 11 elsif ($datetime =~ /$fully_specced/) { }
1 10 elsif ($datetime =~ /$datetime_yyyymmdd_hhmmss_TZ/) { }
499 26 10 if (defined $6)
532 45 24151 if (length $year == 2)
533 1 44 if ($year > 30 and $year < 70)
537 35 9 $year <= 30 ? :
562 0 8 unless ($date)
577 0 5 unless ($date)
580 2 3 $self->{'epoch'} < $date->{'epoch'} ? :
592 0 5 unless ($date)
595 2 3 $self->{'epoch'} > $date->{'epoch'} ? :
607 0 13 unless ($date)
610 7 6 $self->{'epoch'} == $date->{'epoch'} ? :
793 5 17 if ($month == 2)
795 3 2 ($year % 4 || !($year % 100)) && $year % 400 ? :
854 0 48 if ($tzname eq "UTC" or $tzname eq "Z")
861 48 38 if ($tm < $sp->[1])
872 0 200048 if ($tzname eq "UTC" or $tzname eq "Z")
879 200048 80713 if ($tm < $sp->[1])
919 429 0 unless (ref $ti)
920 4 425 if ($ti =~ s/([\d.]+)y//)
922 0 3 $ti ? :
924 18 407 if ($ti =~ s/([\d.]+)mo//i)
926 0 17 $ti ? :
935 2 404 $sec == 0 ? :
1090 3 3 defined $date && $date =~ /^\d{1,2}\-\w{3}-\d{2}$/ ? :
1107 0 5 if $rem == 0
1150 2 2 if (not $today_obj or $time > $today_ends_at or $time < $today_starts_at)
1181 1 7 unless &looks_like_number($years) and $years == int $years
1234 1 21 unless &looks_like_number($months) and $months == int $months
1237 5 16 if ($new_month < 1 or $new_month > 12)
1240 1 4 if ($new_month < 1)
1297 18 12 $day < $max_day ? :