Instance Methodswift 6.0.3FoundationInternationalization->FoundationEssentials
format(_:)
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
func format(_ v: Range<Date>) -> String
func format(_ v: Range<Date>) -> String
s20FoundationEssentials4DateV0A20InternationalizationE19IntervalFormatStyleV6formatySSSnyACGF
What are these?1BCME
import FoundationEssentials
import FoundationInternationalization
struct IntervalFormatStyle
struct Date
Date
represents a single point in time.
@frozen struct Range<Bound> where Bound : Comparable
A half-open interval from a lower bound up to, but not including, an upper bound.
@frozen struct String
A Unicode string value that is a collection of characters.
init(date: Date.IntervalFormatStyle.DateStyle? = nil, time: Date.IntervalFormatStyle.TimeStyle? = nil, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, timeZone: TimeZone = .autoupdatingCurrent)
Creates a new FormatStyle
with the given configurations.
init(from decoder: any Decoder) throws
var calendar: Calendar
var locale: Locale
var timeZone: TimeZone
func day() -> Date.IntervalFormatStyle
func hour(_ format: Date.IntervalFormatStyle.Symbol.Hour = .defaultDigits(amPM: .abbreviated)) -> Date.IntervalFormatStyle
func locale(_ locale: Locale) -> Date.IntervalFormatStyle
func minute() -> Date.IntervalFormatStyle
func month(_ format: Date.IntervalFormatStyle.Symbol.Month = .abbreviated) -> Date.IntervalFormatStyle
func second() -> Date.IntervalFormatStyle
func timeZone(_ format: Date.IntervalFormatStyle.Symbol.TimeZone = .genericName(.short)) -> Date.IntervalFormatStyle
func weekday(_ format: Date.IntervalFormatStyle.Symbol.Weekday = .abbreviated) -> Date.IntervalFormatStyle
func year() -> Date.IntervalFormatStyle
typealias DateStyle = Date.FormatStyle.DateStyle
typealias Symbol = Date.FormatStyle.Symbol
typealias TimeStyle = Date.FormatStyle.TimeStyle