官方不在维护 moment.js 了 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
oliver34
V2EX    前端开发

官方不在维护 moment.js 了

  •  
  •   oliver34 2020-09-16 16:38:47 +08:00 3787 次点击
    这是一个创建于 1855 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天上 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 eing 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.

    链接: https://momentjs.com/docs/#/-project-status/

    8 条回复    2020-09-28 09:48:07 +08:00
    chiikawa
        1
    chiikawa  
       2020-09-16 17:20:47 +08:00 via iPhone   1
    day.js
    ianva
        2
    ianva  
       2020-09-16 17:27:32 +08:00   1
    https://date-fns.org/ 这个库要好的多
    FP, Immutable, TypeScript
    sugars
        3
    sugars  
    PRO
       2020-09-16 17:29:34 +08:00
    敬礼
    iamkun
        4
    iamkun  
       2020-09-16 17:34:57 +08:00   2
    试试 Day.js 呀
    oliver34
        5
    oliver34  
    OP
       2020-09-16 17:58:52 +08:00
    @lwq84510 官方也推荐了这个
    jorkingwire
        6
    jorkingwire  
       2020-09-16 18:18:48 +08:00
    敬礼,过去两年日期的好助手
    gongpeione
        7
    gongpeione  
       2020-09-16 20:11:06 +08:00
    @iamkun 昆哥!
    dream4ever
        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. → 这条没太看懂。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     881 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 21:13 PVG 05:13 LAX 14:13 JFK 17:13
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86