New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider removing moment.js dependence as it's now considered as a legacy project #26759
Comments
ng-zorro-antd use date-fns |
I recommend Day.js with antd-dayjs-webpack-plugin. It's super easy to use and replace Moment.js is just one second. Every syntax and APIs are just exacetlly the same with nothing else to learn. According to Moment.js's recommandation on their website:
|
Day.js can be the first-class citizen in Antd, replacing all momentjs occurrence natively, instead of just being available as a plugin mentioned in #26759 (comment) . This also resolves issues like ant-design/antd-dayjs-webpack-plugin#23 |
It's a break change, maybe antd v5 ? |
Yes. We have notice this. Since this will be a breaking change, we may not do action immediately in current version. |
Why not change to a new immutable library in this breaking change? |
@xiaoxiangmoe Day.js is 2kB size and immutable, that's the main difference from moment.js. |
|
any news on this one? |
I was searching for a UI library, found ant-design, checked bundlephobia, and was shocked ;-) |
+1 |
Luxon looks like the natural replacement of moment:
|
@adisrael So there are definitely things to consider before making a choice. So far Ive used date-fns and dayjs with multiple lang support and perso I prefer dayjs, but yeah, that's my flavor because I tend to like smaller packages (queue explicit joke). |
moment.js is replaced by dayjs in #34057 |
What problem does this feature solve?
I believe that this has been reported many times, but now as Moment.js is considered as a legacy project in maintenance mode (see: https://momentjs.com/docs/#/-project-status/), in addition to the problems that we may face when working with it (bundle size, mutable APIs..)
What does the proposed API look like?
Switch to any date library.
The text was updated successfully, but these errors were encountered: