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()
当前版本 v1.11
更多文档要开始在 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