public function setDate($date, $format = DATE_FORMAT_ISO)
    {
        if ($date instanceof AnDate) {
            $this->copy($date);
        } elseif (is_array($date) || $date instanceof AnConfig) {
            foreach ($date as $key => $value) {
                $this->$key = $value;
            }
        } else {
            parent::setDate($date, $format);
        }

        return $this;
    }