RelativeTimeFormat
t
RESCRIPT
type t
numeric
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: unit => t
makeWithLocale
RESCRIPT
let makeWithLocale: string => t
makeWithLocales
RESCRIPT
let makeWithLocales: array<string> => t
makeWithLocaleAndOptions
RESCRIPT
let makeWithLocaleAndOptions: (string, options) => t
makeWithLocalesAndOptions
RESCRIPT
let makeWithLocalesAndOptions: (array<string>, options) => t
makeWithOptions
RESCRIPT
let makeWithOptions: options => t
supportedLocalesOf
RESCRIPT
let supportedLocalesOf: array<string> => t
supportedLocalesOfWithOptions
RESCRIPT
let supportedLocalesOfWithOptions: (array<string>, supportedLocalesOptions) => t
resolvedOptions
RESCRIPT
let resolvedOptions: t => resolvedOptions
format
RESCRIPT
let format: (t, int, timeUnit) => string
formatToParts
RESCRIPT
let formatToParts: (t, int, timeUnit) => array<relativeTimePart>