git.iko.soy/purescript-intl
on master help sign in
1 file changed+6−3
since splitsnapshots
unifiedsplit
src/Data/Intl/DateTimeFormat.purs+6−3
src/Data/Intl/DateTimeFormat.purs+6−3
@@ -200,6 +200,7 @@ foreign import createDateTimeFormatImpl
200200-- | ``` purescript
201201-- | import Data.Variant (inj)
202202-- |
203+-- | fmtHourMinute = F DateTimeFormat
203204-- | fmtHourMinute = createDateTimeFormat locale opts
204205-- | where
205206-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
@@ -213,6 +214,7 @@ foreign import createDateTimeFormatImpl
213214-- | (HourMinute {hour: TwoDigit, minute: TwoDigit}))
214215-- |
215216-- |
217+-- | fmtDate :: F DateTimeFormat
216218-- | fmtDate = createDateTimeFormat locale opts
217219-- | wher
218220-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
@@ -254,6 +256,7 @@ foreign import createDateTimeFormatImpl
254256-- | instance formatComponentEraYear :: FormatComponent EraYear where
255257-- | formatComponent = genericFormatComponent
256258-- |
259+-- | fmtEraYear :: F DateTimeFormat
257260-- | fmtEraYear = createDateTimeFormat locales opts
258261-- | where
259262-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
@@ -290,9 +293,9 @@ createDateTimeFormat ls opts =
290293
291294-- | Examples
292295-- | ``` purescript
293−-- | formatJSDate fmtHourMinute date -- "12:00"
294−-- | formatJSDate fmtDate -- "Tue, January 2, 2018, 12:00:00 PM"
295−-- | formatJSDate fmtEraYear -- "2018 Anno Domini"
296+-- | formatJSDate (either (const "") id $ runExcept fmtHourMinute) date -- "12:00"
297+-- | formatJSDate (either (const "") id $ fmtDate) date -- "Tue, January 2, 2018, 12:00:00 PM"
298+-- | formatJSDate (either (const "") id $ fmtEraYear) date -- "2018 Anno Domini"
296299-- | ```
297300foreign import formatJSDate :: DateTimeFormat -> JSDate -> String
298301