Skip to content

Update readme/docs to de-emphasise usage of string formats #22

@garyb

Description

@garyb

We and I'm sure others have a lot of code that looks like this sort of thing at the moment:

timeFormat = unsafePartial fromRight $ parseFormatString "HH:mm:ss"

Which is actually quite silly, when it's actually easier, safer, and generally better all round to just construct the format directly:

timeFormat = Hours24 : MinutesTwoDigits : SecondsTwoDigits : Nil
-- or
timeFormat' = L.fromFoldable [Hours24, MinutesTwoDigits, SecondsTwoDigits]

😆

As another advantage of that is Hours24 is better self-documentation than remembering "HH" vs "hh" for Hours24 vs Hours12 too, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions