Skip to content

Instance Method

format(_:)

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
Formats a duration as an attributed string with DurationFieldAttribute.
func format(_ value: Duration) -> AttributedString

Parameters

value

The value to format.

Return Value

An attributed string to represent the duration.