FormatString
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
struct FormatString
struct FormatString
s20FoundationEssentials4DateV0A20InternationalizationE12FormatStringV
What are these?3IE1A
import FoundationEssentials
import FoundationInternationalization
struct Date
Date
represents a single point in time.
func formatted() -> String
func formatted(date: Date.FormatStyle.DateStyle, time: Date.FormatStyle.TimeStyle) -> String
Converts self
to its textual representation that contains both the date and time parts. The exact format depends on the user’s preferences.
struct AnchoredRelativeFormatStyle
A relative format style that is detached from the system time, and instead formats an anchor date relative to the format input.
struct AttributedStyle
struct ComponentsFormatStyle
struct FormatStyle
Strategies for formatting a Date
.
struct IntervalFormatStyle
struct ParseStrategy
Options for parsing string representations of dates to create a Date
instance.
struct RelativeFormatStyle
struct VerbatimFormatStyle
Formats a Date
using the given format.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol ExpressibleByExtendedGraphemeClusterLiteral : ExpressibleByUnicodeScalarLiteral
A type that can be initialized with a string literal containing a single extended grapheme cluster.
protocol ExpressibleByStringInterpolation : ExpressibleByStringLiteral
A type that can be initialized by string interpolation with a string literal that includes expressions.
protocol ExpressibleByStringLiteral : ExpressibleByExtendedGraphemeClusterLiteral
A type that can be initialized with a string literal.
protocol ExpressibleByUnicodeScalarLiteral
A type that can be initialized with a string literal containing a single Unicode scalar value.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(stringInterpolation: Date.FormatString.StringInterpolation)
init(stringLiteral value: String)
struct StringInterpolation
init(extendedGraphemeClusterLiteral value: Self.StringLiteralType)
init(unicodeScalarLiteral value: Self.ExtendedGraphemeClusterLiteralType)
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.