dayIndexOfWeek method
获取当前日期处在当前周的第几天
firstWeekDay
- 设置每周起始日, assert(firstWeekDay > 0 && firstWeekDay < 7)
Implementation
int dayIndexOfWeek([int firstWeekDay = 1]) {
assert(firstWeekDay > 0 && firstWeekDay < 7);
int sub = this - this.firstDayInWeek(firstWeekDay);
return (sub / 86400000).ceil() + 1;
}