Day.js 中文文档

当前版本 v1.11

更多文档

Node.js

要开始在 Node.js 项目中使用 Day.js,只需将依赖添加到 Node.js 包管理器即可。

npm install dayjs
# or
yarn add dayjs
# or
pnpm add dayjs

然后将其包含在你的脚本中:

const dayjs = require('dayjs')
//import dayjs from 'dayjs' // ES 2015
dayjs().format()

请在此处查看有关加载 语言环境插件 的更多信息。

Day.js 中文文档 - 粤ICP备14034220号-1