---
title: "minuteSecond(padMinuteToLength:fractionalSecondsLength:roundFractionalSeconds:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/duration/timeformatstyle/pattern-swift.struct/minutesecond(padminutetolength:fractionalsecondslength:roundfractionalseconds:)"
---

# minuteSecond(padMinuteToLength:fractionalSecondsLength:roundFractionalSeconds:)

Returns a pattern to format a duration with minutes and seconds only, with the given unit configurations.

## Declaration

```swift
static func minuteSecond(padMinuteToLength: Int, fractionalSecondsLength: Int = 0, roundFractionalSeconds: FloatingPointRoundingRule = .toNearestOrEven) -> Duration.TimeFormatStyle.Pattern
```

## Parameters

- `padMinuteToLength`: Padding for the minute field. For example, setting this value to 2 formats five minutes as 05:00 in the en_US locale.
- `fractionalSecondsLength`: The length of the fractional seconds. For example, setting this value to 2 formats five minutes as 5:00.00 in the en_US locale.
- `roundFractionalSeconds`: The rule to use for rounding the seconds value, given the remaining fractional seconds value. Use one of the cases from the doc://com.apple.Swift/documentation/Swift/FloatingPointRoundingRule enumeration.

## Return Value

Return Value A Duration.TimeFormatStyle.Pattern that formats a duration with minutes and seconds, using the given unit configurations.

## See Also

### Creating a pattern

- [hourMinute(padHourToLength:roundSeconds:)](swift/duration/timeformatstyle/pattern-swift.struct/hourminute(padhourtolength:roundseconds:).md)
- [hourMinuteSecond(padHourToLength:fractionalSecondsLength:roundFractionalSeconds:)](swift/duration/timeformatstyle/pattern-swift.struct/hourminutesecond(padhourtolength:fractionalsecondslength:roundfractionalseconds:).md)
