Skip to content

StructureSwift

Duration.UnitsFormatStyle

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
A FormatStyle that displays a duration as a list of duration units, such as “2 hours, 43 minutes, 26 seconds” in English.
struct UnitsFormatStyle

Topics

Structures

  • struct Attributed
    A format style to format a duration as an attributed string. Units in the string are annotated with the durationField and measurement attribute keys and the DurationFieldAttribute and MeasurementAttribute attribute values.
  • struct FractionalPartDisplayStrategy
    Specifies how a duration is displayed if it cannot be represented exactly with the allowed units.
  • struct Unit
    Units that a duration can be displayed as with UnitsFormatStyle.
  • struct UnitWidth
    Specifies the width of the unit and the spacing of the value and the unit.
  • struct ZeroValueUnitsDisplayStrategy
    Specifies how zero value units are handled.

Initializers

Instance Properties

Instance Methods

Default Implementations

Relationships

Conforms To

  • DiscreteFormatStyle
  • FormatStyle
  • Swift.Copyable
  • Swift.Decodable
  • Swift.Encodable
  • Swift.Equatable
  • Swift.Escapable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype