public function this($pointer = 'future') { parent::this($pointer); $end = clone $this->now; $end->sec++; return new Horde_Date_Span($this->now, $end); }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'future': $thisWeekStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1)); $sundayRepeater = new Horde_Date_Repeater_DayName('sunday'); $sundayRepeater->now = $this->now; $thisSundaySpan = $sundayRepeater->this('future'); $thisWeekEnd = $thisSundaySpan->begin; return new Horde_Date_Span($thisWeekStart, $thisWeekEnd); case 'past': $thisWeekEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour)); $sundayRepeater = new Horde_Date_Repeater_DayName('sunday'); $sundayRepeater->now = $this->now; $lastSundaySpan = $sundayRepeater->next('past'); $thisWeekStart = $lastSundaySpan->begin; return new Horde_Date_Span($thisWeekStart, $thisWeekEnd); case 'none': $sundayRepeater = new Horde_Date_Repeater_DayName('sunday'); $sundayRepeater->now = $this->now; $lastSundaySpan = $sundayRepeater->next('past'); $thisWeekStart = $lastSundaySpan->begin; $thisWeekEnd = clone $thisWeekStart; $thisWeekEnd->day += 7; return new Horde_Date_Span($thisWeekStart, $thisWeekEnd); } }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'past': return $this->next($pointer); case 'future': case 'none': return $this->next('none'); } }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'future': case 'none': $saturdayRepeater = new Horde_Date_Repeater_DayName('saturday'); $saturdayRepeater->now = $this->now; $thisSaturdaySpan = $saturdayRepeater->this('future'); return new Horde_Date_Span($thisSaturdaySpan->begin, $thisSaturdaySpan->begin->add(array('day' => 2))); case 'past': $saturdayRepeater = new Horde_Date_Repeater_DayName('saturday'); $saturdayRepeater->now = $this->now; $lastSaturdaySpan = $saturdayRepeater->this('past'); return new Horde_Date_Span($lastSaturdaySpan->begin, $lastSaturdaySpan->begin->add(array('day' => 2))); } }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'future': $thisYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1)); $thisYearEnd = new Horde_Date(array('year' => $this->now->year + 1, 'month' => 1, 'day' => 1)); break; case 'past': $thisYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => 1, 'day' => 1)); $thisYearEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day)); break; case 'none': $thisYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => 1, 'day' => 1)); $thisYearEnd = new Horde_Date(array('year' => $this->now->year + 1, 'month' => 1, 'day' => 1)); break; } return new Horde_Date_Span($thisYearStart, $thisYearEnd); }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'future': $dayBegin = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1)); $dayEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1)); break; case 'past': $dayBegin = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day)); $dayEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour)); break; case 'none': $dayBegin = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day)); $dayEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1)); break; } return new Horde_Date_Span($dayBegin, $dayEnd); }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'future': $hourStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min + 1)); $hourEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1)); break; case 'past': $hourStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour)); $hourEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min)); break; case 'none': $hourStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour)); $hourEnd = $hourStart->add(array('hour' => 1)); break; } return new Horde_Date_Span($hourStart, $hourEnd); }
public function this($pointer = 'future') { parent::this($pointer); switch ($pointer) { case 'future': $minuteBegin = clone $this->now; $minuteEnd = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min)); break; case 'past': $minuteBegin = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min)); $minuteEnd = clone $this->now; break; case 'none': $minuteBegin = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min)); $minuteEnd = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min + 1)); break; } return new Horde_Date_Span($minuteBegin, $minuteEnd); }
public function this($context = 'future') { parent::this($context); if ($context == 'none') { $context = 'future'; } return $this->next($context); }
public function this($context = 'future') { parent::this($context); $rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'sec' => $this->range[0])); $this->currentSpan = new Horde_Date_Span($rangeStart, $rangeStart->add($this->range[1] - $this->range[0])); return $this->currentSpan; }
public function this($pointer = 'future') { parent::this($pointer); throw new Horde_Date_Repeater_Exception('Not implemented'); }