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 Type
type RelativeTimeFormatOptions = (localeMatcher :: String, numeric :: String, style :: String)
#ToRelativeTimeFormatOptions Source
data ToRelativeTimeFormatOptions
Instances
ConvertOption ToRelativeTimeFormatOptions "localeMatcher" LocaleMatcher String
ConvertOption ToRelativeTimeFormatOptions "localeMatcher" String String
ConvertOption ToRelativeTimeFormatOptions "style" Style String
ConvertOption ToRelativeTimeFormatOptions "style" String String
ConvertOption ToRelativeTimeFormatOptions "numeric" Numeric String
ConvertOption ToRelativeTimeFormatOptions "numeric" String String
#new Source
new :: forall provided. ConvertOptionsWithDefaults ToRelativeTimeFormatOptions (Record RelativeTimeFormatOptions) (Record provided) (Record RelativeTimeFormatOptions) => Array Locale -> Record provided -> Effect RelativeTimeFormat
#supportedLocalesOf Source
supportedLocalesOf :: forall provided. ConvertOptionsWithDefaults ToRelativeTimeFormatOptions (Record RelativeTimeFormatOptions) (Record provided) (Record RelativeTimeFormatOptions) => Array Locale -> Record provided -> Array 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
- Modules
- JS.
Intl - JS.
Intl. Collator - JS.
Intl. DateTimeFormat - JS.
Intl. DisplayNames - JS.
Intl. ListFormat - JS.
Intl. Locale - JS.
Intl. NumberFormat - JS.
Intl. Options. AvailableCanonical - JS.
Intl. Options. CaseFirst - JS.
Intl. Options. Collation - JS.
Intl. Options. CompactDisplay - JS.
Intl. Options. CurrencyDisplay - JS.
Intl. Options. CurrencySign - JS.
Intl. Options. DateStyle - JS.
Intl. Options. Day - JS.
Intl. Options. DayPeriod - JS.
Intl. Options. DisplayNamesType - JS.
Intl. Options. Era - JS.
Intl. Options. Fallback - JS.
Intl. Options. FormatMatcher - JS.
Intl. Options. Granularity - JS.
Intl. Options. Hour - JS.
Intl. Options. HourCycle - JS.
Intl. Options. Internal. Unsafe - JS.
Intl. Options. LanguageDisplay - JS.
Intl. Options. ListFormatType - JS.
Intl. Options. LocaleMatcher - JS.
Intl. Options. Minute - JS.
Intl. Options. Month - JS.
Intl. Options. Notation - JS.
Intl. Options. NumberFormatStyle - JS.
Intl. Options. Numeric - JS.
Intl. Options. PluralCategory - JS.
Intl. Options. PluralRulesType - JS.
Intl. Options. RelativeTimeUnit - JS.
Intl. Options. RoundingIncrement - JS.
Intl. Options. RoundingMode - JS.
Intl. Options. RoundingPriority - JS.
Intl. Options. Second - JS.
Intl. Options. Sensitivity - JS.
Intl. Options. SignDisplay - JS.
Intl. Options. Style - JS.
Intl. Options. TimeStyle - JS.
Intl. Options. TimeZoneName - JS.
Intl. Options. TrailingZeroDisplay - JS.
Intl. Options. UnitDisplay - JS.
Intl. Options. Usage - JS.
Intl. Options. UseGrouping - JS.
Intl. Options. Weekday - JS.
Intl. Options. Year - JS.
Intl. PluralRules - JS.
Intl. RelativeTimeFormat - JS.
Intl. Segmenter - JS.
LocaleSensitive. Date - JS.
LocaleSensitive. Number - JS.
LocaleSensitive. String