RelativeTimeFormat
open class RelativeTimeFormat(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: RelativeTimeFormatOptions = definedExternally)(source)
Constructors
Link copied to clipboard
constructor(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: RelativeTimeFormatOptions = definedExternally)
constructor(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: RelativeTimeFormatOptions = definedExternally)
Functions
Link copied to clipboard
Formats a value and a unit according to the locale and formatting options of the given Intl.RelativeTimeFormat object.
Link copied to clipboard
fun formatToParts(value: Double, unit: RelativeTimeFormatUnit): ReadonlyArray<ERROR CLASS: Symbol not found for JsAny>
Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
Link copied to clipboard
Provides access to the locale and options computed during initialization of this Intl.RelativeTimeFormat object.