isSameWeek method
Check if the DateTime is in the same week as the other
.
Implementation
bool isSameWeek(DateTime other) {
final thisWeek = toZeroHour().subtractTime(days: weekday - 1);
final otherWeek = other.toZeroHour().subtractTime(days: other.weekday - 1);
return thisWeek.isSameDay(otherWeek);
}