Contents

init(anchor:presentation:unitsStyle:locale:calendar:capitalizationContext:)

Create a relative format style that is detached from the system time, and instead formats an anchor date relative to the format input.

Declaration

init(anchor: Date, presentation: Date.AnchoredRelativeFormatStyle.Presentation = .numeric, unitsStyle: Date.AnchoredRelativeFormatStyle.UnitsStyle = .wide, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, capitalizationContext: FormatStyleCapitalizationContext = .unknown)

Parameters

  • anchor:

    The date the formatted output is referring to.