function update($date) { if (self::$parts['time']) { self::$parts = self::date2parts($date); } else { self::$parts = self::date2parts($date); } }