git.iko.soy/purescript-intl
on master help sign in
src/Data/Intl/DateTimeFormat.purs+8−5
since splitsnapshots
unifiedsplit
@@ -200,6 +200,7 @@ foreign import createDateTimeFormatImpl
200-- | ``` purescript
200-- | ``` purescript
201-- | import Data.Variant (inj)
201-- | import Data.Variant (inj)
202-- |
202-- |
203+-- | fmtHourMinute = F DateTimeFormat
203-- | fmtHourMinute = createDateTimeFormat locale opts
204-- | fmtHourMinute = createDateTimeFormat locale opts
204-- | where
205-- | where
205-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
206-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
@@ -208,11 +209,12 @@ foreign import createDateTimeFormatImpl
208-- | , timeZone: (Just (TimeZone "Europe/London"))
209-- | , timeZone: (Just (TimeZone "Europe/London"))
209-- | , hour12: Just false
210-- | , hour12: Just false
210-- | , formatMatcher: Nothing
211-- | , formatMatcher: Nothing
211−-- | , inj (SProxy :: SProxy "hourMinute")
212−-- | (HourMinute {hour: TwoDigit, minute: TwoDigit})
213-- | }
212-- | }
213+-- | (inj (SProxy :: SProxy "hourMinute")
214+-- | (HourMinute {hour: TwoDigit, minute: TwoDigit}))
214-- |
215-- |
215-- |
216-- |
217+-- | fmtDate :: F DateTimeFormat
216-- | fmtDate = createDateTimeFormat locale opts
218-- | fmtDate = createDateTimeFormat locale opts
217-- | wher
219-- | wher
218-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
220-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
@@ -254,6 +256,7 @@ foreign import createDateTimeFormatImpl
254-- | instance formatComponentEraYear :: FormatComponent EraYear where
256-- | instance formatComponentEraYear :: FormatComponent EraYear where
255-- | formatComponent = genericFormatComponent
257-- | formatComponent = genericFormatComponent
256-- |
258-- |
259+-- | fmtEraYear :: F DateTimeFormat
257-- | fmtEraYear = createDateTimeFormat locales opts
260-- | fmtEraYear = createDateTimeFormat locales opts
258-- | where
261-- | where
259-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
262-- | locale = inj (SProxy :: SProxy "locale") "en-GB"
@@ -290,9 +293,9 @@ createDateTimeFormat ls opts =
290
293
291-- | Examples
294-- | Examples
292-- | ``` purescript
295-- | ``` purescript
293−-- | formatJSDate fmtHourMinute date -- "12:00"
296+-- | formatJSDate (either (const "") id $ runExcept fmtHourMinute) date -- "12:00"
294−-- | formatJSDate fmtDate -- "Tue, January 2, 2018, 12:00:00 PM"
297+-- | formatJSDate (either (const "") id $ fmtDate) date -- "Tue, January 2, 2018, 12:00:00 PM"
295−-- | formatJSDate fmtEraYear -- "2018 Anno Domini"
298+-- | formatJSDate (either (const "") id $ fmtEraYear) date -- "2018 Anno Domini"
296-- | ```
299-- | ```
297foreign import formatJSDate :: DateTimeFormat -> JSDate -> String
300foreign import formatJSDate :: DateTimeFormat -> JSDate -> String
298
301