RelativeTimeFormat
t
RESCRIPT
type tnumeric
RESCRIPT
type numeric = [#always | #auto]style
RESCRIPT
type style = [#long | #narrow | #short]timeUnit
RESCRIPT
type timeUnit = [
| #day
| #hour
| #minute
| #month
| #quarter
| #second
| #week
| #year
]options
RESCRIPT
type options = {
localeMatcher?: Core__Intl__Common.localeMatcher,
numeric?: numeric,
style?: style,
}supportedLocalesOptions
RESCRIPT
type supportedLocalesOptions = {
localeMatcher: Core__Intl__Common.localeMatcher,
}resolvedOptions
RESCRIPT
type resolvedOptions = {
locale: string,
numeric: numeric,
style: style,
numberingSystem: string,
}relativeTimePartComponent
RESCRIPT
type relativeTimePartComponent = [#integer | #literal]relativeTimePart
RESCRIPT
type relativeTimePart = {
\"type": relativeTimePartComponent,
value: string,
unit?: timeUnit,
}make
RESCRIPT
let make: (~locales: array<string>=?, ~options: options=?) => tsupportedLocalesOf
RESCRIPT
let supportedLocalesOf: (array<string>, ~options: supportedLocalesOptions=?) => tresolvedOptions
RESCRIPT
let resolvedOptions: t => resolvedOptionsformat
RESCRIPT
let format: (t, int, timeUnit) => stringformatToParts
RESCRIPT
let formatToParts: (t, int, timeUnit) => array<relativeTimePart>