Page
Library
Module
Module type
Parameter
Class
Class type
Source
Melange bindings for Moment.js.
Based on bs-moment.
This package is still 🚧 WIP 🚧, but new bindings are added as needed instead of actively. Feel free to create an issue or PR if you find anything missing.
Install opam package manager.
Then:
opam install melange-momentThe bindings support the following versions of the moment npm package, which should be installed separately:
"dependencies": {
"moment": "^2.26.0"
}Add melange-moment to the libraries field in your dune file:
; ...
(libraries melange-moment)
; ...This binding takes an opinionated approach to mutations, e.g. moment().add, moment().startOf, and bind them with names like mutableAdd and mutableStartOf. To compensate that, there's an immutable version named add and startOf which takes a moment().clone first before applying the mutations.
Deprecated methods (e.g. moment().days in favor of moment().day) are not included in this binding.