Module

JS.Intl.DateTimeFormat

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

#DateTimeFormat Source

data DateTimeFormat

Language-sensitive date and time formatting

#DateTimeFormatOptions Source

type DateTimeFormatOptions :: Row Typetype DateTimeFormatOptions = (dateStyle :: String, day :: String, dayPeriod :: String, era :: String, formatMatcher :: String, fractionalSecondDigits :: Int, hour :: String, hour12 :: Boolean, hourCycle :: String, localeMatcher :: String, minute :: String, month :: String, second :: String, timeStyle :: String, timeZone :: String, timeZoneName :: String, weekday :: String, year :: String)

#ToDateTimeFormatOptions Source

data ToDateTimeFormatOptions

Instances

#format Source

format :: DateTimeFormat -> DateTime -> String

Formats a date according to the locale and formatting options of the DateTimeFormat

#formatRange Source

formatRange :: DateTimeFormat -> DateTime -> DateTime -> String

Formats a date range in the most concise way based on the locales and options provided for this DateTimeFormat instance

#formatRangeToParts Source

formatRangeToParts :: DateTimeFormat -> DateTime -> DateTime -> Array { type :: String, value :: String }

Returns an array of locale-specific tokens representing each part of the formatted date range produced by the DateTimeFormat instance

#formatToParts Source

formatToParts :: DateTimeFormat -> DateTime -> Array { type :: String, value :: String }

Returns an array of locale-specific tokens representing each part of the formatted date produced by the DateTimeFormat instance

#convertOptionsWithDefaults Source