---
title: "hourly(startDate:endDate:)"
framework: weatherkit
role: symbol
role_heading: Type Method
path: "weatherkit/weatherquery/hourly(startdate:enddate:)"
---

# hourly(startDate:endDate:)

The hourly forecast query that takes a start date and end date for the request, with the following caveats:

## Declaration

```swift
static func hourly(startDate: Date, endDate: Date) -> WeatherQuery<T>
```

## Parameters

- `startDate`: The lower boundary of the time range for the forecast (inclusive)
- `endDate`: The upper boundary of the time range for the forecast (exclusive)

## Return Value

Return Value An hourly forecast query for the specified time range

## Discussion

Discussion Historical data is available from Aug 1, 2021. Forecasts are available up to 10 days (~240 hours) in the future. Each request will return a maximum of 10 days (~240 hours). Hours in the forecast range from startDate(inclussive) to endDate (exclusive)

## See Also

### Creating queries

- [alerts](weatherkit/weatherquery/alerts.md)
- [availability](weatherkit/weatherquery/availability.md)
- [current](weatherkit/weatherquery/current.md)
- [daily](weatherkit/weatherquery/daily.md)
- [hourly](weatherkit/weatherquery/hourly.md)
- [minute](weatherkit/weatherquery/minute.md)
- [daily(startDate:endDate:)](weatherkit/weatherquery/daily(startdate:enddate:).md)
