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);
}
}