<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKShippingMethod/dateComponentsRange",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(cs)PKShippingMethod(py)dateComponentsRange"
  },
  "title" : "dateComponentsRange"
}
-->

# dateComponentsRange

An expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup.

```
@NSCopying var dateComponentsRange: PKDateComponentsRange? { get set }
```

## Discussion

Use this object to set the expected date range for shipping a package, or the time an item is available for pickup. The payment sheet displays the range as part of the shipping method on the main sheet.

The example below shows setting a two-day time range for shipping a package that starts three days from today:

```swift
let shippingMethod = PKShippingMethod(label: "Delivery", amount: NSDecimalNumber(string: "10.00"))

let today = Date()
let calendar = Calendar.current

let shippingStart = calendar.date(byAdding: .day, value: 3, to: today)!
let shippingEnd = calendar.date(byAdding: .day, value: 5, to: today)!

let startComponents = calendar.dateComponents([.calendar, .year, .month, .day], from: shippingStart)
let endComponents = calendar.dateComponents([.calendar, .year, .month, .day], from: shippingEnd)

shippingMethod.dateComponentsRange = PKDateComponentsRange(start: startComponents, end: endComponents)
```

---

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)