Remove moment from public API

We should remove moment from the public API and just use timestamps and Dates

We should also consider dropping support for Moment entirely since it’s purely worse than Luxon. I would especially like to get rid of Moment since it lacks timezone support and is very large

Author: Fantashit

3 thoughts on “Remove moment from public API

  1. Hi, I don’t know Luxon but you could consider dayjs?
    In my app I just did a search and replace moment -> dayjs and everything worked fine.

  2. date-fns would be a good option since you can require/import just the functions you need without bundling the entire library… I am able to get chart.js to work fine using chartjs-adapter-date-fns but I have to add moment as an external in the webpack config to prevent it from getting bunded (because of chart.js). This is more of a nuisance then it sounds since I’m using create-react-app

    Edit: referenced the wrong package in the original comment

  3. I’m going to consider this as fixed since Chart.js has datetime adapters now and the use of moment is now optional

    In v3 moment is no longer be specified as an npm dependency

Comments are closed.