V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
oliver34

官方不在维护 moment.js 了

  •  
  •   oliver34 · Sep 16, 2020 · 4190 views
    This topic created in 2048 days ago, the information mentioned may be changed or developed.

    今天上 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 replies    2020-09-28 09:48:07 +08:00
    chiikawa
        1
    chiikawa  
       Sep 16, 2020 via iPhone   ❤️ 1
    day.js
    ianva
        2
    ianva  
       Sep 16, 2020   ❤️ 1
    https://date-fns.org/ 这个库要好的多
    FP, Immutable, TypeScript
    sugars
        3
    sugars  
    PRO
       Sep 16, 2020
    敬礼
    iamkun
        4
    iamkun  
       Sep 16, 2020   ❤️ 2
    试试 Day.js 呀 😘
    oliver34
        5
    oliver34  
    OP
       Sep 16, 2020
    @lwq84510 官方也推荐了这个
    jorkingwire
        6
    jorkingwire  
       Sep 16, 2020
    敬礼,过去两年日期的好助手
    gongpeione
        7
    gongpeione  
       Sep 16, 2020
    @iamkun 昆哥🐂🍺!
    dream4ever
        8
    dream4ever  
       Sep 28, 2020
    “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. → 这条没太看懂。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2961 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 00:29 · PVG 08:29 · LAX 17:29 · JFK 20:29
    ♥ Do have faith in what you're doing.