<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/DateComponentsFormatter/collapsesLargestUnit",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDateComponentsFormatter(py)collapsesLargestUnit"
  },
  "title" : "collapsesLargestUnit"
}
-->

# collapsesLargestUnit

A Boolean value indicating whether to collapse the largest unit into smaller units when a certain threshold is met.

```
var collapsesLargestUnit: Bool { get set }
```

## Discussion

An example of when this property might apply is when expressing 63 seconds worth of time. When this property is set to <doc://com.apple.documentation/documentation/Swift/true>, the formatted value would be “63s”. When the value of this property is <doc://com.apple.documentation/documentation/Swift/false>, the formatted value would be “1m 3s”.

The default value of this property is <doc://com.apple.documentation/documentation/Swift/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)