day
TypeScriptday(): Date_IntervalFormatStyleSwift declarationfunc day() -> Date.IntervalFormatStyleModifies the date interval format style to include the day. - Returns: A date interval format style that includes the day.
struct · iOS 15.0+ · SDK 27.1
struct IntervalFormatStyleA format style that creates string representations of date intervals. Use `Date.IntervalFormatStyle` to create user-readable strings of date intervals. The format style provides customization to show specific date and time components.
day(): Date_IntervalFormatStyleSwift declarationfunc day() -> Date.IntervalFormatStyleModifies the date interval format style to include the day. - Returns: A date interval format style that includes the day.
static init(date?: (Date_FormatStyle_DateStyle) | null, time?: (Date_FormatStyle_TimeStyle) | null, locale?: Locale, calendar?: Calendar, timeZone?: TimeZone): Date_IntervalFormatStyleSwift declarationinit(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. - Parameters: - date: The style for formatting the date part of the given date pairs. Note that if `.omitted` is specified, but the date interval spans more than one day, a locale-specific fallback will be used. - time: The style for formatting the time part of the given date pairs. - locale: The locale to use when formatting date and time values. - calendar: The calendar to use for date values. - timeZone: The time zone with which to specify date and time values. - Important: Always specify the date length, time length, or the date components to be included in the formatted string with the symbol modifiers. Otherwise, an empty string will be returned when you use the instance to format an object. - Note: If specifying the date fields, and the `DateInterval` range is larger than the specified units, a locale-specific fallback will be used. - Example: for the range 2010-03-04 07:56 - 2010-03-08 16:11 (4 days, 8 hours, 15 minutes), specifying `.hour().minute()` will produce - for en_US, "3/4/2010 7:56 AM - 3/8/2010 4:11 PM" - for en_GB, "4/3/2010 7:56 - 8/3/2010 16:11"
hour(format?: Date_FormatStyle_Symbol_Hour): Date_IntervalFormatStyleSwift declarationfunc hour(_ format: Date.IntervalFormatStyle.Symbol.Hour = .defaultDigits(amPM: .abbreviated)) -> Date.IntervalFormatStyleModifies the date interval format style to include the hour. - Parameter format: The hour format style to apply. - Returns: A date interval format style that includes the specified hour style.
year(): Date_IntervalFormatStyleSwift declarationfunc year() -> Date.IntervalFormatStyleModifies the date interval format style to include the year. - Returns: A date interval format style that includes the year.
month(format?: Date_FormatStyle_Symbol_Month): Date_IntervalFormatStyleSwift declarationfunc month(_ format: Date.IntervalFormatStyle.Symbol.Month = .abbreviated) -> Date.IntervalFormatStyleModifies the date interval format style to include the month. - Parameter format: The month format style to apply. - Returns: A date interval format style that includes the specified month style.
format(v: SDKHandle): stringSwift declarationfunc format(_ v: Range<Date>) -> StringCreates a locale-aware string representation from a date interval. - Parameter v: The date range to format. - Returns: A string representation of the date range.
get locale(): LocaleSwift declarationvar locale: LocaleThe locale to use when formatting date interval values.
set locale(value: Locale)Swift declarationvar locale: LocaleThe locale to use when formatting date interval values.
locale11491(locale: Locale): Date_IntervalFormatStyleSwift declarationfunc locale(_ locale: Locale) -> Date.IntervalFormatStyleModifies the date interval format style to use the specified locale. - Parameter locale: The locale for formatting a date interval. - Returns: A date interval format style with the provided locale.
minute(): Date_IntervalFormatStyleSwift declarationfunc minute() -> Date.IntervalFormatStyleModifies the date interval format style to include the minute. - Returns: A date interval format style that includes the minute.
second(): Date_IntervalFormatStyleSwift declarationfunc second() -> Date.IntervalFormatStyleModifies the date interval format style to include the second. - Returns: A date interval format style that includes the second.
weekday(format?: Date_FormatStyle_Symbol_Weekday): Date_IntervalFormatStyleSwift declarationfunc weekday(_ format: Date.IntervalFormatStyle.Symbol.Weekday = .abbreviated) -> Date.IntervalFormatStyleModifies the date interval format style to include the weekday. - Parameter format: The weekday format style to apply. - Returns: A date interval format style that includes the specified weekday style.
get calendar(): CalendarSwift declarationvar calendar: CalendarThe calendar to use for date values.
set calendar(value: Calendar)Swift declarationvar calendar: CalendarThe calendar to use for date values.
get timeZone(): TimeZoneSwift declarationvar timeZone: TimeZoneThe time zone with which to specify date and time values.
set timeZone(value: TimeZone)Swift declarationvar timeZone: TimeZoneThe time zone with which to specify date and time values.
timeZone13383(format?: Date_FormatStyle_Symbol_TimeZone): Date_IntervalFormatStyleSwift declarationfunc timeZone(_ format: Date.IntervalFormatStyle.Symbol.TimeZone = .genericName(.short)) -> Date.IntervalFormatStyleModifies the date interval format style to include the time zone. - Parameter format: The time zone format style to apply. - Returns: A date interval format style that includes the specified time zone style.
No declarations were skipped in this snapshot.