<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceActivity",
  "identifier" : "/documentation/DeviceActivity/DeviceActivityFilter/SegmentInterval-swift.enum/hourly(during:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Device Activity"
    ],
    "preciseIdentifier" : "s:14DeviceActivity0aB6FilterV15SegmentIntervalO6hourlyyAE10Foundation04DateE0V_tcAEmF"
  },
  "title" : "DeviceActivityFilter.SegmentInterval.hourly(during:)"
}
-->

# DeviceActivityFilter.SegmentInterval.hourly(during:)

Indicates that the system aggregates data into hourly segments within the specified interval.

```
case hourly(during: DateInterval = DateInterval(
                start: Calendar.current.startOfDay(for: .now),
                end: .now
            ))
```

## Discussion

If you do not provide an interval, then the system aggregates device activity into hour-long segments for the current day. The system
disregards any date components in the interval that are smaller than `.hour` and instead uses the start of the hour
specified by `interval.start` and the end of the hour specified by `interval.end`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)