---
title: "init(date:time:locale:calendar:timeZone:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/date/intervalformatstyle/init(date:time:locale:calendar:timezone:)"
---

# init(date:time:locale:calendar:timeZone:)

Creates an instance using the provided date, time, locale, calendar, time zone, and capitalization context.

## Declaration

```swift
init(date: Date.IntervalFormatStyle.DateStyle? = nil, time: Date.IntervalFormatStyle.TimeStyle? = nil, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, timeZone: TimeZone = .autoupdatingCurrent)
```

## Parameters

- `date`: The doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/DateStyle for creating the string representation of the date interval.
- `time`: The doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/TimeStyle for creating the string representation of the date interval.
- `locale`: The doc://com.apple.foundation/documentation/Foundation/Locale for creating the string representation of the date interval.
- `calendar`: The doc://com.apple.foundation/documentation/Foundation/Calendar for creating the string representation of the date interval.
- `timeZone`: The doc://com.apple.foundation/documentation/Foundation/TimeZone for creating the string representation of the date interval.

## Discussion

Discussion Customize the date interval string by providing a date style, time style, locale, calendar, time zone, and capitalization scheme. Values for date style are complete, long, abbreviated, numeric, omitted, or none. Time style values are complete, standard, shortened, omitted, or none.
