/** * * @param string $time * @param type $object */ public function __construct($time = 'now', $object = NULL) { if ($time instanceof \DateTime) { $time = $time->format(\Datetime::ISO8601); } if ($object === NULL) { parent::__construct($time); } else { parent::__construct($time, $object); } if ($this->isRelative($time) && !date('w')) { parent::modify('-1 week'); } }