From: Chuck Hagenbuch Date: Fri, 22 May 2009 02:50:30 +0000 (-0400) Subject: fix RepeaterDayPortion offset() method, and don't lose seconds in RepeaterDayPortion... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f7f36b1e7ec510e421074f32d83cdfe1d3fd074e;p=horde.git fix RepeaterDayPortion offset() method, and don't lose seconds in RepeaterDayPortion::next() --- diff --git a/framework/Date_Parser/lib/Horde/Date/Repeater/DayPortion.php b/framework/Date_Parser/lib/Horde/Date/Repeater/DayPortion.php index f87395be1..ee63cc241 100644 --- a/framework/Date_Parser/lib/Horde/Date/Repeater/DayPortion.php +++ b/framework/Date_Parser/lib/Horde/Date/Repeater/DayPortion.php @@ -87,7 +87,7 @@ class Horde_Date_Repeater_DayPortion extends Horde_Date_Repeater } } - $rangeEnd = new Horde_Date(array('year' => $rangeStart->year, 'month' => $rangeStart->month, 'day' => $rangeStart->day, 'sec' => $this->range[1] - $this->range[0])); + $rangeEnd = $rangeStart->add($this->range[1] - $this->range[0]); $this->currentSpan = new Horde_Date_Span($rangeStart, $rangeEnd); } else { switch ($pointer) { @@ -118,7 +118,7 @@ class Horde_Date_Repeater_DayPortion extends Horde_Date_Repeater $this->now = $span->begin; $portionSpan = $this->next($pointer); $direction = ($pointer == 'future') ? 1 : -1; - return $portionSpan + ($direction * ($amount - 1) * Horde_Date_Repeater_Day::DAY_SECONDS); + return $portionSpan->add(array('day' => $direction * ($amount - 1))); } public function width()