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

# init(_:strategy:)

Creates a new DateComponents by parsing the given representation.

## Declaration

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

## Parameters

- `value`: A representation of a date. The type of the representation is specified by ParseStrategy.ParseInput.
- `strategy`: The parse strategy to parse value whose ParseOutput is DateComponents.
