One Logo Pool Ball
Foundation · IOS API REFERENCE

Date.RelativeFormatStyle.UnitsStyle

struct · iOS 15.0+ · SDK 27.1

struct UnitsStyle

A type that represents the style to use when formatting the units of relative dates. Cases include ``wide``, ``narrow``, ``abbreviated`` and ``spellOut``.

Members (4)

get · iOS 15.0+

abbreviated

TypeScript
static get abbreviated(): Date_RelativeFormatStyle_UnitsStyle
Swift declaration
static var abbreviated: Date.RelativeFormatStyle.UnitsStyle { get }

"2 mo. ago", "next Wed."

get · iOS 15.0+

wide

TypeScript
static get wide(): Date_RelativeFormatStyle_UnitsStyle
Swift declaration
static var wide: Date.RelativeFormatStyle.UnitsStyle { get }

"2 months ago", "next Wednesday"

get · iOS 15.0+

narrow

TypeScript
static get narrow(): Date_RelativeFormatStyle_UnitsStyle
Swift declaration
static var narrow: Date.RelativeFormatStyle.UnitsStyle { get }

"2 mo. ago", "next W"

get · iOS 15.0+

spellOut

TypeScript
static get spellOut(): Date_RelativeFormatStyle_UnitsStyle
Swift declaration
static var spellOut: Date.RelativeFormatStyle.UnitsStyle { get }

"two months ago", "next Wednesday"

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →