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

Creates a new FormatStyle with the given configurations.

iOS
15.0+
macOS
12.0+
tvOS
15.0+
watchOS
8.0+
init(date: Date.IntervalFormatStyle.DateStyle? = nil, time: Date.IntervalFormatStyle.TimeStyle? = nil, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, timeZone: TimeZone = .autoupdatingCurrent)

Parameters

date

The style for formatting the date part of the given date pairs. Note that if .omitted is specified, but the date interval spans more than one day, a locale-specific fallback will be used.

time

The style for formatting the time part of the given date pairs.

locale

The locale to use when formatting date and time values.

calendar

The calendar to use for date values.

timeZone

The time zone with which to specify date and time values.