-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
good first issueFirst-time contributors who are looking to help should work on these issues.First-time contributors who are looking to help should work on these issues.type: documentationImprovements or additions to documentation.Improvements or additions to documentation.
Description
I was originally doing the following and easily ran into a runtime error because isoString
was invalid:
jsDate <- parse isoString
let ms = getTime jsDate
I'm currently doing this instead:
parseJSDate
:: forall eff
. String
-> Eff ( locale :: LOCALE | eff ) (Maybe JSDate)
parseJSDate date = do
parsed <- parse date
pure $ if isValid parsed then Just parsed else Nothing
jsDate <- parseJSDate isoString
let ms = getTime <$> jsDate
Is there any reason to not make parse
do this by default?
adius
Metadata
Metadata
Assignees
Labels
good first issueFirst-time contributors who are looking to help should work on these issues.First-time contributors who are looking to help should work on these issues.type: documentationImprovements or additions to documentation.Improvements or additions to documentation.