<!--
{
  "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/init(date:time:locale:calendar:timeZone:capitalizationContext:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV11FormatStyleV4date4time6locale8calendar0F4Zone21capitalizationContextA2E0bD0VSg_AE04TimeD0VSgAA6LocaleVAA8CalendarVAA0lI0VAA0cd14CapitalizationK0Vtcfc"
  },
  "title" : "init(date:time:locale:calendar:timeZone:capitalizationContext:)"
}
-->

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

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

```
init(date: Date.FormatStyle.DateStyle? = nil, time: Date.FormatStyle.TimeStyle? = nil, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, timeZone: TimeZone = .autoupdatingCurrent, capitalizationContext: FormatStyleCapitalizationContext = .unknown)
```

## Parameters

`date`

The [`Date.FormatStyle.DateStyle`](/documentation/Foundation/Date/FormatStyle/DateStyle) used to create the string representation of the date.

`time`

The [`Date.FormatStyle.TimeStyle`](/documentation/Foundation/Date/FormatStyle/TimeStyle) used to create the string representation of the date.

`locale`

The [`Locale`](/documentation/Foundation/Locale) used to create the string representation of the date.

`calendar`

The [`Calendar`](/documentation/Foundation/Calendar) used to create the string representation of the date.

`timeZone`

The [`TimeZone`](/documentation/Foundation/TimeZone) used to create the string representation of the date.

`capitalizationContext`

The [`FormatStyleCapitalizationContext`](/documentation/Foundation/FormatStyleCapitalizationContext) used to create the string representation of the date.

## Discussion

Customize the date string by providing a date style, time style, locale, calendar, time zone, and capitalization scheme.

Date style values are [`complete`](/documentation/Foundation/Date/FormatStyle/DateStyle/complete), [`long`](/documentation/Foundation/Date/FormatStyle/DateStyle/long), `abbreviated`, [`numeric`](/documentation/Foundation/Date/FormatStyle/DateStyle/numeric), [`omitted`](/documentation/Foundation/Date/FormatStyle/DateStyle/omitted), or `none`. Time style values are [`complete`](/documentation/Foundation/Date/FormatStyle/TimeStyle/complete), [`standard`](/documentation/Foundation/Date/FormatStyle/TimeStyle/standard), [`shortened`](/documentation/Foundation/Date/FormatStyle/TimeStyle/shortened), [`omitted`](/documentation/Foundation/Date/FormatStyle/TimeStyle/omitted), or `none`.

---

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)