ToArray
ToArray 添加 .toArray()
API 以返回镜像参数的 array
。
var toArray = require("dayjs/plugin/toArray");
// import toArray from 'dayjs/plugin/toArray' // ES 2015
dayjs.extend(toArray);
dayjs("2019-01-25").toArray(); // [ 2019, 0, 25, 0, 0, 0, 0 ]
当前版本 v1.11
更多文档ToArray 添加 .toArray()
API 以返回镜像参数的 array
。
var toArray = require("dayjs/plugin/toArray");
// import toArray from 'dayjs/plugin/toArray' // ES 2015
dayjs.extend(toArray);
dayjs("2019-01-25").toArray(); // [ 2019, 0, 25, 0, 0, 0, 0 ]
Day.js 中文文档 - 粤ICP备14034220号-1