教程 dayjs tutorial

Day of Week

获取或设置星期几。

传入 number 从 0(星期天)到 6(星期六)。 如果超出这个范围,它会进位到其他周。

javascript
dayjs().day(); // gets day of current week
dayjs().day(0); // returns new dayjs object
提示

dayjs#date 是该月的日期。 dayjs#day 是星期几。