Instance Propertyswift 6.0.3FoundationInternationalization->FoundationEssentials
calendar
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
var calendar: Calendar
var calendar: Calendar
s20FoundationEssentials4DateV0A20InternationalizationE19IntervalFormatStyleV8calendarAA8CalendarVvp
What are these?871EF
import FoundationEssentials
import FoundationInternationalization
struct IntervalFormatStyle
struct Date
Date
represents a single point in time.
struct Calendar
Calendar
encapsulates information about systems of reckoning time in which the beginning, length, and divisions of a year are defined. It provides information about the calendar and support for calendrical computations such as determining the range of a given calendrical unit and adding units to a given absolute time.
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 locale: Locale
var timeZone: TimeZone
func day() -> Date.IntervalFormatStyle
func format(_ v: Range<Date>) -> String
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