public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
- return $span->add($direction * $amount * self::DAY_SECONDS);
+ return $span->add(array('day' => $direction * $amount));
}
public function width()
} else {
switch ($pointer) {
case 'future':
- $this->currentSpan->add(array('day' => 1));
+ $this->currentSpan = $this->currentSpan->add(array('day' => 1));
break;
case 'past':
- $this->currentSpan->sub(array('day' => 1));
+ $this->currentSpan = $this->currentSpan->add(array('day' => -1));
+ break;
}
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
- return $span->add($direction * $amount * self::WEEK_SECONDS);
+ return $span->add(array('day' => $direction * $amount * 7));
}
public function width()