今天上 moment 官网,发现官方决定不在维护 moment 了,而且推荐新项目不要选用 moment,改用其他库。 摘自官网:
The Moment team has discussed these issues at length. We recognize that many existing projects may continue to use Moment, but we would like to discourage Moment from being used in new projects going forward. Instead, we would like to recommend alternatives that are excellent choices for use in modern applications today. We would also like to promote the Temporal addition to the JavaScript language, which is looking for feedback and contributors.
1
lwq84510 2020-09-16 17:20:47 +08:00 via iPhone 1
day.js
|
2
ianva 2020-09-16 17:27:32 +08:00 1
https://date-fns.org/ 这个库要好的多
FP, Immutable, TypeScript |
3
sugars 2020-09-16 17:29:34 +08:00
敬礼
|
4
iamkun 2020-09-16 17:34:57 +08:00 2
试试 Day.js 呀 😘
|
6
jorkingwire 2020-09-16 18:18:48 +08:00
敬礼,过去两年日期的好助手
|
7
gongpeione 2020-09-16 20:11:06 +08:00
@iamkun 昆哥🐂🍺!
|
8
dream4ever 2020-09-28 09:48:07 +08:00
“We now generally consider Moment to be a legacy project in maintenance mode. It is not dead, but it is indeed done.”
看文章要看仔细啊,不是不再维护了,而是进入维护阶段,不再进行大的变更了。 We will not be adding new features or capabilities. → 不增加新功能了。 We will not be changing Moment's API to be immutable. → 不会将 API 改为 immutable 。 We will not be addressing tree shaking or bundle size issues. → 不会再去解决 tree shaking 或者打包文件体积之类的问题。 We will not be making any major changes (no version 3). → 不会再有大的变更。 We may choose to not fix bugs or behavioral quirks, especially if they are long-standing known issues. → 有可能不会修复 bug,尤其是那些长期存在的。 但是考虑到还有数百万的项目还在用这个库,官方团队还是会做下面这两件事: We will address critical security concerns as they arise. → 会解决关键的安全性问题。 We will release data updates for Moment-Timezone following IANA time zone database releases. → 这条没太看懂。 |