<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "ApplePayontheWeb",
  "identifier" : "/documentation/ApplePayontheWeb/ApplePayDateComponents",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Apple Pay on the Web"
    ],
    "preciseIdentifier" : "struct/ApplePayDateComponents"
  },
  "title" : "ApplePayDateComponents"
}
-->

# ApplePayDateComponents

A dictionary that specifies the values for the calendrical units for a date.

```
dictionary ApplePayDateComponents {
	long years;
	long months;
	long days;
	long hours;
};
```

## Overview

When specifying a range using date components, provide all elements of the [`ApplePayDateComponents`](/documentation/ApplePayontheWeb/ApplePayDateComponents) down to the level of granularity that you want to expose. For example, if you specify a range of days, be sure to include values for both [`months`](/documentation/ApplePayontheWeb/ApplePayDateComponents/months) and [`years`](/documentation/ApplePayontheWeb/ApplePayDateComponents/years) in addition to [`days`](/documentation/ApplePayontheWeb/ApplePayDateComponents/days) in the [`ApplePayDateComponents`](/documentation/ApplePayontheWeb/ApplePayDateComponents).

[`Apple Pay on the Web`](/documentation/ApplePayontheWeb) uses the Gregorian calendar when processing dates.

## Topics

### Date Components

[`long years;`](/documentation/ApplePayontheWeb/ApplePayDateComponents/years)

A number that represents a year.

[`long months;`](/documentation/ApplePayontheWeb/ApplePayDateComponents/months)

A number between 1 and 12 that represents a month.

[`long days;`](/documentation/ApplePayontheWeb/ApplePayDateComponents/days)

A number that represents a day.

[`long hours;`](/documentation/ApplePayontheWeb/ApplePayDateComponents/hours)

A number that represents an hour.



---

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)