Contents

Duration.TimeFormatStyle.Pattern

The units — including hours, minutes, or seconds — and the configuration of those units, used to format a duration.

Declaration

struct Pattern

Overview

Use a pattern when initializing a Duration.TimeFormatStyle, or creating a time format style from the convenience method Swift/Duration/TimeFormatStyle/time(pattern:).

Use the type properties hourMinute, hourMinuteSecond, or minuteSecond to create patterns with default behavior. To customize how a pattern handles zero-padding and fractional parts, use one of the type methods that take these customizations as parameters.

Topics

Creating a pattern

Using common patterns

See Also

Creating a time format style