StructureFoundationEssentials
Date.ParseStrategy
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Options for parsing string representations of dates to create a
Date instance.struct ParseStrategy
Topics
Initializers
init(format: Date.FormatString, locale: Locale?, timeZone: TimeZone, calendar: Calendar, isLenient: Bool, twoDigitStartDate: Date)Creates a newParseStrategywith the given configurations.
Instance Properties
var calendar: CalendarThe calendar to use when parsing date strings and creating the date.var format: StringThe string representation of the fixed format conforming to Unicode Technical Standard #35.var isLenient: BoolIndicates whether to use heuristics when parsing the representation.var locale: Locale?The locale to use when parsing date strings with the specified format. Use system locale if unspecified.var timeZone: TimeZoneThe time zone to use for creating the date.var twoDigitStartDate: DateThe earliest date that can be denoted by a two-digit year specifier.
Default Implementations
Relationships
Conforms To
ParseStrategySwift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype_StringProcessing.CustomConsumingRegexComponent_StringProcessing.RegexComponent