Weekday
星期新增 .weekday()
API,以取得或設定地區感知的星期。
var weekday = require('dayjs/plugin/weekday')
dayjs.extend(weekday)
// when Sunday is the first day of the week
dayjs().weekday(-7); // last Sunday
dayjs().weekday(7); // next Sunday
// when Monday is the first day of the week
dayjs().weekday(-7) // last Monday
dayjs().weekday(7) // next Monday