public function add($duration)
    {
        $d1 = $this->refDate;
        $d2 = clone $d1;

        if ($duration instanceof QtiDuration) {
            $toAdd = $duration;
        } elseif ($duration instanceof DateInterval) {
            $toAdd = self::createFromDateInterval($duration);
        } else {
            return;
        }

        $d2->add(new DateInterval($this->__toString()));
        $d2->add(new DateInterval($toAdd->__toString()));

        $interval = $d2->diff($d1);
        $this->interval = $interval;
    }