×

Get Relative Date Description

iOS 14 +

Notes

Get a description of the given date as relative to now - eg "Yesterday" or "next year"

Syntax

getRelativeDate(date: <#Date#>, context: <#Enumeration (DateContext)#>, unitsStyle: <#Enumeration (DateUnitsStyle)#>, startingDate: <#Date#>)

Example

getRelativeDate(date: CurrentDate, context: StartOfSentence, unitsStyle: Abbreviated, startingDate: AdjustedDate)