Module

JS.Intl.RelativeTimeFormat

Package
purescript-js-intl
Repository
pete-murphy/purescript-js-intl

#RelativeTimeFormat Source

data RelativeTimeFormat

Language-sensitive relative time formatting

#RelativeTimeFormatOptions Source

type RelativeTimeFormatOptions :: Row Typetype RelativeTimeFormatOptions = (localeMatcher :: String, numeric :: String, style :: String)

#format Source

format :: RelativeTimeFormat -> Int -> RelativeTimeUnit -> String

Formats an Int value and RelativeTimeUnit according to the locale and formatting options of the RelativeTimeFormat

#formatToParts Source

formatToParts :: RelativeTimeFormat -> Int -> RelativeTimeUnit -> Array { type :: String, value :: String }

Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting