weekOfYear
TypeScriptweekOfYear(): DateComponents_ISO8601FormatStyleSwift declarationfunc weekOfYear() -> DateComponents.ISO8601FormatStylestruct · iOS 26.0+ · SDK 27.1
struct ISO8601FormatStyleOptions for generating and parsing string representations of dates following the ISO 8601 standard.
weekOfYear(): DateComponents_ISO8601FormatStyleSwift declarationfunc weekOfYear() -> DateComponents.ISO8601FormatStylestatic init(dateSeparator?: Date_ISO8601FormatStyle_DateSeparator, dateTimeSeparator?: Date_ISO8601FormatStyle_DateTimeSeparator, timeSeparator?: Date_ISO8601FormatStyle_TimeSeparator, timeZoneSeparator?: Date_ISO8601FormatStyle_TimeZoneSeparator, includingFractionalSeconds?: boolean, timeZone?: TimeZone): DateComponents_ISO8601FormatStyleSwift declarationinit(dateSeparator: Date.ISO8601FormatStyle.DateSeparator = .dash, dateTimeSeparator: Date.ISO8601FormatStyle.DateTimeSeparator = .standard, timeSeparator: Date.ISO8601FormatStyle.TimeSeparator = .colon, timeZoneSeparator: Date.ISO8601FormatStyle.TimeZoneSeparator = .omitted, includingFractionalSeconds: Bool = false, timeZone: TimeZone = TimeZone(secondsFromGMT: 0)!)get dateSeparator(): Date_ISO8601FormatStyle_DateSeparatorSwift declarationvar dateSeparator: Date.ISO8601FormatStyle.DateSeparator { get }dateSeparator82597(separator: Date_ISO8601FormatStyle_DateSeparator): DateComponents_ISO8601FormatStyleSwift declarationfunc dateSeparator(_ separator: Date.ISO8601FormatStyle.DateSeparator) -> DateComponents.ISO8601FormatStyleget parseStrategy(): DateComponents_ISO8601FormatStyleSwift declarationvar parseStrategy: DateComponents.ISO8601FormatStyle { get }A `ParseStrategy` that can be used to parse this `FormatStyle`'s output
get timeSeparator(): Date_ISO8601FormatStyle_TimeSeparatorSwift declarationvar timeSeparator: Date.ISO8601FormatStyle.TimeSeparator { get }timeSeparator53903(separator: Date_ISO8601FormatStyle_TimeSeparator): DateComponents_ISO8601FormatStyleSwift declarationfunc timeSeparator(_ separator: Date.ISO8601FormatStyle.TimeSeparator) -> DateComponents.ISO8601FormatStyleget dateTimeSeparator(): Date_ISO8601FormatStyle_DateTimeSeparatorSwift declarationvar dateTimeSeparator: Date.ISO8601FormatStyle.DateTimeSeparator { get }dateTimeSeparator94179(separator: Date_ISO8601FormatStyle_DateTimeSeparator): DateComponents_ISO8601FormatStyleSwift declarationfunc dateTimeSeparator(_ separator: Date.ISO8601FormatStyle.DateTimeSeparator) -> DateComponents.ISO8601FormatStyleget timeZoneSeparator(): Date_ISO8601FormatStyle_TimeZoneSeparatorSwift declarationvar timeZoneSeparator: Date.ISO8601FormatStyle.TimeZoneSeparator { get }timeZoneSeparator71688(separator: Date_ISO8601FormatStyle_TimeZoneSeparator): DateComponents_ISO8601FormatStyleSwift declarationfunc timeZoneSeparator(_ separator: Date.ISO8601FormatStyle.TimeZoneSeparator) -> DateComponents.ISO8601FormatStyleget includingFractionalSeconds(): booleanSwift declarationvar includingFractionalSeconds: Bool { get }If set, fractional seconds will be present in formatted output. Fractional seconds may be present in parsing regardless of the setting of this property.
day(): DateComponents_ISO8601FormatStyleSwift declarationfunc day() -> DateComponents.ISO8601FormatStyletime(includingFractionalSeconds: boolean): DateComponents_ISO8601FormatStyleSwift declarationfunc time(includingFractionalSeconds: Bool) -> DateComponents.ISO8601FormatStyleyear(): DateComponents_ISO8601FormatStyleSwift declarationfunc year() -> DateComponents.ISO8601FormatStylemonth(): DateComponents_ISO8601FormatStyleSwift declarationfunc month() -> DateComponents.ISO8601FormatStyleparse(value: string): DateComponentsSwift declarationfunc parse(_ value: String) throws -> DateComponentsParses a value, using this strategy. This method throws an error if the parse strategy can't parse `value`. - Parameter value: A value whose type matches the strategy's ``ParseStrategy/ParseInput`` type. - Returns: A parsed value of the type declared by ``ParseStrategy/ParseOutput``.
format(value: DateComponents): stringSwift declarationfunc format(_ value: DateComponents) -> StringFormats a value, using this style. Use this method when you want to create a single style instance, and then use it to format multiple values. - Parameter value: The value to format. - Returns: A representation of `value`, in the ``FormatOutput`` type, formatted according to the style's configuration.
timeZoneSeparator86974(separator: Date_ISO8601FormatStyle_TimeZoneSeparator): DateComponents_ISO8601FormatStyleSwift declarationfunc timeZone(separator: Date.ISO8601FormatStyle.TimeZoneSeparator) -> DateComponents.ISO8601FormatStyleget timeZone(): TimeZoneSwift declarationvar timeZone: TimeZone { get set }The time zone to use to create and parse date representations.
set timeZone(value: TimeZone)Swift declarationvar timeZone: TimeZone { get set }The time zone to use to create and parse date representations.
consuming(input: string, index: SDKHandle, bounds: SDKHandle): ({ "upperBound": SDKHandle; "output": DateComponents }) | nullSwift declarationfunc consuming(_ input: String, startingAt index: String.Index, in bounds: Range<String.Index>) throws -> (upperBound: String.Index, output: DateComponents)?Process the input string within the specified bounds, beginning at the given index, and return the end position (upper bound) of the match and the produced output. - Parameters: - input: The string in which the match is performed. - index: An index of `input` at which to begin matching. - bounds: The bounds in `input` in which the match is performed. - Returns: The upper bound where the match terminates and a matched instance, or `nil` if there isn't a match.
No declarations were skipped in this snapshot.