<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Duration/==(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Operator",
  "symbol" : {
    "kind" : "Operator",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s8DurationV2eeoiySbAB_ABtFZ"
  },
  "title" : "==(_:_:)"
}
-->

# ==(_:_:)

Returns a Boolean value indicating whether two values are equal.

```
static func == (lhs: Duration, rhs: Duration) -> Bool
```

## Parameters

`lhs`

A value to compare.

`rhs`

Another value to compare.

## Discussion

Equality is the inverse of inequality. For any values `a` and `b`,
`a == b` implies that `a != b` is `false`.

---

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)