One Logo Pool Ball
Foundation · IOS API REFERENCE

Date.ComponentsFormatStyle.Style

struct · iOS 15.0+ · SDK 27.1

struct Style

Members (5)

get · iOS 15.0+

abbreviated

TypeScript
static get abbreviated(): Date_ComponentsFormatStyle_Style
Swift declaration
static var abbreviated: Date.ComponentsFormatStyle.Style { get }

Shows the fields in the abbreviation. For example, "2 hr, 10 min", "2小時10分鐘"

get · iOS 15.0+

condensedAbbreviated

TypeScript
static get condensedAbbreviated(): Date_ComponentsFormatStyle_Style
Swift declaration
static var condensedAbbreviated: Date.ComponentsFormatStyle.Style { get }

Uses the abbreviated form but condensed if possible. For example, "2hr 10min", "2小時10分鐘"

get · iOS 15.0+

wide

TypeScript
static get wide(): Date_ComponentsFormatStyle_Style
Swift declaration
static var wide: Date.ComponentsFormatStyle.Style { get }

Shows the fields in their full spelling. For example, "2 hour, 10 minutes", "2小時10分鐘"

get · iOS 15.0+

narrow

TypeScript
static get narrow(): Date_ComponentsFormatStyle_Style
Swift declaration
static var narrow: Date.ComponentsFormatStyle.Style { get }

Shows the fields in the shortest form possible. For example, "2h 10m", "2時10分"

get · iOS 15.0+

spellOut

TypeScript
static get spellOut(): Date_ComponentsFormatStyle_Style
Swift declaration
static var spellOut: Date.ComponentsFormatStyle.Style { get }

Values are spelled out and fields are displayed in their full name. For example, "two hours, ten minutes", "2小時10分鐘"

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →