A reliable way to format dates and times with Elm.
elm install ryannhg/date-format
MomentJS is a great library for formatting dates!
date-format has similar formatting options as Moment, but it uses Elm’s awesome type system to provide human readable names, and catch typos for you at compile time!
No need to remember the difference between
A quick example
"May 20th, 2018" : String
Want more examples?
I’ve created a few more examples in the
examples/ folder for this repo.
Here’s how you can try them out:
git clone https://github.com/ryannhg/date-format
Go to http://localhost:8000