Initializer
init(format:locale:timeZone:calendar:isLenient:twoDigitStartDate:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Creates a new
ParseStrategy with the given configurations.init(format: Date.FormatString, locale: Locale? = nil, timeZone: TimeZone, calendar: Calendar = Calendar(identifier: .gregorian), isLenient: Bool = true, twoDigitStartDate: Date = Date(timeIntervalSince1970: 0))
Parameters
formatA fixed format representing the pattern of the date string.
localeThe locale of the fixed format.
timeZoneThe time zone to use for creating the date.
isLenientWhether to use heuristics when parsing the representation.
twoDigitStartDateThe earliest date that can be denoted by a two-digit year specifier.