Package

purescript-simple-moment

Repository
passy/purescript-simple-moment
License
Apache-2.0
Uploaded by
passy
Published on
2019-03-31T13:42:47Z

Latest release Build Status

A minimal wrapper around a few hand-picked APIs of moment.js.

For a more fully-featured library, check out purescript-moment.

Example

tNow <- now
nowCal <- M.calendar $ M.fromDate tNow
print nowCal -- "Today at 9:47 PM"

nowStr <- M.fromNow $ M.fromDate tNow
print nowStr -- "a few seconds ago"

Documentation

Motivation

While trying to port purescript-moment, to PureScript 0.7.4 I realized that most of the interfaces were obsolete now that there are powerful abstractions for dates and times are available through purescript-datetime. Since the remaining API almost had nothing in common with that of the original library, I started to build a very small wrapper on my own.

License

Apache-2