refs:
https://segmentfault.com/a/1190000017517737?utm_source=tag-newest
https://www.cnblogs.com/wangsongbai/p/10299669.html
https://github.com/iamkun/dayjs
https://github.com/noahlam/Miment
API链接
https://github.com/iamkun/dayjs/blob/master/docs/zh-cn/API-reference.md
dayjs的API和moment几乎一模一样,所以如果想要替换到现有的momentjs代码,直接替换为dayjs即可,调用语句绝大部分情况下可以一字不改。
miment同样也是一个极简的时间处理库,压缩后的代码甚至达到了1KB左右,比dayjs还小。
与包大小相应的,作者团队只保留了momentjs中核心方法,但其实这些方法在普通场景下已经足够。
miment的使用方法,也和momentjs基本一致。