---
title: "init(_:strategy:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/datecomponents/init(_:strategy:)-62hv8"
---

# init(_:strategy:)

Creates a new DateComponents by parsing the given string representation.

## Declaration

```swift
init<T, Value>(_ value: Value, strategy: T) throws where T : ParseStrategy, Value : StringProtocol, T.ParseInput == String, T.ParseOutput == DateComponents
```
