V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
oliver34
V2EX  ›  前端开发

官方不在维护 moment.js 了

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

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

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

    8 条回复    2020-09-28 09:48:07 +08:00
    lwq84510
        1
    lwq84510  
       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  
       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   ·   实用小工具   ·   5311 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:57 · PVG 15:57 · LAX 23:57 · JFK 02:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.