public function addTime($time)
    {
        foreach ((array) $time as $value) {
            // only accept valid times (HH:mm)
            if ( ! preg_match('#([01][0-9]|2[0-3]):[0-5][0-9]#', $value)) {
                throw new InvalidArgumentException('Time must be valid: HH:mm.');
            }

            $this->times[] = $value;
        }

        return $this;
    }