Skip to content

Structure

Duration.UnitsFormatStyle.FractionalPartDisplayStrategy

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
Specifies how a duration is displayed if it cannot be represented exactly with the allowed units.
struct FractionalPartDisplayStrategy

Overview

For example, you can change this option to show a duration of 1 hour and 15 minutes as “1.25 hr”, “1 hr”, or “1.5 hr” with different lengths and rounding rules when hour is the only allowed unit.

Topics

Initializers

Instance Properties

Type Properties

Type Methods

Relationships

Conforms To

  • Swift.Decodable
  • Swift.Encodable
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype