<!--
{
  "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/UnitsFormatStyle/FractionalPartDisplayStrategy/show(length:rounded:increment:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s8DurationV10FoundationE16UnitsFormatStyleV29FractionalPartDisplayStrategyV4show6length7rounded9incrementAGSi_s25FloatingPointRoundingRuleOSdSgtFZ"
  },
  "title" : "show(length:rounded:increment:)"
}
-->

# show(length:rounded:increment:)

Creates a display strategy that shows a fractional part.

```
static func show(length: Int, rounded rule: FloatingPointRoundingRule = .toNearestOrEven, increment: Double? = nil) -> Duration.UnitsFormatStyle.FractionalPartDisplayStrategy
```

## Parameters

`length`

The maximum string length of the fractional part.

`rule`

A rule for rounding fractional values up or down. Defaults to [`FloatingPointRoundingRule.toNearestOrEven`](/documentation/Swift/FloatingPointRoundingRule/toNearestOrEven).

`increment`

A multiple by which the formatter rounds the fractional part. The formatter produces a value that is an even multiple of this increment. If this parameter is `nil` (the default), the formatter doesn’t apply an increment. This value is only meaningful when the combination of allowed units, rounding rule, and formatting strategy requires expressing a unit with a fractional part. For example, a formatter that only allows minutes and uses a strategy with a length of `2` and default rounding rule formats 40 seconds as `0.67 minutes`. With a `increment` of `0.05`, the formatter formats this value as `0.65 minutes` instead.

---

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)