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

# twoDigits

The custom format style portraying the two-digit numeric year, zero-padded if necessary.

## Declaration

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

## See Also

### Modifying a Year

- [defaultDigits](foundation/date/formatstyle/symbol/year/defaultdigits.md)
- [padded(_:)](foundation/date/formatstyle/symbol/year/padded(_:).md)
- [relatedGregorian(minimumLength:)](foundation/date/formatstyle/symbol/year/relatedgregorian(minimumlength:).md)
- [extended(minimumLength:)](foundation/date/formatstyle/symbol/year/extended(minimumlength:).md)
