firstDayInPreviousWeek method
上周第一天
firstWeekDay
- 设置每周起始日, assert(firstWeekDay > 0 && firstWeekDay < 7)
Implementation
DateTime firstDayInPreviousWeek([int firstWeekDay = 1]) {
assert(firstWeekDay > 0 && firstWeekDay < 7);
return this.subtract(Duration(days: 7)).firstDayInWeek(firstWeekDay);
}