---
title: "padded(_:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/date/formatstyle/symbol/yearforweekofyear/padded(_:)"
---

# padded(_:)

Returns a custom format style that represents the three or more digits of the year in week-of-year calendars, zero-padded if necessary.

## Declaration

```swift
static func padded(_ length: Int) -> Date.FormatStyle.Symbol.YearForWeekOfYear
```

## Parameters

- `length`: The length of the string to display a calendar year.

## Return Value

Return Value A custom year format style that portrays the year of a week of year calendar system with the provided length.

## See Also

### Modifying a Year for Week-of-Year

- [defaultDigits](foundation/date/formatstyle/symbol/yearforweekofyear/defaultdigits.md)
- [twoDigits](foundation/date/formatstyle/symbol/yearforweekofyear/twodigits.md)
