Instance Methodswift 6.0.3FoundationInternationalization->FoundationEssentials
formatted
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
func formatted() -> String
func formatted() -> String
s20FoundationEssentials4DateV0A20InternationalizationE9formattedSSyF
What are these?6MFXI
import FoundationEssentials
import FoundationInternationalization
struct Date
Date
represents a single point in time.
@frozen struct String
A Unicode string value that is a collection of characters.
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 FormatString
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.