---
title: twoDigits
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/date/formatstyle/symbol/yearforweekofyear/twodigits
---

# twoDigits

The custom format style that represents the two-digit numeric year in week-of-year calendars, zero-padded or truncated if necessary.

## Declaration

```swift
static var twoDigits: Date.FormatStyle.Symbol.YearForWeekOfYear { get }
```

## See Also

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

- [defaultDigits](foundation/date/formatstyle/symbol/yearforweekofyear/defaultdigits.md)
- [padded(_:)](foundation/date/formatstyle/symbol/yearforweekofyear/padded(_:).md)
