Skip to content

DTO: Day

Morten Rugaard edited this page Sep 5, 2022 · 1 revision

Home / DTO / Day

Forecasts Measurements Miscellaneous
Alert Cloud cover Area
Alert details Direction Coordinate
Day Humidity Message
Hour Precipitation Moon
Minute Pressure Provider
Period Temperature Source
Visibility Sun times
Wind Time period

Day

The historical or forecasted weather conditions for a specified day.

Available data

Helpers

Weather condition

An enumeration value indicating the weather condition at the time.

getCondition(): \Rugaard\WeatherKit\Enums\WeatherCondition

Returns an enum of type Rugaard\WeatherKit\Enums\WeatherCondition.

Forecasts

A Collection that contains the daytime and overnight forecast.

Note: If DTO contains todays forecast, a restOfday forecast will be available.

getForecasts(): \Illuminate\Support\Collection

Returns an object of type Illuminate\Support\Collection.

All keys return a DTO of type Rugaard\WeatherKit\DTO\Forecasts\Period.

Forecast period

The time period which forecast covers.

getForecastTime(): \Rugaard\WeatherKit\DTO\TimePeriod 

Returns a DTO of type Rugaard\WeatherKit\DTO\TimePeriod.

Max UV Index

The maximum ultraviolet (UV) index value.

getForecastTime(): \Rugaard\WeatherKit\Enums\UVIndex 

Returns an enum of type Rugaard\WeatherKit\Enums\UVIndex.

Moon

The moonrise/moonset times and moon phase.

getMoon(): \Rugaard\WeatherKit\DTO\Moon 

Returns a DTO of type Rugaard\WeatherKit\DTO\Moon.

Precipitation

The precipitation forecasted to occur during the day.

getPrecipitation(): \Illuminate\Support\Collection

Returns an object of type Illuminate\Support\Collection with five keys: type, chance, amount and snowfall.

Sun Times

A Collection with sunrise/sunset times (incl. civil, nautical and astronomical times).

getSunTimes(): \Illuminate\Support\Collection

Returns an object of type Illuminate\Support\Collection with four keys: solarMidnight, solarNoon, sunrise and sunset.

Temperature

The min and max temperature forecasted to occur.

getTemperature(): \Illuminate\Support\Collection

Returns an object of type Illuminate\Support\Collection, where each key returns a DTO of type Rugaard\WeatherKit\DTO\Measurements\Temperature.

To Array

Convert the entire DTO to an array.

toArray(): array 

Returns an array.

Clone this wiki locally