---
title: subscriptionPeriodFormatStyle
framework: storekit
role: symbol
role_heading: Instance Property
path: storekit/product/subscriptionperiodformatstyle
---

# subscriptionPeriodFormatStyle

The format style for the date components related to a subscription’s duration.

## Declaration

```swift
@backDeployed(before: iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, macCatalyst 16.0)
var subscriptionPeriodFormatStyle: Date.ComponentsFormatStyle { get }
```

## Discussion

Discussion Use this format style to format text that describes a subscription period, including its length and unit, such as “1 week”, “2 months”, and so on. Use this style with the formatted(_:referenceDate:) method on Product.SubscriptionPeriod to format the subscription period for the App Store locale. note: When using subscriptionPeriodFormatStyle on systems earlier than iOS 16, macOS 13, tvOS 16, and watchOS 9, the property may return a format style with a sentinel locale identifier of “xx_XX” in uncommon cases, including if the server has an error, or while testing your app using StoreKit Testing in Xcode. For StoreKit testing, use a later OS version.

## See Also

### Displaying a product description and price

- [displayName](storekit/product/displayname.md)
- [description](storekit/product/description.md)
- [displayPrice](storekit/product/displayprice.md)
- [price](storekit/product/price.md)
- [priceFormatStyle](storekit/product/priceformatstyle.md)
- [subscriptionPeriodUnitFormatStyle](storekit/product/subscriptionperiodunitformatstyle.md)
