public function getUVIndex($lat, $lon, $dateTime, $timePrecision = 'day')
    {
        $answer = $this->getRawUVIndexData($lat, $lon, $dateTime, $timePrecision);
        $json = $this->parseJson($answer);

        return new UVIndex($json);
    }
public function getUVIndex($lat, $lon, $dateTime, $timePrecision = 'day')
    {
        $answer = $this->getRawUVIndexData($lat, $lon, $dateTime, $timePrecision);
        $json = $this->parseJson($answer);

        return new UVIndex($json);
    }
public function getUVIndex ( $ lat , $ lon , $ dateTime , $ timePrecision = 'day' ) { $ answer = $ this -> getRawUVIndexData ( $ lat , $ lon , $ dateTime , $ timePrecision ) ; $ json = $ this -> parseJson ( $ answer ) ; return new UVIndex ( $ json ) ; }
Returns the uv index at date, time and location you specified.

@param float              $lat           The location's latitude.
@param float              $lon           The location's longitude.
@param \DateTimeInterface $dateTime      The date and time to request data for.
@param string             $timePrecision This decides about the timespan OWM will look for the uv index. The tighter
the timespan, the less likely it is to get a result. Can be 'year', 'month',
'day', 'hour', 'minute' or 'second', defaults to 'day'.

@throws OpenWeatherMap\Exception  If OpenWeatherMap returns an error.
@throws \InvalidArgumentException If an argument error occurs.

@return UVIndex The uvi object.

@api
Returns the uv index at date time and location you specified .