weekOfYear
WeekOfYear 添加了 .week()
API 以返回 number
,指示 Dayjs
是一年中的第几周。
¥WeekOfYear adds .week()
API to returns a number
indicating the Dayjs
's week of the year.
var weekOfYear = require("dayjs/plugin/weekOfYear");
// import weekOfYear from 'dayjs/plugin/weekOfYear' // ES 2015
dayjs.extend(weekOfYear);
dayjs("2018-06-27").week(); // 26
dayjs("2018-06-27").week(5); // set week