ArraySupport
ArraySupport 插件擴展了 dayjs()
和 dayjs.utc()
的 API,使其能夠使用陣列作為參數來建立 Day.js 物件。
javascript
var arraySupport = require('dayjs/plugin/arraySupport');
// import arraySupport from 'dayjs/plugin/arraySupport' // ES 2015
dayjs.extend(arraySupport);
dayjs([2010, 1, 14, 15, 25, 50, 125]);
dayjs.utc([2010, 1, 14, 15, 25, 50, 125]);