<!--
{
  "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/ParseStrategy",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV13ParseStrategyV"
  },
  "title" : "Date.ParseStrategy"
}
-->

# Date.ParseStrategy

Options for parsing string representations of dates to create a `Date` instance.

```
struct ParseStrategy
```

## Topics

### Initializers

[`init(format: Date.FormatString, locale: Locale?, timeZone: TimeZone, calendar: Calendar, isLenient: Bool, twoDigitStartDate: Date)`](/documentation/Foundation/Date/ParseStrategy/init(format:locale:timeZone:calendar:isLenient:twoDigitStartDate:))

Creates a new `ParseStrategy` with the given configurations.

### Instance Properties

[`var calendar: Calendar`](/documentation/Foundation/Date/ParseStrategy/calendar)

The calendar to use when parsing date strings and creating the date.

[`var format: String`](/documentation/Foundation/Date/ParseStrategy/format)

The string representation of the fixed format conforming to Unicode Technical Standard #35.

[`var isLenient: Bool`](/documentation/Foundation/Date/ParseStrategy/isLenient)

Indicates whether to use heuristics when parsing the representation.

[`var locale: Locale?`](/documentation/Foundation/Date/ParseStrategy/locale)

The locale to use when parsing date strings with the specified format.
Use system locale if unspecified.

[`var timeZone: TimeZone`](/documentation/Foundation/Date/ParseStrategy/timeZone)

The time zone to use for creating the date.

[`var twoDigitStartDate: Date`](/documentation/Foundation/Date/ParseStrategy/twoDigitStartDate)

The earliest date that can be denoted by a two-digit year specifier.

### Default Implementations

[CustomConsumingRegexComponent Implementations](/documentation/Foundation/Date/ParseStrategy/CustomConsumingRegexComponent-Implementations)

[ParseStrategy Implementations](/documentation/Foundation/Date/ParseStrategy/ParseStrategy-Implementations)

[RegexComponent Implementations](/documentation/Foundation/Date/ParseStrategy/RegexComponent-Implementations)

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

[`ParseStrategy`](/documentation/Foundation/ParseStrategy)

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

---

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)