]> git.donarmstrong.com Git - deb_pkgs/libhtml-calendarmonth-perl.git/blobdiff - lib/HTML/CalendarMonth/DateTool/DateManip.pm
* Fix FTBFS caused by new version of Date::Manip (closes: 571421)
[deb_pkgs/libhtml-calendarmonth-perl.git] / lib / HTML / CalendarMonth / DateTool / DateManip.pm
index 882aed69b970b58118f20f13044e4fafc759575d..3ed893c1163ad0705e4803e8ae56eff7a7eac6d0 100644 (file)
@@ -52,7 +52,7 @@ sub add_days {
   $month ||= $self->month;
   $year  ||= $self->year;
   my $date = DateCalc(sprintf("%04d%02d%02d", $year, $month, $day),
-                      "+ $delta days");
+                      ($delta < 0 ? '':'+')." $delta days");
   my($y, $m, $d) = $date =~ /^(\d{4})(\d\d)(\d\d)/;
   $_ += 0 foreach ($y, $m, $d);
   ($d, $m, $y);