<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 11.0.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMEventTrigger/predicateForEvaluatingTriggerOccurringBetweenDate(with:secondDateWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMEventTrigger(cm)predicateForEvaluatingTriggerOccurringBetweenDateWithComponents:secondDateWithComponents:"
  },
  "title" : "predicateForEvaluatingTriggerOccurringBetweenDate(with:secondDateWith:)"
}
-->

# predicateForEvaluatingTriggerOccurringBetweenDate(with:secondDateWith:)

Creates a predicate that evaluates whether the event occurred between the specified times.

```
class func predicateForEvaluatingTriggerOccurringBetweenDate(with firstDateComponents: DateComponents, secondDateWith secondDateWithComponents: DateComponents) -> NSPredicate
```

## Parameters

`firstDateComponents`

Date components that represent the first time boundary to compare to the execution time.

`secondDateWithComponents`

Date components that represent the second time boundary to compare to the execution time.

## Return Value

A predicate object that represents a condition to evaluate before executing the scene.

---

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)