Fields
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
struct Fields
struct Fields
s20FoundationEssentials4DateV18ISO8601FormatStyleV6FieldsV
What are these?50CHU
import FoundationEssentials
struct ISO8601FormatStyle
Options for generating and parsing string representations of dates following the ISO 8601 standard.
struct Date
Date
represents a single point in time.
init(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)!)
init(dateSeparator: Date.ISO8601FormatStyle.DateSeparator = .dash, dateTimeSeparator: Date.ISO8601FormatStyle.DateTimeSeparator = .standard, timeZone: TimeZone = TimeZone(secondsFromGMT: 0)!)
init(from decoder: any Decoder) throws
var dateSeparator: Date.ISO8601FormatStyle.DateSeparator { get }
var dateTimeSeparator: Date.ISO8601FormatStyle.DateTimeSeparator { get }
var formatFields: Date.ISO8601FormatStyle.Fields { get }
var includingFractionalSeconds: Bool { get }
var parseStrategy: Date.ISO8601FormatStyle { get }
var timeSeparator: Date.ISO8601FormatStyle.TimeSeparator { get }
var timeZone: TimeZone { get set }
The time zone to use to create and parse date representations.
var timeZoneSeparator: Date.ISO8601FormatStyle.TimeZoneSeparator { get }
static func == (lhs: Date.ISO8601FormatStyle, rhs: Date.ISO8601FormatStyle) -> Bool
func consuming(_ input: String, startingAt index: String.Index, in bounds: Range<String.Index>) throws -> (upperBound: String.Index, output: Date)?
func dateSeparator(_ separator: Date.ISO8601FormatStyle.DateSeparator) -> Date.ISO8601FormatStyle
func dateTimeSeparator(_ separator: Date.ISO8601FormatStyle.DateTimeSeparator) -> Date.ISO8601FormatStyle
func day() -> Date.ISO8601FormatStyle
func encode(to encoder: any Encoder) throws
func format(_ value: Date) -> String
func hash(into hasher: inout Hasher)
func month() -> Date.ISO8601FormatStyle
func parse(_ value: String) throws -> Date
func parse(_ value: String, in range: Range<String.Index>) -> (String.Index, Date)?
func time(includingFractionalSeconds: Bool) -> Date.ISO8601FormatStyle
func timeSeparator(_ separator: Date.ISO8601FormatStyle.TimeSeparator) -> Date.ISO8601FormatStyle
func timeZone(separator: Date.ISO8601FormatStyle.TimeZoneSeparator) -> Date.ISO8601FormatStyle
func timeZoneSeparator(_ separator: Date.ISO8601FormatStyle.TimeZoneSeparator) -> Date.ISO8601FormatStyle
func weekOfYear() -> Date.ISO8601FormatStyle
func year() -> Date.ISO8601FormatStyle
enum DateSeparator
enum DateTimeSeparator
enum TimeSeparator
enum TimeZoneSeparator
typealias RegexOutput = Date
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol ExpressibleByArrayLiteral
A type that can be initialized using an array literal.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol OptionSet : RawRepresentable, SetAlgebra
A type that presents a mathematical set interface to a bit set.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
protocol SetAlgebra<Element> : Equatable, ExpressibleByArrayLiteral
A type that provides mathematical set operations.
init(from decoder: any Decoder) throws
init(rawValue: UInt)
static var day: Date.ISO8601FormatStyle.Fields { get }
static var month: Date.ISO8601FormatStyle.Fields { get }
static var time: Date.ISO8601FormatStyle.Fields { get }
static var timeZone: Date.ISO8601FormatStyle.Fields { get }
static var weekOfYear: Date.ISO8601FormatStyle.Fields { get }
static var year: Date.ISO8601FormatStyle.Fields { get }
var rawValue: UInt
func encode(to encoder: any Encoder) throws
init()
Creates an empty option set.
init<S>(_ sequence: S) where S : Sequence, Self.Element == S.Element
Creates a new set from a finite sequence of items.
init(arrayLiteral: Self.Element...)
Creates a set containing the elements of the given array literal.
init(from decoder: any Decoder) throws
Creates a new instance by decoding from the given decoder, when the type’s RawValue
is UInt
.
var hashValue: Int { get }
var isEmpty: Bool { get }
A Boolean value that indicates whether the set has no elements.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func contains(_ member: Self) -> Bool
Returns a Boolean value that indicates whether a given element is a member of the option set.
mutating func formIntersection(_ other: Self)
Removes all elements of this option set that are not also present in the given set.
mutating func formSymmetricDifference(_ other: Self)
Replaces this set with a new set containing all elements contained in either this set or the given set, but not in both.
mutating func formUnion(_ other: Self)
Inserts the elements of another set into this option set.
func hash(into hasher: inout Hasher)
@discardableResult mutating func insert(_ newMember: Self.Element) -> (inserted: Bool, memberAfterInsert: Self.Element)
Adds the given element to the option set if it is not already a member.
func intersection(_ other: Self) -> Self
Returns a new option set with only the elements contained in both this set and the given set.
func isDisjoint(with other: Self) -> Bool
Returns a Boolean value that indicates whether the set has no members in common with the given set.
func isStrictSubset(of other: Self) -> Bool
Returns a Boolean value that indicates whether this set is a strict subset of the given set.
func isStrictSuperset(of other: Self) -> Bool
Returns a Boolean value that indicates whether this set is a strict superset of the given set.
func isSubset(of other: Self) -> Bool
Returns a Boolean value that indicates whether the set is a subset of another set.
func isSuperset(of other: Self) -> Bool
Returns a Boolean value that indicates whether the set is a superset of the given set.
@discardableResult mutating func remove(_ member: Self.Element) -> Self.Element?
Removes the given element and all elements subsumed by it.
mutating func subtract(_ other: Self)
Removes the elements of the given set from this set.
func subtracting(_ other: Self) -> Self
Returns a new set containing the elements of this set that do not occur in the given set.
func symmetricDifference(_ other: Self) -> Self
Returns a new option set with the elements contained in this set or in the given set, but not in both.
func union(_ other: Self) -> Self
Returns a new option set of the elements contained in this set, in the given set, or in both.
@discardableResult mutating func update(with newMember: Self.Element) -> Self.Element?
Inserts the given element into the set.