<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Date/FormatStyle/Symbol/YearForWeekOfYear",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV11FormatStyleV6SymbolV013YearForWeekOfF0V"
  },
  "title" : "Date.FormatStyle.Symbol.YearForWeekOfYear"
}
-->

# Date.FormatStyle.Symbol.YearForWeekOfYear

A type that specifies the format for a year in week-of-year calendars when you parse a string with a date format string.

```
struct YearForWeekOfYear
```

## Topics

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

[`static var defaultDigits: Date.FormatStyle.Symbol.YearForWeekOfYear`](/documentation/Foundation/Date/FormatStyle/Symbol/YearForWeekOfYear/defaultDigits)

Custom week of the year format style showing the minimum number of digits that represents the year in week-of-year calendars.

[`static var twoDigits: Date.FormatStyle.Symbol.YearForWeekOfYear`](/documentation/Foundation/Date/FormatStyle/Symbol/YearForWeekOfYear/twoDigits)

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

[`static func padded(Int) -> Date.FormatStyle.Symbol.YearForWeekOfYear`](/documentation/Foundation/Date/FormatStyle/Symbol/YearForWeekOfYear/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.

### Comparing a Year for Week-of-Year

[`static func == (Date, Date) -> Bool`](/documentation/Foundation/Date/==(_:_:))

Returns true if the two `Date` values represent the same point in time.

### Type Properties

[`static let omitted: Date.FormatStyle.Symbol.YearForWeekOfYear`](/documentation/Foundation/Date/FormatStyle/Symbol/YearForWeekOfYear/omitted)

The option for not including the symbol in the formatted output.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)